상속: extends yii\base\Component
예제 #1
0
 public function actionCheckTest()
 {
     $rr = new RequestResponse();
     if ($rr->isRequestAjaxPost()) {
         if (\Yii::$app->request->post('className')) {
             $className = \Yii::$app->request->post('className');
             if (!class_exists($className)) {
                 $rr->message = \Yii::t('app', 'Test is not found');
                 return (array) $rr;
             }
             if (!is_subclass_of($className, CheckComponent::className())) {
                 $rr->message = \Yii::t('app', 'Incorrect test');
                 return (array) $rr;
             }
             /**
              * @var $checkTest CheckComponent
              */
             try {
                 $checkTest = new $className();
                 if ($lastValue = \Yii::$app->request->post('lastValue')) {
                     $checkTest->lastValue = $lastValue;
                 }
                 $checkTest->run();
                 $rr->success = true;
                 $rr->data = (array) $checkTest;
             } catch (\Exception $e) {
                 $rr->message = \Yii::t('app', 'Test is not done') . ': ' . $e->getMessage();
             }
         }
     }
     return (array) $rr;
 }
예제 #2
0
    public function init()
    {
        $this->name = \Yii::t('skeeks/cms', 'Sending mail (through the object {obj})', ['obj' => 'Mailer']);
        $txt1 = \Yii::t('skeeks/cms', 'The system is transmitting a test letter to the postal address {email} through the library {obj}.', ['email' => '*****@*****.**', 'obj', 'Mailer']);
        $txt2 = \Yii::t('skeeks/cms', 'Created special mailbox, for maximality testing for real work.');
        $txt3 = \Yii::t('skeeks/cms', 'As a test message text is transferred the source code of the script checking site.');
        $txt4 = \Yii::t('skeeks/cms', 'No user data is not transmitted!');
        $txt5 = \Yii::t('skeeks/cms', 'Please note that the test does not check the delivery letter in the mailbox. Moreover, it is impossible to test the delivery of mail to other mail servers.');
        $txt6 = \Yii::t('skeeks/cms', 'If the time of sending the letter more than a second, it can significantly slow down the work site. Contact your hosting provider to set up a pending request to send mail (through the spooler), or turn on the transfer of mail (and the work of agents) through {cron}. To do this we must add the constant into {file}:', ['cron' => 'cron', 'file' => 'dbconn.php']);
        $this->description = <<<HTML
<p>
{$txt1}
{$txt2}
</p>
<p>
{$txt3}
</p>
<p>
<b>{$txt4}</b>
</p>
<p>
{$txt5}
</p>
<p>
{$txt6}
</p>
HTML;
        $this->errorText = \Yii::t('skeeks/cms', "Error");
        $this->successText = \Yii::t('skeeks/cms', "Successfully");
        parent::init();
    }
예제 #3
0
파일: ConfigCheck.php 프로젝트: Liv1020/cms
    public function init()
    {
        $this->name = \Yii::t('app', 'Checking the basic configuration of the project');
        $txt = \Yii::t('app', 'Checking the configuration of the project. Global variables, mode of development, database query cache, the cache structure of the database tables.');
        $this->description = <<<HTML
<p>{$txt}</p>
HTML;
        $this->errorText = \Yii::t('app', 'There are mistakes');
        $this->successText = \Yii::t('app', "Optimally");
        parent::init();
    }
예제 #4
0
    public function init()
    {
        $this->name = \Yii::t('app', "Web-server modules");
        $txt = \Yii::t('app', 'Apache mod_security module like module php suhosin designed to protect the site from hackers, but in practice it often interferes with normal operation of the site. It is recommended to turn it off, instead, to use the module of proactive protection Skeeks CMS.');
        $this->description = <<<HTML
<p>
{$txt}
</p>
HTML;
        $this->errorText = \Yii::t('app', 'Identified conflicts');
        $this->successText = \Yii::t('app', "No conflicts found");
        parent::init();
    }
예제 #5
0
    public function init()
    {
        $this->name = \Yii::t('app', "Time at database and web server");
        $txt = \Yii::t('app', 'Compares the system time database and web server. It may be of unsync when they are installed on different physical machines, but more often as a result of improper installation time zone.');
        $this->description = <<<HTML
<p>
{$txt}
</p>
HTML;
        $this->errorText = \Yii::t('app', "Error");
        $this->successText = \Yii::t('app', "Successfully");
        parent::init();
    }
