mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Fixes for {SITEURL} when using crons.
This commit is contained in:
@@ -721,7 +721,7 @@ class mailout_main_ui extends e_admin_ui
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
e107::coreLan('signup');
|
// e107::coreLan('signup');
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
|
|
||||||
$eml = array(
|
$eml = array(
|
||||||
@@ -767,7 +767,7 @@ class mailout_main_ui extends e_admin_ui
|
|||||||
'LOGINNAME' => "test-loginname",
|
'LOGINNAME' => "test-loginname",
|
||||||
'SUBJECT' => "Test Subject",
|
'SUBJECT' => "Test Subject",
|
||||||
'DATE_SHORT' => $tp->toDate(time(),'short'),
|
'DATE_SHORT' => $tp->toDate(time(),'short'),
|
||||||
'DATE_LONG' => $tp->toDate(time(),'long'),
|
'DATE_LONG' => $tp->toDate(time(),'long')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@@ -38,7 +38,7 @@ See e_HANDLER.mail.php for more information
|
|||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
|
|
||||||
$includeSiteButton = e107::getPref('sitebutton');
|
$includeSiteButton = e107::getPref('sitebutton');
|
||||||
e107::lan('core','signup'); // required for when mailer runs under CLI.
|
e107::lan('core','signup'); // required for when mailer runs under CLI.
|
||||||
|
|
||||||
/*
|
/*
|
||||||
$SIGNUPEMAIL_SUBJECT = LAN_SIGNUP_96.' {SITENAME}';
|
$SIGNUPEMAIL_SUBJECT = LAN_SIGNUP_96.' {SITENAME}';
|
||||||
@@ -142,7 +142,7 @@ $EMAIL_TEMPLATE['default']['footer'] = "<br /><br /><table cellspacing='4'>
|
|||||||
* signup.php?test
|
* signup.php?test
|
||||||
* signup.php?preview.aftersignup
|
* signup.php?preview.aftersignup
|
||||||
*/
|
*/
|
||||||
|
$EMAIL_TEMPLATE['signup']['name'] = 'Signup';
|
||||||
$EMAIL_TEMPLATE['signup']['subject'] = LAN_SIGNUP_96.' {SITENAME}';
|
$EMAIL_TEMPLATE['signup']['subject'] = LAN_SIGNUP_96.' {SITENAME}';
|
||||||
$EMAIL_TEMPLATE['signup']['header'] = $EMAIL_TEMPLATE['default']['header'];
|
$EMAIL_TEMPLATE['signup']['header'] = $EMAIL_TEMPLATE['default']['header'];
|
||||||
$EMAIL_TEMPLATE['signup']['body'] = "
|
$EMAIL_TEMPLATE['signup']['body'] = "
|
||||||
@@ -182,7 +182,7 @@ $EMAIL_TEMPLATE['signup']['footer'] = "</div>
|
|||||||
$EMAIL_TEMPLATE['signup']['cc'] = "";
|
$EMAIL_TEMPLATE['signup']['cc'] = "";
|
||||||
$EMAIL_TEMPLATE['signup']['bcc'] = "";
|
$EMAIL_TEMPLATE['signup']['bcc'] = "";
|
||||||
$EMAIL_TEMPLATE['signup']['attachments'] = "";
|
$EMAIL_TEMPLATE['signup']['attachments'] = "";
|
||||||
$EMAIL_TEMPLATE['signup']['include'] = "{e_LANGUAGEDIR}{e_LANGUAGE}/lan_signup.php";
|
|
||||||
|
|
||||||
|
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
|
@@ -35,7 +35,8 @@ class siteinfo_shortcodes // must match the folder name of the plugin.
|
|||||||
|
|
||||||
if(!empty($path))
|
if(!empty($path))
|
||||||
{
|
{
|
||||||
return '<a href="'.SITEURL.'" class="sitebutton"><img src="'.$path.'" alt="'.SITENAME.'" /></a>';
|
$siteurl = $this->sc_siteurl();
|
||||||
|
return '<a href="'.$siteurl.'" class="sitebutton"><img src="'.$path.'" alt="'.SITENAME.'" /></a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,13 +51,19 @@ class siteinfo_shortcodes // must match the folder name of the plugin.
|
|||||||
|
|
||||||
function sc_siteurl($parm='')
|
function sc_siteurl($parm='')
|
||||||
{
|
{
|
||||||
|
if(strlen(deftrue('SITEURL')) < 3 ) //fixes CLI/cron
|
||||||
|
{
|
||||||
|
return e107::getPref('siteurl');
|
||||||
|
}
|
||||||
|
|
||||||
return SITEURL;
|
return SITEURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function sc_sitename($parm='')
|
function sc_sitename($parm='')
|
||||||
{
|
{
|
||||||
return ($parm == 'link') ? "<a href='".SITEURL."' title=\"".SITENAME."\">".SITENAME."</a>" : SITENAME;
|
$url = $this->sc_siteurl();
|
||||||
|
return ($parm == 'link') ? "<a href='".$url."' title='".SITENAME."'>".SITENAME."</a>" : SITENAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
function sc_sitedescription()
|
function sc_sitedescription()
|
||||||
|
Reference in New Issue
Block a user