1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-29 10:38:08 +01:00

Fix for page-menu button class check.

This commit is contained in:
Cameron 2016-04-08 13:55:59 -07:00
parent 85d144cb8e
commit 7679a0afc6

View File

@ -15,7 +15,9 @@ if (!defined('e107_INIT')) { exit; }
*
* Shortcodes for custom page display
*/
class cpage_shortcodes extends e_shortcode
{
@ -246,12 +248,14 @@ class cpage_shortcodes extends e_shortcode
function sc_cpagebutton($parm)
{
$tp = e107::getParser();
if(empty($this->var['menu_button_url']) && !check_class($this->var['page_class'])) // ignore when custom url used.
$pgClass = intval($this->var['page_class']);
if(empty($this->var['menu_button_url']) && !check_class($pgClass)) // ignore when custom url used.
{
return "<!-- Button Removed: Page check_class() returned false. -->";
}
$url = $this->sc_cpageurl();
if($parm == 'href' || !$url)
@ -263,7 +267,7 @@ class cpage_shortcodes extends e_shortcode
{
return "<!-- Button Removed: No page text exists! -->";
}
parse_str($parm,$options);
$buttonText = (empty($this->var['menu_button_text'])) ? LAN_READ_MORE : $this->var['menu_button_text'];