예제 #6
0
    public function init()
    {
        $this->name = \Yii::t('app', "Check availability file-storages");
        $txt = \Yii::t('app', 'The site has a file storage. It contains all downloaded files. It also consists of a storage cluster (separate servers for file storage). If the site is not connected to the servers, then when you add files to the sections, publications, etc. errors will occur.');
        $this->description = <<<HTML
<p>
    {$txt}
</p>
HTML;
        $this->errorText = \Yii::t('app', "There are mistakes");
        $this->successText = \Yii::t('app', "Successfully");
        parent::init();
    }
예제 #7
0
    public function init()
    {
        $this->name = \Yii::t('skeeks/cms', "Availability of required modules {php}", ['php' => 'php']);
        $txt1 = \Yii::t('skeeks/cms', 'Checking the availability of the required extensions for maximality work product. If an error occurs, show a list of modules that are unavailable.');
        $txt2 = \Yii::t('skeeks/cms', 'To solve the problem, refer to the host, and for the local installation to independently install the required extension on the basis of documentation at website {site}', ['site' => 'php.net']);
        $this->description = <<<HTML
<p>{$txt1}</p>
<p>{$txt2}</p>
HTML;
        $this->errorText = \Yii::t('skeeks/cms', "Not installed required extensions");
        $this->successText = \Yii::t('skeeks/cms', "All necessary modules are installed");
        parent::init();
    }
예제 #8
0
    public function init()
    {
        $this->name = \Yii::t('app', "Required parameters PHP");
        $txt = \Yii::t('app', 'Checks critical parameters defined in the configuration file php.ini. If an error occurs, shows a list of parameters that are not configured correctly. For details on each parameter can be found at php.net.');
        $this->description = <<<HTML
<p>
{$txt}
</p>
HTML;
        $this->errorText = \Yii::t('app', "Incorrect settings");
        $this->successText = \Yii::t('app', "Settings are correct");
        parent::init();
    }
예제 #9
0
    public function init()
    {
        $this->name = \Yii::t('app', "Check {php} and {notice} in the {console}", ['php' => "php warning", 'notice' => "notice", 'console' => "console"]);
        $txt = \Yii::t('app', 'Checks console commands.') . ' ' . \Yii::t('app', "Check {php} and {notice} in the {console}", ['php' => "php warning", 'notice' => "notice", 'console' => "console"]);
        $this->description = <<<HTML
<p>
{$txt}
</p>
HTML;
        $this->errorText = \Yii::t('app', "There are mistakes");
        $this->successText = \Yii::t('app', "Successfully");
        parent::init();
    }
예제 #10
0
    public function init()
    {
        $this->installDir = ROOT_DIR . "/install";
        $this->name = \Yii::t('app', "Checking availability {mysqldump}", ['mysqldump' => 'mysqldump']);
        $txt = \Yii::t('app', 'To work correctly the update, requires a {mysqldump}', ['mysqldump' => 'mysqldump']);
        $this->description = <<<HTML
<p>
    {$txt}
</p>
HTML;
        $this->errorText = \Yii::t('app', "There are mistakes");
        $this->successText = \Yii::t('app', "Successfully");
        parent::init();
    }
예제 #11
0
    public function init()
    {
        $this->installDir = ROOT_DIR . "/install";
        $this->name = \Yii::t('app', "Check availability {git}", ['git' => "git client"]);
        $txt = \Yii::t('app', 'To work correctly the update, requires a git client');
        $this->description = <<<HTML
<p>
    {$txt}
</p>
HTML;
        $this->errorText = \Yii::t('app', "There are mistakes");
        $this->successText = \Yii::t('app', "Successfully");
        parent::init();
    }
예제 #12
0
    public function init()
    {
        $this->installDir = ROOT_DIR . "/install";
        $this->name = \Yii::t('app', "Checking availability installation scripts");
        $txt = \Yii::t('app', 'After installation it is recommended to remove the directory with installation script.');
        $this->description = <<<HTML
<p>
    {$txt}
    <code>{$this->installDir}</code>
</p>
HTML;
        $this->errorText = \Yii::t('app', "There are mistakes");
        $this->successText = \Yii::t('app', "Successfully");
        parent::init();
    }
