1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Fixes for {SITEURL} when using crons.

This commit is contained in:
Cameron
2015-05-17 02:01:25 -07:00
parent 686c7187ff
commit bf2aa9b568
3 changed files with 14 additions and 7 deletions

View File

@@ -721,7 +721,7 @@ class mailout_main_ui extends e_admin_ui
}
else
{
e107::coreLan('signup');
// e107::coreLan('signup');
$tp = e107::getParser();
$eml = array(
@@ -767,7 +767,7 @@ class mailout_main_ui extends e_admin_ui
'LOGINNAME' => "test-loginname",
'SUBJECT' => "Test Subject",
'DATE_SHORT' => $tp->toDate(time(),'short'),
'DATE_LONG' => $tp->toDate(time(),'long'),
'DATE_LONG' => $tp->toDate(time(),'long')
);

View File

@@ -38,7 +38,7 @@ See e_HANDLER.mail.php for more information
if (!defined('e107_INIT')) { exit; }
$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}';
@@ -142,7 +142,7 @@ $EMAIL_TEMPLATE['default']['footer'] = "<br /><br /><table cellspacing='4'>
* signup.php?test
* signup.php?preview.aftersignup
*/
$EMAIL_TEMPLATE['signup']['name'] = 'Signup';
$EMAIL_TEMPLATE['signup']['subject'] = LAN_SIGNUP_96.' {SITENAME}';
$EMAIL_TEMPLATE['signup']['header'] = $EMAIL_TEMPLATE['default']['header'];
$EMAIL_TEMPLATE['signup']['body'] = "
@@ -182,7 +182,7 @@ $EMAIL_TEMPLATE['signup']['footer'] = "</div>
$EMAIL_TEMPLATE['signup']['cc'] = "";
$EMAIL_TEMPLATE['signup']['bcc'] = "";
$EMAIL_TEMPLATE['signup']['attachments'] = "";
$EMAIL_TEMPLATE['signup']['include'] = "{e_LANGUAGEDIR}{e_LANGUAGE}/lan_signup.php";
// -----------------------------

View File

@@ -35,7 +35,8 @@ class siteinfo_shortcodes // must match the folder name of the plugin.
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='')
{
if(strlen(deftrue('SITEURL')) < 3 ) //fixes CLI/cron
{
return e107::getPref('siteurl');
}
return SITEURL;
}
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()