* fix app->error to app->triggerError.
This commit is contained in:
@@ -237,7 +237,7 @@ class control
|
||||
}
|
||||
|
||||
$modelClass = class_exists('ext' . $moduleName. 'model') ? 'ext' . $moduleName . 'model' : $moduleName . 'model';
|
||||
if(!class_exists($modelClass)) $this->app->error(" The model $modelClass not found", __FILE__, __LINE__, $exit = true);
|
||||
if(!class_exists($modelClass)) $this->app->triggerError(" The model $modelClass not found", __FILE__, __LINE__, $exit = true);
|
||||
|
||||
$this->$moduleName = new $modelClass();
|
||||
$this->dao = $this->$moduleName->dao;
|
||||
@@ -300,7 +300,7 @@ class control
|
||||
$extHookFiles = glob($viewExtPath . $this->viewPrefix . $methodName . "*.{$viewType}.hook.php");
|
||||
|
||||
$viewFile = file_exists($extViewFile) ? $extViewFile : $mainViewFile;
|
||||
if(!is_file($viewFile)) $this->app->error("the view file $viewFile not found", __FILE__, __LINE__, $exit = true);
|
||||
if(!is_file($viewFile)) $this->app->triggerError("the view file $viewFile not found", __FILE__, __LINE__, $exit = true);
|
||||
if(!empty($extHookFiles)) return array('viewFile' => $viewFile, 'hookFiles' => $extHookFiles);
|
||||
return $viewFile;
|
||||
}
|
||||
@@ -542,14 +542,14 @@ class control
|
||||
$file2Included = file_exists($actionExtFile) ? $actionExtFile : $moduleControlFile;
|
||||
|
||||
/* Load the control file. */
|
||||
if(!is_file($file2Included)) $this->app->error("The control file $file2Included not found", __FILE__, __LINE__, $exit = true);
|
||||
if(!is_file($file2Included)) $this->app->triggerError("The control file $file2Included not found", __FILE__, __LINE__, $exit = true);
|
||||
$currentPWD = getcwd();
|
||||
chdir(dirname($file2Included));
|
||||
if($moduleName != $this->moduleName) helper::import($file2Included);
|
||||
|
||||
/* Set the name of the class to be called. */
|
||||
$className = class_exists("my$moduleName") ? "my$moduleName" : $moduleName;
|
||||
if(!class_exists($className)) $this->app->error(" The class $className not found", __FILE__, __LINE__, $exit = true);
|
||||
if(!class_exists($className)) $this->app->triggerError(" The class $className not found", __FILE__, __LINE__, $exit = true);
|
||||
|
||||
/* Parse the params, create the $module control object. */
|
||||
if(!is_array($params)) parse_str($params, $params);
|
||||
|
||||
@@ -179,7 +179,7 @@ class model
|
||||
|
||||
if(!helper::import($modelFile)) return false;
|
||||
$modelClass = class_exists('ext' . $moduleName. 'model') ? 'ext' . $moduleName . 'model' : $moduleName . 'model';
|
||||
if(!class_exists($modelClass)) $this->app->error(" The model $modelClass not found", __FILE__, __LINE__, $exit = true);
|
||||
if(!class_exists($modelClass)) $this->app->triggerError(" The model $modelClass not found", __FILE__, __LINE__, $exit = true);
|
||||
|
||||
$this->$moduleName = new $modelClass();
|
||||
return $this->$moduleName;
|
||||
|
||||
@@ -55,7 +55,7 @@ class commonModel extends model
|
||||
else
|
||||
{
|
||||
$company = $this->loadModel('company')->getFirst();
|
||||
if(!$company) $this->app->error(sprintf($this->lang->error->companyNotFound, $httpHost), __FILE__, __LINE__, $exit = true);
|
||||
if(!$company) $this->app->triggerError(sprintf($this->lang->error->companyNotFound, $httpHost), __FILE__, __LINE__, $exit = true);
|
||||
$this->session->set('company', $company);
|
||||
$this->app->company = $company;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ class file extends control
|
||||
if($mode == 'open')
|
||||
{
|
||||
if(file_exists($file->realPath))$this->locate($file->webPath);
|
||||
$this->app->error("The file you visit $fileID not found.", __FILE__, __LINE__, true);
|
||||
$this->app->triggerError("The file you visit $fileID not found.", __FILE__, __LINE__, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -101,7 +101,7 @@ class file extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->app->error("The file you visit $fileID not found.", __FILE__, __LINE__, true);
|
||||
$this->app->triggerError("The file you visit $fileID not found.", __FILE__, __LINE__, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -293,16 +293,16 @@ class file extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax replace editor image
|
||||
* Paste image in kindeditor at firefox and chrome.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxEditorImage()
|
||||
public function ajaxPasteImage()
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$data = $this->file->replaceEditorImage($this->post->editor);
|
||||
$data = $this->file->pasteImage($this->post->editor);
|
||||
echo str_replace('\"', '"', $data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ class mailModel extends model
|
||||
$this->mta = self::$instance;
|
||||
$this->mta->CharSet = $this->config->charset;
|
||||
$funcName = "set{$this->config->mail->mta}";
|
||||
if(!method_exists($this, $funcName)) $this->app->error("The MTA {$this->config->mail->mta} not supported now.", __FILE__, __LINE__, $exit = true);
|
||||
if(!method_exists($this, $funcName)) $this->app->triggerError("The MTA {$this->config->mail->mta} not supported now.", __FILE__, __LINE__, $exit = true);
|
||||
$this->$funcName();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user