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

Broken links fix for nextprev on pages where magicquotes is enabled.

This commit is contained in:
CaMer0n
2012-07-21 05:07:21 +00:00
parent 09f789b09d
commit 19bc261d46
3 changed files with 13 additions and 7 deletions

View File

@@ -272,7 +272,7 @@ function nextprev_shortcode($parm = '')
}
$e_vars_loop = new e_vars();
$e_vars_loop->bullet = $bullet;
$e_vars_loop->bullet = stripslashes($bullet); // fix magicquotes
$ret_items = array();
for($c = $loop_start; $c < $loop_end; $c++)
{
@@ -282,7 +282,7 @@ function nextprev_shortcode($parm = '')
$label = defset($pagetitle[$c], $pagetitle[$c]);
}
$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)
{

View File

@@ -95,8 +95,8 @@ $NEXTPREV_TEMPLATE['page_nav_last'] = '';
$NEXTPREV_TEMPLATE['page_nav_next'] = '';
$NEXTPREV_TEMPLATE['page_items_start'] = '';
$NEXTPREV_TEMPLATE['page_item'] = '{bullet}&nbsp;<a class="cpage-np" href="{url}" title="{url_label}">{label}</a>';
$NEXTPREV_TEMPLATE['page_item_current'] = '{bullet}&nbsp;<a class="cpage-np current" href="#" onclick="return false;" title="{url_label}">{label}</a>';
$NEXTPREV_TEMPLATE['page_item'] = "{bullet}&nbsp;<a class='cpage-np' href='{url}' title=\"{url_label}\">{label}</a>";
$NEXTPREV_TEMPLATE['page_item_current'] = "{bullet}&nbsp;<a class='cpage-np current' href='#' onclick='return false;' title=\"{url_label}\">{label}</a>";
$NEXTPREV_TEMPLATE['page_items_end'] = '';
//$NEXTPREV_TEMPLATE['default_separator'] = '<span class="nextprev-sep"><!-- --></span>';

View File

@@ -80,11 +80,15 @@ class pageClass
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'))
{
$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;
@@ -102,6 +106,8 @@ class pageClass
function listPages()
{
$sql = e107::getDb();
$tp = e107::getParser();
if(!e107::getPref('listPages', false))
{
message_handler("MESSAGE", LAN_PAGE_1);
@@ -118,7 +124,7 @@ class pageClass
foreach($pageArray as $page)
{
$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");
}