mirror of
https://github.com/e107inc/e107.git
synced 2025-04-14 09:32:17 +02:00
Fix: SITEURL was broken in CLI mode.
This commit is contained in:
parent
bf2aa9b568
commit
f7eadfd588
@ -98,7 +98,7 @@ $EMAIL_OVERRIDES = array(
|
||||
// Default - test email and when no template specified.
|
||||
|
||||
$EMAIL_TEMPLATE['default']['name'] = 'Default';
|
||||
$EMAIL_TEMPLATE['default']['subject'] = '{SUBJECT} {SITENAME}';
|
||||
$EMAIL_TEMPLATE['default']['subject'] = '{SITENAME}: {SUBJECT} ';
|
||||
$EMAIL_TEMPLATE['default']['header'] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">
|
||||
<html xmlns='http://www.w3.org/1999/xhtml' >
|
||||
<head>
|
||||
@ -143,7 +143,7 @@ $EMAIL_TEMPLATE['default']['footer'] = "<br /><br /><table cellspacing='4'>
|
||||
* signup.php?preview.aftersignup
|
||||
*/
|
||||
$EMAIL_TEMPLATE['signup']['name'] = 'Signup';
|
||||
$EMAIL_TEMPLATE['signup']['subject'] = LAN_SIGNUP_96.' {SITENAME}';
|
||||
$EMAIL_TEMPLATE['signup']['subject'] = '{SITENAME}: '. LAN_SIGNUP_98;
|
||||
$EMAIL_TEMPLATE['signup']['header'] = $EMAIL_TEMPLATE['default']['header'];
|
||||
$EMAIL_TEMPLATE['signup']['body'] = "
|
||||
<div style='text-align:left'>
|
||||
|
@ -214,14 +214,14 @@ class e107_db_debug {
|
||||
|
||||
|
||||
|
||||
function Show_SQL_Details() {
|
||||
function Show_SQL_Details($force=false) {
|
||||
global $sql;
|
||||
//
|
||||
// Show stats from aSQLdetails array
|
||||
//
|
||||
if (!E107_DBG_SQLQUERIES && !E107_DBG_SQLDETAILS)
|
||||
if (!E107_DBG_SQLQUERIES && !E107_DBG_SQLDETAILS && ($force === false))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -498,11 +498,11 @@ class e107_db_debug {
|
||||
$this->scbcount ++;
|
||||
}
|
||||
|
||||
function Show_SC_BB()
|
||||
function Show_SC_BB($force=false)
|
||||
{
|
||||
if (!E107_DBG_BBSC)
|
||||
if (!E107_DBG_BBSC && ($force === false))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
$text = "<table class='fborder table table-striped table-condensed' style='width: 100%'>
|
||||
@ -530,9 +530,9 @@ class e107_db_debug {
|
||||
return $text;
|
||||
}
|
||||
|
||||
function Show_PATH()
|
||||
function Show_PATH($force=false)
|
||||
{
|
||||
if (!E107_DBG_PATH)
|
||||
if (!E107_DBG_PATH && ($force === false))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@ -616,10 +616,11 @@ class e107_db_debug {
|
||||
}
|
||||
|
||||
|
||||
function Show_DEPRECATED(){
|
||||
if (!E107_DBG_DEPRECATED)
|
||||
function Show_DEPRECATED($force=false)
|
||||
{
|
||||
if (!E107_DBG_DEPRECATED && ($force === false))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -703,9 +704,9 @@ class e107_db_debug {
|
||||
return $text;
|
||||
}
|
||||
|
||||
function Show_Includes()
|
||||
function Show_Includes($force=false)
|
||||
{
|
||||
if (!E107_DBG_INCLUDES) return FALSE;
|
||||
if (!E107_DBG_INCLUDES && ($force === false)) return false;
|
||||
|
||||
|
||||
|
||||
|
@ -1333,7 +1333,7 @@ class e107
|
||||
/**
|
||||
* Retrieve date handler singleton object - preferred method.
|
||||
*
|
||||
* @return convert
|
||||
* @return e107_db_debug
|
||||
*/
|
||||
public static function getDebug() //XXX Discuss - possible with current setup?
|
||||
{
|
||||
@ -3207,7 +3207,7 @@ class e107
|
||||
define('e_ROOT',$e_ROOT);
|
||||
|
||||
$this->relative_base_path = (!self::isCli()) ? $path : e_ROOT;
|
||||
$this->http_path = "http://{$_SERVER['HTTP_HOST']}{$this->server_path}";
|
||||
$this->http_path = "http://{$_SERVER['HTTP_HOST']}{$this->server_path}";
|
||||
$this->https_path = "https://{$_SERVER['HTTP_HOST']}{$this->server_path}";
|
||||
$this->file_path = $path;
|
||||
|
||||
@ -3389,6 +3389,13 @@ class e107
|
||||
if(!deftrue('e_SINGLE_ENTRY'))
|
||||
{
|
||||
$page = substr(strrchr($_SERVER['PHP_SELF'], '/'), 1);
|
||||
|
||||
if(self::isCli() && !empty($_SERVER['_']))
|
||||
{
|
||||
$page = basename($_SERVER['_']);
|
||||
}
|
||||
|
||||
|
||||
define('e_PAGE', $page);
|
||||
define('e_SELF', $_self);
|
||||
}
|
||||
@ -3492,14 +3499,15 @@ class e107
|
||||
|
||||
define('ADMINDIR', $ADMIN_DIRECTORY);
|
||||
|
||||
define('SITEURLBASE', $this->HTTP_SCHEME.'://'.$_SERVER['HTTP_HOST']);
|
||||
|
||||
if(self::isCli())
|
||||
{
|
||||
define('SITEURL', SITEURLBASE.$_SERVER['DOMAIN'].e_HTTP);
|
||||
define('SITEURL', self::getPref('siteurl'));
|
||||
define('SITEURLBASE', rtrim(SITEURL,'/'));
|
||||
}
|
||||
else
|
||||
{
|
||||
define('SITEURLBASE', $this->HTTP_SCHEME.'://'.$_SERVER['HTTP_HOST']);
|
||||
define('SITEURL', SITEURLBASE.e_HTTP);
|
||||
}
|
||||
|
||||
|
@ -828,7 +828,7 @@ class e107MailManager
|
||||
if ($email['mail_notify_complete'] & 2) // Do e107 notify
|
||||
{
|
||||
require_once(e_HANDLER."notify_class.php");
|
||||
notify_maildone($message);
|
||||
// notify_maildone($message); // FIXME
|
||||
}
|
||||
e107::getEvent()->trigger('maildone', $email);
|
||||
}
|
||||
|
@ -35,8 +35,7 @@ class siteinfo_shortcodes // must match the folder name of the plugin.
|
||||
|
||||
if(!empty($path))
|
||||
{
|
||||
$siteurl = $this->sc_siteurl();
|
||||
return '<a href="'.$siteurl.'" class="sitebutton"><img src="'.$path.'" alt="'.SITENAME.'" /></a>';
|
||||
return '<a href="'.SITEURL.'" class="sitebutton"><img src="'.$path.'" alt="'.SITENAME.'" /></a>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,8 +61,7 @@ class siteinfo_shortcodes // must match the folder name of the plugin.
|
||||
|
||||
function sc_sitename($parm='')
|
||||
{
|
||||
$url = $this->sc_siteurl();
|
||||
return ($parm == 'link') ? "<a href='".$url."' title='".SITENAME."'>".SITENAME."</a>" : SITENAME;
|
||||
return ($parm == 'link') ? "<a href='".SITEURL."' title='".SITENAME."'>".SITENAME."</a>" : SITENAME;
|
||||
}
|
||||
|
||||
function sc_sitedescription()
|
||||
|
Loading…
x
Reference in New Issue
Block a user