1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-26 15:54:43 +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

@@ -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()