Change instanceof Object to instanceof BaseObject

This commit is contained in:
Kijin Sung 2017-12-01 01:10:48 +09:00
parent 84e5542d77
commit ae971306b7
6 changed files with 8 additions and 8 deletions

View file

@ -164,7 +164,7 @@ class ModuleInstaller
} }
$output = $oModule->moduleUninstall(); $output = $oModule->moduleUninstall();
if($output instanceof Object && !$output->toBool()) if($output instanceof BaseObject && !$output->toBool())
{ {
return $output; return $output;
} }

View file

@ -514,7 +514,7 @@ class commentModel extends comment
// call trigger (before) // call trigger (before)
$trigger_output = ModuleHandler::triggerCall('comment.getCommentList', 'before', $args); $trigger_output = ModuleHandler::triggerCall('comment.getCommentList', 'before', $args);
if($trigger_output instanceof Object && !$trigger_output->toBool()) if($trigger_output instanceof BaseObject && !$trigger_output->toBool())
{ {
return $output; return $output;
} }
@ -540,7 +540,7 @@ class commentModel extends comment
// call trigger (after) // call trigger (after)
$trigger_output = ModuleHandler::triggerCall('comment.getCommentList', 'after', $output); $trigger_output = ModuleHandler::triggerCall('comment.getCommentList', 'after', $output);
if($trigger_output instanceof Object && !$trigger_output->toBool()) if($trigger_output instanceof BaseObject && !$trigger_output->toBool())
{ {
return $trigger_output; return $trigger_output;
} }

View file

@ -228,13 +228,13 @@ class documentModel extends document
// Call trigger (before) // Call trigger (before)
// This trigger can be used to set an alternative output using a different search method // This trigger can be used to set an alternative output using a different search method
$output = ModuleHandler::triggerCall('document.getDocumentList', 'before', $obj); $output = ModuleHandler::triggerCall('document.getDocumentList', 'before', $obj);
if($output instanceof Object && !$output->toBool()) if($output instanceof BaseObject && !$output->toBool())
{ {
return $output; return $output;
} }
// If an alternate output is set, use it instead of running the default queries // If an alternate output is set, use it instead of running the default queries
$use_alternate_output = (isset($obj->use_alternate_output) && $obj->use_alternate_output instanceof Object); $use_alternate_output = (isset($obj->use_alternate_output) && $obj->use_alternate_output instanceof BaseObject);
if (!$use_alternate_output) if (!$use_alternate_output)
{ {
$this->_setSearchOption($obj, $args, $query_id, $use_division); $this->_setSearchOption($obj, $args, $query_id, $use_division);

View file

@ -60,7 +60,7 @@ class editorController extends editor
if(method_exists($oComponent, $method)) $output = $oComponent->{$method}(); if(method_exists($oComponent, $method)) $output = $oComponent->{$method}();
else return $this->setError('%s method is not exists', $method); else return $this->setError('%s method is not exists', $method);
if($output instanceof Object && !$output->toBool()) return $output; if($output instanceof BaseObject && !$output->toBool()) return $output;
$this->setError($oComponent->getError()); $this->setError($oComponent->getError());
$this->setMessage($oComponent->getMessage()); $this->setMessage($oComponent->getMessage());

View file

@ -68,7 +68,7 @@ class fileModel extends file
} }
$tmp_files = $this->getFiles($upload_target_srl); $tmp_files = $this->getFiles($upload_target_srl);
if($tmp_files instanceof Object && !$tmp_files->toBool()) return $tmp_files; if($tmp_files instanceof BaseObject && !$tmp_files->toBool()) return $tmp_files;
$files = array(); $files = array();
foreach($tmp_files as $file_info) foreach($tmp_files as $file_info)

View file

@ -148,7 +148,7 @@ function __makeMenu(&$list, $parent_srl)
} }
$output = $oMenuAdminController->procMenuAdminInsertItem(); $output = $oMenuAdminController->procMenuAdminInsertItem();
if($output instanceof Object && !$output->toBool()) if($output instanceof BaseObject && !$output->toBool())
{ {
return $output; return $output;
} }