• R/O
  • SSH
  • HTTPS

jeanscms: コミット


コミットメタ情報

リビジョン368 (tree)
日時2018-01-30 05:37:43
作者kmorimatsu

ログメッセージ

Debug error handling routines when installing (reported by temporary OSDN user: del#93913)

変更サマリ

差分

--- jeanscms/branches/jeans7/jeans/libs/blog.php (revision 367)
+++ jeanscms/branches/jeans7/jeans/libs/blog.php (revision 368)
@@ -30,7 +30,7 @@
3030 static public function selector($blogid=false){
3131 if (!$blogid) $blogid=parent::setting('id');
3232 $template='index';
33- if (class_exists('error',false)) {
33+ if (class_exists('jerror',false)) {
3434 // Note that the class 'error' exists when $_COOKIE['note_text'] is set.
3535 if (jerror::fatal() || isset($_GET['error'])) $template='error';
3636 }
--- jeanscms/branches/jeans7/jeans/libs/jeans.php (revision 367)
+++ jeanscms/branches/jeans7/jeans/libs/jeans.php (revision 368)
@@ -201,7 +201,7 @@
201201 static private $class_objects=array('sql');
202202 static public function init(){
203203 register_shutdown_function(array('core','shutdown'));
204- define('_JEANS_VERSION','1.0.0 beta');
204+ define('_JEANS_VERSION','1.1.0 beta');
205205 header('Content-Type: text/html; charset=UTF-8');
206206 header('Last-Modified: '. gmdate('D, d M Y H:i:s'). ' GMT');
207207 sql::init();
@@ -498,7 +498,7 @@
498498 return is_callable("$class::$method");
499499 }
500500 static public function error_exists(){
501- if (!class_exists('error',false)) return false;
501+ if (!class_exists('jerror',false)) return false;
502502 return count(jerror::get_note());
503503 }
504504 /**
--- jeanscms/branches/jeans7/jeans/libs/misc/misc_hash.php (revision 367)
+++ jeanscms/branches/jeans7/jeans/libs/misc/misc_hash.php (revision 368)
@@ -30,7 +30,7 @@
3030 }
3131 return $ret;
3232 default:
33- error::quit('"<%0%>" is not supported by hash() emulation mode.',$mode);
33+ jerror::quit('"<%0%>" is not supported by hash() emulation mode.',$mode);
3434 }
3535 }
3636 }
--- jeanscms/branches/jeans7/jeans/plugins/jp_SkinFiles.php (revision 367)
+++ jeanscms/branches/jeans7/jeans/plugins/jp_SkinFiles.php (revision 368)
@@ -18,7 +18,7 @@
1818 return '_JP_SKINFILES_SKINFILES_DESC';
1919 }
2020 static public function version(){
21- return '0.1.1';
21+ return '0.2.0';
2222 }
2323 static public function install(){
2424 self::option()->create('text_ext','_JP_SKINFILES_TEXT_FILE_EXTENSIONS','text','txt,text,htm,html,inc,php,css,js');
--- jeanscms/branches/jeans7/install/install.php (revision 367)
+++ jeanscms/branches/jeans7/install/install.php (revision 368)
@@ -39,7 +39,7 @@
3939 // Action cannot be used because ticket class is not available.
4040 self::posted();
4141 if (!core::error_exists()) $template='done';
42- elseif (error::fatal()) $template='failed';
42+ elseif (jerror::fatal()) $template='failed';
4343 else $template='install';
4444 } else $template='install';
4545 $skin='/install/skin.inc';
@@ -63,13 +63,13 @@
6363 static private function posted(){
6464 // Check values
6565 $post=self::item_from_post();
66- if (empty($post['sitename'])) error::note('_INSTALL_NO_SITE_NAME');
67- if (!@date_default_timezone_set($post['timezone'])) error::note('_INSTALL_INVALIED_TIME_ZONE');
68- if (empty($post['email'])) error::note('_INSTALL_NO_EMAIL');
69- if (empty($post['loginname'])) error::note('_INSTALL_NO_LOGIN_NAME');
70- if (empty($post['name'])) error::note('_INSTALL_NO_NAME');
71- if (strlen($post['password1'])<6) error::note('_INSTALL_PASSWORD_TOO_SHORT');
72- if ($post['password1']!=$post['password2']) error::note('_INSTALL_PASSWORD_MISMATCH');
66+ if (empty($post['sitename'])) jerror::note('_INSTALL_NO_SITE_NAME');
67+ if (!@date_default_timezone_set($post['timezone'])) jerror::note('_INSTALL_INVALIED_TIME_ZONE');
68+ if (empty($post['email'])) jerror::note('_INSTALL_NO_EMAIL');
69+ if (empty($post['loginname'])) jerror::note('_INSTALL_NO_LOGIN_NAME');
70+ if (empty($post['name'])) jerror::note('_INSTALL_NO_NAME');
71+ if (strlen($post['password1'])<6) jerror::note('_INSTALL_PASSWORD_TOO_SHORT');
72+ if ($post['password1']!=$post['password2']) jerror::note('_INSTALL_PASSWORD_MISMATCH');
7373 if (core::error_exists()) return;
7474 $post['password']=hash('sha512',_HASH_SALT.$post['password1']);
7575 unset($post['password1']);
@@ -121,8 +121,8 @@
121121 if (sql::pdo($mode)->errorCode()=='0000') continue;
122122 sql::commit($mode);
123123 $e=sql::pdo($mode)->errorInfo();
124- error::fatal('SQLite error: <%0%>',$e[2]);
125- error::fatal('<%0%>',$m[1]);
124+ jerror::fatal('SQLite error: <%0%>',$e[2]);
125+ jerror::fatal('<%0%>',$m[1]);
126126 return false;
127127 }
128128 sql::commit($mode);
旧リポジトリブラウザで表示