mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 21:27:25 +02:00
Broken links fix for nextprev on pages where magicquotes is enabled.
This commit is contained in:
@@ -272,7 +272,7 @@ function nextprev_shortcode($parm = '')
|
|||||||
}
|
}
|
||||||
|
|
||||||
$e_vars_loop = new e_vars();
|
$e_vars_loop = new e_vars();
|
||||||
$e_vars_loop->bullet = $bullet;
|
$e_vars_loop->bullet = stripslashes($bullet); // fix magicquotes
|
||||||
$ret_items = array();
|
$ret_items = array();
|
||||||
for($c = $loop_start; $c < $loop_end; $c++)
|
for($c = $loop_start; $c < $loop_end; $c++)
|
||||||
{
|
{
|
||||||
@@ -282,7 +282,7 @@ function nextprev_shortcode($parm = '')
|
|||||||
$label = defset($pagetitle[$c], $pagetitle[$c]);
|
$label = defset($pagetitle[$c], $pagetitle[$c]);
|
||||||
}
|
}
|
||||||
$e_vars_loop->url = str_replace('[FROM]', ($perpage * ($c + $index_add)), $url);
|
$e_vars_loop->url = str_replace('[FROM]', ($perpage * ($c + $index_add)), $url);
|
||||||
$e_vars_loop->label = $label ? $tp->toHTML($label, false, 'TITLE') : $c + 1;
|
$e_vars_loop->label = $label ? $tp->toHTML(stripslashes($label), false, 'TITLE') : $c + 1; //quick fix servers with magicquotes - stripslashes()
|
||||||
|
|
||||||
if($c + 1 == $current_page)
|
if($c + 1 == $current_page)
|
||||||
{
|
{
|
||||||
|
@@ -95,8 +95,8 @@ $NEXTPREV_TEMPLATE['page_nav_last'] = '';
|
|||||||
$NEXTPREV_TEMPLATE['page_nav_next'] = '';
|
$NEXTPREV_TEMPLATE['page_nav_next'] = '';
|
||||||
|
|
||||||
$NEXTPREV_TEMPLATE['page_items_start'] = '';
|
$NEXTPREV_TEMPLATE['page_items_start'] = '';
|
||||||
$NEXTPREV_TEMPLATE['page_item'] = '{bullet} <a class="cpage-np" href="{url}" title="{url_label}">{label}</a>';
|
$NEXTPREV_TEMPLATE['page_item'] = "{bullet} <a class='cpage-np' href='{url}' title=\"{url_label}\">{label}</a>";
|
||||||
$NEXTPREV_TEMPLATE['page_item_current'] = '{bullet} <a class="cpage-np current" href="#" onclick="return false;" title="{url_label}">{label}</a>';
|
$NEXTPREV_TEMPLATE['page_item_current'] = "{bullet} <a class='cpage-np current' href='#' onclick='return false;' title=\"{url_label}\">{label}</a>";
|
||||||
$NEXTPREV_TEMPLATE['page_items_end'] = '';
|
$NEXTPREV_TEMPLATE['page_items_end'] = '';
|
||||||
|
|
||||||
//$NEXTPREV_TEMPLATE['default_separator'] = '<span class="nextprev-sep"><!-- --></span>';
|
//$NEXTPREV_TEMPLATE['default_separator'] = '<span class="nextprev-sep"><!-- --></span>';
|
||||||
|
12
page.php
12
page.php
@@ -80,11 +80,15 @@ class pageClass
|
|||||||
|
|
||||||
if(defined('BULLET'))
|
if(defined('BULLET'))
|
||||||
{
|
{
|
||||||
$this->bullet = '<img src="'.THEME_ABS.'images/'.BULLET.'" alt="" class="icon" />';
|
$this->bullet = "<img src='".THEME_ABS."images/".BULLET."' alt='' class='icon' />";
|
||||||
}
|
}
|
||||||
elseif(file_exists(THEME.'images/bullet2.gif'))
|
elseif(file_exists(THEME.'images/bullet2.gif'))
|
||||||
{
|
{
|
||||||
$this->bullet = '<img src="'.THEME_ABS.'images/bullet2.gif" alt="" class="icon" />';
|
$this->bullet = "<img src='".THEME_ABS."images/bullet2.gif' alt='' class='icon' />";
|
||||||
|
}
|
||||||
|
elseif(file_exists(THEME.'images/bullet2.png'))
|
||||||
|
{
|
||||||
|
$this->bullet = "<img src='".THEME_ABS."images/bullet2.png' alt='' class='icon' />";
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->debug = $debug;
|
$this->debug = $debug;
|
||||||
@@ -102,6 +106,8 @@ class pageClass
|
|||||||
function listPages()
|
function listPages()
|
||||||
{
|
{
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
|
$tp = e107::getParser();
|
||||||
|
|
||||||
if(!e107::getPref('listPages', false))
|
if(!e107::getPref('listPages', false))
|
||||||
{
|
{
|
||||||
message_handler("MESSAGE", LAN_PAGE_1);
|
message_handler("MESSAGE", LAN_PAGE_1);
|
||||||
@@ -118,7 +124,7 @@ class pageClass
|
|||||||
foreach($pageArray as $page)
|
foreach($pageArray as $page)
|
||||||
{
|
{
|
||||||
$url = e107::getUrl()->create('page/view', $page, 'allow=page_id,page_sef');
|
$url = e107::getUrl()->create('page/view', $page, 'allow=page_id,page_sef');
|
||||||
$text .= $this->bullet." <a href='".$url."'>".$page['page_title']."</a><br />";
|
$text .= $this->bullet." <a href='".$url."'>".$tp->toHtml($page['page_title'])."</a><br />";
|
||||||
}
|
}
|
||||||
e107::getRender()->tablerender(LAN_PAGE_11, $text,"cpage_list");
|
e107::getRender()->tablerender(LAN_PAGE_11, $text,"cpage_list");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user