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

minor bugs, notice cleanup, missing e_SELF/e_QUERY fixes

This commit is contained in:
secretr 2011-12-06 09:44:28 +00:00
parent 270b278f43
commit ab4501edd2
10 changed files with 21 additions and 19 deletions

View File

@ -956,7 +956,7 @@ if(!defined("THEME_LAYOUT"))
continue;
}
if ($kpage && ($kpage == e_PAGE || strpos($c_url, $kpage) !== false))
if ($kpage && ($kpage == defset('e_PAGE') || strpos($c_url, $kpage) !== false))
{
// $def = ($lyout) ? $lyout : "legacyCustom";
$def = $lyout;
@ -1078,7 +1078,8 @@ define('INIT', true);
if(isset($_SERVER['HTTP_REFERER']))
{
$tmp = explode("?", $_SERVER['HTTP_REFERER']);
define('e_REFERER_SELF',($tmp[0] == e_SELF));
define('e_REFERER_SELF',($tmp[0] == e_REQUEST_SELF));
unset($tmp);
}
else
{

View File

@ -84,7 +84,7 @@ class core_news_url extends eUrlConfig
if(isset($params['category_name']) && !empty($params['category_name'])) $params['category'] = $params['category_name'];
$url = 'news.php?';
if('--FROM--' != $params['page']) $page = $params['page'] ? intval($params['page']) : '0';
if('--FROM--' != vartrue($params['page'])) $page = varset($params['page']) ? intval($params['page']) : '0';
else $page = '--FROM--';
if($route[0] == 'view')

View File

@ -41,7 +41,7 @@ class core_news_rewrite_url extends eUrlConfig
public function create($route, $params = array(), $options = array())
{
if('--FROM--' != $params['page']) $page = $params['page'] ? intval($params['page']) : '0';
if('--FROM--' != vartrue($params['page'])) $page = varset($params['page']) ? intval($params['page']) : '0';
else $page = '--FROM--';
if(!$route) $route = 'list/items';

View File

@ -1783,7 +1783,7 @@ class eRouter
$urlSuffix = '';
// Fix base url for legacy links
if($config['noSingleEntry']) $base = $options['full'] ? SITEURL : e_HTTP;
if(vartrue($config['noSingleEntry'])) $base = $options['full'] ? SITEURL : e_HTTP;
elseif(self::FORMAT_GET !== $config['format'])
{
$urlSuffix = $this->urlSuffix;

View File

@ -675,7 +675,7 @@ class e_news_tree extends e_front_tree_model
{
$vars->counter = $i;
$batch->setScVar('news_item', $news->getData());
$ret[] = $parser->parseTemplate($template['item'], true, $obj, $vars);
$ret[] = $parser->parseTemplate($template['item'], true, $batch, $vars);
$i++;
}
@ -888,7 +888,7 @@ class e_news_category_tree extends e_front_tree_model
if($ret)
{
$separator = varset($template['separator'], '');
$ret = $template['start'].implode($separator, $ret).$templatep['end'];
$ret = $template['start'].implode($separator, $ret).$template['end'];
$return = isset($parms['return']) ? true : false;
if($tablerender)

View File

@ -19,8 +19,8 @@ if(false === $cached)
$template = e107::getTemplate('news', vartrue($parms['tmpl'], 'news_menu'), vartrue($parms['tmpl_key'], 'latest'));
$treeparm = array();
if($parms['count']) $treeparm['db_limit'] = '0, '.intval($parms['count']);
if($parms['order']) $treeparm['db_order'] = e107::getParser()->toDb($parms['order']);
if(vartrue($parms['count'])) $treeparm['db_limit'] = '0, '.intval($parms['count']);
if(vartrue($parms['order'])) $treeparm['db_order'] = e107::getParser()->toDb($parms['order']);
$parms['return'] = true;
$cached = $ntree->loadJoinActive(vartrue($parms['category'], 0), false, $treeparm)->render($template, $parms, true);

View File

@ -36,12 +36,11 @@ if(false === $cached)
$marray = array(BLOGCAL_M1, BLOGCAL_M2, BLOGCAL_M3, BLOGCAL_M4,
BLOGCAL_M5, BLOGCAL_M6, BLOGCAL_M7, BLOGCAL_M8,
BLOGCAL_M9, BLOGCAL_M10, BLOGCAL_M11, BLOGCAL_M12);
$pref['blogcal_ws'] = "monday";
// TODO parms
//$parms['year'] = "2011 0";
if($parms['year'])
if(vartrue($parms['year']))
{
$date = $parms['year'];
list($cur_year, $cur_month) = explode(" ", date($date));

View File

@ -19,7 +19,7 @@ class plugin_tagwords_url extends eUrlConfig
),
'allowVars' => array(
'q', 'page','type', 'sort', 'area', 's', 'so',
'q', 'page','type', 'sort', 'area',/* 's', 'so',*/
),
// rule set array

View File

@ -75,9 +75,10 @@ class tagwords
function loadPlugin()
{
global $pref;
if(is_array($pref['e_tagwords_list']))
$list = e107::getPref('e_tagwords_list');
if($list && is_array($list))
{
foreach($pref['e_tagwords_list'] as $e_tag)
foreach($list as $e_tag)
{
if(is_readable(e_PLUGIN.$e_tag."/e_tagwords.php"))
{

View File

@ -263,6 +263,7 @@ class tagwords_shortcodes
function sc_tag_button()
{
global $tag;
if(varsettrue($tag->pref['tagwords_view_sort']) || varsettrue($tag->pref['tagwords_view_style']) || varsettrue($tag->pref['tagwords_view_area']))
return "<input class='button' type='submit' name='so' value='".LAN_TAG_SEARCH_3."' />";
return '';
@ -317,7 +318,7 @@ class tagwords_shortcodes
{
global $tag;
$id = 'tagwords_view_sort';
$sel = ($tag->pref[$id] ? "checked='checked'" : "");
$sel = (isset($tag->pref[$id]) && $tag->pref[$id] ? "checked='checked'" : "");
return "
<label for='".$id."'>
<input type='checkbox' name='".$id."' id='".$id."' value='1' ".$sel." /> ".LAN_TAG_OPT_12."
@ -328,7 +329,7 @@ class tagwords_shortcodes
{
global $tag;
$id = 'tagwords_view_style';
$sel = ($tag->pref[$id] ? "checked='checked'" : "");
$sel = (isset($tag->pref[$id]) && $tag->pref[$id] ? "checked='checked'" : "");
return "
<label for='".$id."'>
<input type='checkbox' name='".$id."' id='".$id."' value='1' ".$sel." /> ".LAN_TAG_OPT_13."
@ -339,7 +340,7 @@ class tagwords_shortcodes
{
global $tag;
$id = 'tagwords_view_area';
$sel = ($tag->pref[$id] ? "checked='checked'" : "");
$sel = (isset($tag->pref[$id]) && $tag->pref[$id] ? "checked='checked'" : "");
return "
<label for='".$id."'>
<input type='checkbox' name='".$id."' id='".$id."' value='1' ".$sel." /> ".LAN_TAG_OPT_14."
@ -350,7 +351,7 @@ class tagwords_shortcodes
{
global $tag;
$id = ($sc_mode=='menu' ? 'tagwords_menu_view_search' : 'tagwords_view_search');
$sel = ($tag->pref[$id] ? "checked='checked'" : "");
$sel = (isset($tag->pref[$id]) && $tag->pref[$id] ? "checked='checked'" : "");
return "
<label for='".$id."'>
<input type='checkbox' name='".$id."' id='".$id."' value='1' ".$sel." /> ".LAN_TAG_OPT_19."
@ -368,7 +369,7 @@ class tagwords_shortcodes
{
$id = 'tagwords_view_freq';
}
$sel = ($tag->pref[$id] ? "checked='checked'" : "");
$sel = (isset($tag->pref[$id]) && $tag->pref[$id] ? "checked='checked'" : "");
return "
<label for='".$id."'>
<input type='checkbox' name='".$id."' id='".$id."' value='1' ".$sel." /> ".LAN_TAG_OPT_20."