예제 #13
0
    public function init()
    {
        $this->name = \Yii::t('app', "Saved sessions");
        $txt1 = \Yii::t('app', 'Checking the ability to store data on the server using the session mechanism. This basic ability necessary to preserve authorization between hits.');
        $txt2 = \Yii::t('app', 'Sessions may not work if their support is not installed, in php.ini contains the incorrect folder to store the sessions or it is not available on the record.');
        $this->description = <<<HTML
<p>
{$txt1}
</p>
<p>
{$txt2}
</p>
HTML;
        $this->errorText = \Yii::t('app', "Error");
        $this->successText = \Yii::t('app', "Successfully");
        parent::init();
    }
예제 #14
0
    public function init()
    {
        $this->name = \Yii::t('skeeks/cms', "The values of server variables");
        $txt1 = \Yii::t('skeeks/cms', 'Check the values of variables defined by the web server.');
        $txt2 = \Yii::t('skeeks/cms', 'value HTTP_HOST is taken based on the name of this virtual host (domain). Invalid domain leads to the fact that some browsers (ie, Internet Explorer 6) refuse to maintain his cookie, as a consequence - not stored authorization.');
        $this->description = <<<HTML
<p>
{$txt1}
</p>
<p>
{$txt2}
</p>
HTML;
        $this->errorText = \Yii::t('skeeks/cms', "Incorrect");
        $this->successText = \Yii::t('skeeks/cms', 'Correct');
        parent::init();
    }
예제 #15
0
파일: Module.php 프로젝트: Liv1020/cms
 /**
  * @return CheckComponent[]
  */
 public function loadChecksComponents()
 {
     $result = [];
     $dir = new Dir($this->basePath . "/" . static::CHECKS_DIR_NAME);
     if ($dir->isExist()) {
         if ($files = $dir->findFiles()) {
             foreach ($files as $file) {
                 $className = $this->checkNamespace . "\\" . $file->getFileName();
                 if (class_exists($className)) {
                     $component = new $className();
                     if (is_subclass_of($component, CheckComponent::className())) {
                         $result[$component->className()] = $component;
                     }
                 }
             }
         }
     }
     return $result;
 }
예제 #16
0
    public function init()
    {
        $this->name = \Yii::t('skeeks/cms', "Version MySQL server");
        $txt1 = \Yii::t('skeeks/cms', 'Known versions of MySQL with errors that prevent normal operation of the site:');
        $txt2 = \Yii::t('skeeks/cms', 'incorrect method works {ex}, search does not work properly');
        $txt3 = \Yii::t('skeeks/cms', 'Step auto_increment default is 2, requires 1');
        $txt4 = \Yii::t('skeeks/cms', 'Update MySQL, if you have one of these versions.');
        $this->description = <<<HTML
<p>
{$txt1}
</p>
<p><b>5.0.41</b> - {$txt2};</p>
<p><b>5.1.34</b> - {$txt3};</p>
<p>
{$txt4}
</p>
HTML;
        $this->errorText = \Yii::t('skeeks/cms', "Error");
        $this->successText = \Yii::t('skeeks/cms', "Successfully");
        parent::init();
    }
예제 #17
0
    public function init()
    {
        $vendorDir = VENDOR_DIR;
        $this->name = \Yii::t('skeeks/cms', "Checking kernel and libraries modification");
        $txt1 = \Yii::t('skeeks/cms', 'Checks, changes kernel {cms} and third-party libraries (Folder {folder}). Folder location and the name given by the global constant VENDOR_DIR. For the current project:', ['cms' => 'cms', 'folder' => '/vendor']);
        $txt2 = \Yii::t('skeeks/cms', 'We strongly not recommend to modify the core of the project, as it can bring to the update failed, or your modifications will be removed during the upgrade process. That in turn may result in errors of work the project.');
        $txt3 = \Yii::t('skeeks/cms', 'To solve the problem, you can run the command in the console');
        $this->description = <<<HTML
<p>
{$txt1}
</p>
<p>
<code>{$vendorDir}</code>
</p>
<p>
{$txt2}
</p>
<p>{$txt3}:</p>
HTML;
        $this->errorText = \Yii::t('skeeks/cms', "Found modified kernel");
        $this->successText = \Yii::t('skeeks/cms', "The kernel has not been modified");
        parent::init();
    }