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:
@@ -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()
|
||||
|
Reference in New Issue
Block a user