[geeklog-hg] geeklog: Moved hardcoded error message "Unfortunately, an error ...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Thu Jun 11 03:39:55 EDT 2015


changeset 9607:e604168f25ed
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/e604168f25ed
user: Kenji ITO <mystralkk at gmail.com>
date: Thu Jun 11 16:39:22 2015 +0900
description:
Moved hardcoded error message "Unfortunately, an error ..." into language file (feature request #0001797)

diffstat:

 language/english.php        |   2 ++
 language/english_utf-8.php  |   2 ++
 language/japanese_utf-8.php |   3 ++-
 public_html/lib-common.php  |  10 ++++++----
 4 files changed, 12 insertions(+), 5 deletions(-)

diffs (86 lines):

diff -r 5c6abdcb544a -r e604168f25ed language/english.php
--- a/language/english.php	Thu Jun 11 15:36:41 2015 +0900
+++ b/language/english.php	Thu Jun 11 16:39:22 2015 +0900
@@ -182,6 +182,8 @@
     138 => "Click <a href=\"{$_CONF['site_url']}/usersettings.php\" rel=\"nofollow\">here</a> to disable the advanced editor and use the default editor which does not require JavaScript",
     139 => "Click <a href=\"{$_CONF['site_url']}/\" rel=\"nofollow\">here</a> to return to the homepage",
     140 => 'Allowed Autotags:',
+    141 => 'An Error Occurred',
+    142 => 'Unfortunately, an error has occurred rendering this page. Please try again later.',
     'facebook' => 'Login with Facebook',
     'twitter' => 'Login with Twitter',
     'linkedin' => 'Login with LinkedIn',
diff -r 5c6abdcb544a -r e604168f25ed language/english_utf-8.php
--- a/language/english_utf-8.php	Thu Jun 11 15:36:41 2015 +0900
+++ b/language/english_utf-8.php	Thu Jun 11 16:39:22 2015 +0900
@@ -182,6 +182,8 @@
     138 => "Click <a href=\"{$_CONF['site_url']}/usersettings.php\" rel=\"nofollow\">here</a> to disable the advanced editor and use the default editor which does not require JavaScript",
     139 => "Click <a href=\"{$_CONF['site_url']}/\" rel=\"nofollow\">here</a> to return to the homepage",
     140 => 'Allowed Autotags:',
+    141 => 'An Error Occurred',
+    142 => 'Unfortunately, an error has occurred rendering this page. Please try again later.',
     'facebook' => 'Login with Facebook',
     'twitter' => 'Login with Twitter',
     'linkedin' => 'Login with LinkedIn',
diff -r 5c6abdcb544a -r e604168f25ed language/japanese_utf-8.php
--- a/language/japanese_utf-8.php	Thu Jun 11 15:36:41 2015 +0900
+++ b/language/japanese_utf-8.php	Thu Jun 11 16:39:22 2015 +0900
@@ -190,6 +190,8 @@
     138 => "アドバンストエディターを無効にして、JavaScriptが不要なノーマルエディターを有効にするには<a href=\"{$_CONF['site_url']}/usersettings.php\" rel=\"nofollow\">こちら</a>をクリックしてください。",
     139 => "ホームページへは<a href=\"{$_CONF['site_url']}/\" rel=\"nofollow\">こちら</a>をクリック",
     140 => '使用できる自動タグ:',
+    141 => 'エラーが発生しました',
+    142 => 'このページを表示する際にエラーが発生しました。しばらくしてから、もう一度お試しください。',
     'facebook' => 'Facebookでログイン',
     'twitter' => 'Twitterでログイン',
     'linkedin' => 'LinkedInでログイン',
@@ -2403,5 +2405,4 @@
     'hash' => 'このフィールドにはあなたの使用しているPHPのバージョンでサポートしているhash関数をå
¥åŠ›ã—なければなりません'
 );
 
-
 ?>
diff -r 5c6abdcb544a -r e604168f25ed public_html/lib-common.php
--- a/public_html/lib-common.php	Thu Jun 11 15:36:41 2015 +0900
+++ b/public_html/lib-common.php	Thu Jun 11 16:39:22 2015 +0900
@@ -8230,7 +8230,7 @@
   */
 function COM_handleError($errno, $errstr, $errfile='', $errline=0, $errcontext='')
 {
-    global $_CONF, $_USER;
+    global $_CONF, $_USER, $LANG01;
 
     // Handle @ operator
     if (error_reporting() == 0) {
@@ -8360,6 +8360,7 @@
 
     header('HTTP/1.1 500 Internal Server Error');
     header('Status: 500 Internal Server Error');
+    header('Content-Type: text/html; charset=' . COM_getCharset());
 
     // Does the theme implement an error message html file?
     if (!empty($_CONF['path_layout']) &&
@@ -8372,10 +8373,12 @@
         include $_CONF['path_layout_default'] . 'errormessage.html';
     } else {
         // Otherwise, display simple error message
-        $title = 'An Error Occurred';
+        $title = $LANG01[141];
+
         if (!empty($_CONF['site_name'])) {
             $title = $_CONF['site_name'] . ' - ' . $title;
         }
+
         echo "
         <html>
             <head>
@@ -8383,8 +8386,7 @@
             </head>
             <body>
             <div style=\"width: 100%; text-align: center;\">
-            Unfortunately, an error has occurred rendering this page. Please try
-            again later.
+            {$LANG01[142]}
             </div>
             </body>
         </html>



More information about the geeklog-cvs mailing list