[geeklog-hg] geeklog: First step to fix a login failure (#bug 0001386)
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Mon Apr 8 04:48:29 EDT 2013
changeset 9041:1e69402f34ac
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/1e69402f34ac
user: Kenji ITO <mystralkk at gmail.com>
date: Mon Apr 08 17:47:29 2013 +0900
description:
First step to fix a login failure (#bug 0001386)
diffstat:
public_html/lib-common.php | 47 ++++++++++++++++++++++++++++++++++++---------
1 files changed, 37 insertions(+), 10 deletions(-)
diffs (62 lines):
diff -r 4932385599f7 -r 1e69402f34ac public_html/lib-common.php
--- a/public_html/lib-common.php Sun Apr 07 20:39:40 2013 +0200
+++ b/public_html/lib-common.php Mon Apr 08 17:47:29 2013 +0900
@@ -7228,16 +7228,41 @@
*/
function COM_displayMessageAndAbort( $msg, $plugin = '', $http_status = 200, $http_text = 'OK')
{
- global $MESSAGE;
-
- $display = COM_showMessage( $msg, $plugin );
- $display = COM_createHTMLDocument($display, array('pagetitle' => $MESSAGE[30], 'rightblock' => true));
-
- if( $http_status != 200 )
- {
- header( "HTTP/1.1 $http_status $http_text" );
- header( "Status: $http_status $http_text" );
- }
+ global $_CONF, $MESSAGE;
+
+ if (defined('GL_INITIALIZED')) {
+ $display = COM_showMessage($msg, $plugin);
+ $display = COM_createHTMLDocument($display, array('pagetitle' => $MESSAGE[30], 'rightblock' => true));
+ } else {
+ // Calling COM_createHTMLDocument() here will cause a fatal error
+ $display = '';
+
+ if (empty($plugin)) {
+ if (!isset($MESSAGE)) {
+ if (isset($_CONF['path_language'])) {
+ if (isset($_CONF['language'])) {
+ require_once $_CONF['path_language'] . $_CONF['language'] . '.php';
+ } else {
+ require_once $_CONF['path_language'] . 'english.php';
+ }
+ }
+ }
+
+ if (isset($MESSAGE) AND isset($MESSAGE[$msg])) {
+ $display = $MESSAGE[$msg];
+ }
+ }
+
+ if ($display === '') {
+ $display = 'Error ' . $http_status . ': ' . $http_text;
+ }
+ }
+
+ if ($http_status != 200) {
+ header("HTTP/1.1 $http_status $http_text");
+ header("Status: $http_status $http_text");
+ }
+
echo $display;
exit;
}
@@ -8596,4 +8621,6 @@
}
}
+define('GL_INITIALIZED', TRUE);
+
?>
More information about the geeklog-cvs
mailing list