示例#1
0
/**
 * @param  XoopsObject $module
 * @return bool
 */
function xoops_module_install_about(XoopsObject $module)
{
    $data_file = XOOPS_ROOT_PATH . '/modules/about/sql/mysql.about.sql';
    $GLOBALS['xoopsDB']->queryF('SET NAMES utf8');
    if (!$GLOBALS['xoopsDB']->queryFromFile($data_file)) {
        $module->setErrors('Pre-set data were not installed');
        return true;
    }
    return true;
}
 /**
  * add an error and error code
  *
  * @param string $err_code error code to add
  * @param string $err_str  error to add
  * @access public
  */
 function setErrors($err_code, $err_str)
 {
     $this->_error_codes[] = $err_code;
     parent::setErrors($err_str);
 }
示例#3
0
 /**
  * add an error
  *
  * @param string $value error to add
  * @access public
  */
 function setErrors($err_str, $prefix = false)
 {
     if (is_array($err_str)) {
         foreach ($err_str as $str) {
             $this->setErrors($str, $prefix);
         }
     } else {
         if ($prefix) {
             $err_str = "[" . $prefix . "] " . $err_str;
         }
         parent::setErrors($err_str);
     }
 }