mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 21:27:25 +02:00
minor bugs, notice cleanup, missing e_SELF/e_QUERY fixes
This commit is contained in:
@@ -956,7 +956,7 @@ if(!defined("THEME_LAYOUT"))
|
|||||||
continue;
|
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) ? $lyout : "legacyCustom";
|
||||||
$def = $lyout;
|
$def = $lyout;
|
||||||
@@ -1078,7 +1078,8 @@ define('INIT', true);
|
|||||||
if(isset($_SERVER['HTTP_REFERER']))
|
if(isset($_SERVER['HTTP_REFERER']))
|
||||||
{
|
{
|
||||||
$tmp = explode("?", $_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
|
else
|
||||||
{
|
{
|
||||||
|
@@ -84,7 +84,7 @@ class core_news_url extends eUrlConfig
|
|||||||
if(isset($params['category_name']) && !empty($params['category_name'])) $params['category'] = $params['category_name'];
|
if(isset($params['category_name']) && !empty($params['category_name'])) $params['category'] = $params['category_name'];
|
||||||
|
|
||||||
$url = 'news.php?';
|
$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--';
|
else $page = '--FROM--';
|
||||||
|
|
||||||
if($route[0] == 'view')
|
if($route[0] == 'view')
|
||||||
|
@@ -41,7 +41,7 @@ class core_news_rewrite_url extends eUrlConfig
|
|||||||
public function create($route, $params = array(), $options = array())
|
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--';
|
else $page = '--FROM--';
|
||||||
if(!$route) $route = 'list/items';
|
if(!$route) $route = 'list/items';
|
||||||
|
|
||||||
|
@@ -1783,7 +1783,7 @@ class eRouter
|
|||||||
$urlSuffix = '';
|
$urlSuffix = '';
|
||||||
|
|
||||||
// Fix base url for legacy links
|
// 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'])
|
elseif(self::FORMAT_GET !== $config['format'])
|
||||||
{
|
{
|
||||||
$urlSuffix = $this->urlSuffix;
|
$urlSuffix = $this->urlSuffix;
|
||||||
|
@@ -675,7 +675,7 @@ class e_news_tree extends e_front_tree_model
|
|||||||
{
|
{
|
||||||
$vars->counter = $i;
|
$vars->counter = $i;
|
||||||
$batch->setScVar('news_item', $news->getData());
|
$batch->setScVar('news_item', $news->getData());
|
||||||
$ret[] = $parser->parseTemplate($template['item'], true, $obj, $vars);
|
$ret[] = $parser->parseTemplate($template['item'], true, $batch, $vars);
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -888,7 +888,7 @@ class e_news_category_tree extends e_front_tree_model
|
|||||||
if($ret)
|
if($ret)
|
||||||
{
|
{
|
||||||
$separator = varset($template['separator'], '');
|
$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;
|
$return = isset($parms['return']) ? true : false;
|
||||||
|
|
||||||
if($tablerender)
|
if($tablerender)
|
||||||
|
@@ -19,8 +19,8 @@ if(false === $cached)
|
|||||||
$template = e107::getTemplate('news', vartrue($parms['tmpl'], 'news_menu'), vartrue($parms['tmpl_key'], 'latest'));
|
$template = e107::getTemplate('news', vartrue($parms['tmpl'], 'news_menu'), vartrue($parms['tmpl_key'], 'latest'));
|
||||||
|
|
||||||
$treeparm = array();
|
$treeparm = array();
|
||||||
if($parms['count']) $treeparm['db_limit'] = '0, '.intval($parms['count']);
|
if(vartrue($parms['count'])) $treeparm['db_limit'] = '0, '.intval($parms['count']);
|
||||||
if($parms['order']) $treeparm['db_order'] = e107::getParser()->toDb($parms['order']);
|
if(vartrue($parms['order'])) $treeparm['db_order'] = e107::getParser()->toDb($parms['order']);
|
||||||
$parms['return'] = true;
|
$parms['return'] = true;
|
||||||
|
|
||||||
$cached = $ntree->loadJoinActive(vartrue($parms['category'], 0), false, $treeparm)->render($template, $parms, true);
|
$cached = $ntree->loadJoinActive(vartrue($parms['category'], 0), false, $treeparm)->render($template, $parms, true);
|
||||||
|
@@ -36,12 +36,11 @@ if(false === $cached)
|
|||||||
$marray = array(BLOGCAL_M1, BLOGCAL_M2, BLOGCAL_M3, BLOGCAL_M4,
|
$marray = array(BLOGCAL_M1, BLOGCAL_M2, BLOGCAL_M3, BLOGCAL_M4,
|
||||||
BLOGCAL_M5, BLOGCAL_M6, BLOGCAL_M7, BLOGCAL_M8,
|
BLOGCAL_M5, BLOGCAL_M6, BLOGCAL_M7, BLOGCAL_M8,
|
||||||
BLOGCAL_M9, BLOGCAL_M10, BLOGCAL_M11, BLOGCAL_M12);
|
BLOGCAL_M9, BLOGCAL_M10, BLOGCAL_M11, BLOGCAL_M12);
|
||||||
$pref['blogcal_ws'] = "monday";
|
|
||||||
|
|
||||||
|
|
||||||
// TODO parms
|
// TODO parms
|
||||||
//$parms['year'] = "2011 0";
|
//$parms['year'] = "2011 0";
|
||||||
if($parms['year'])
|
if(vartrue($parms['year']))
|
||||||
{
|
{
|
||||||
$date = $parms['year'];
|
$date = $parms['year'];
|
||||||
list($cur_year, $cur_month) = explode(" ", date($date));
|
list($cur_year, $cur_month) = explode(" ", date($date));
|
||||||
|
@@ -19,7 +19,7 @@ class plugin_tagwords_url extends eUrlConfig
|
|||||||
),
|
),
|
||||||
|
|
||||||
'allowVars' => array(
|
'allowVars' => array(
|
||||||
'q', 'page','type', 'sort', 'area', 's', 'so',
|
'q', 'page','type', 'sort', 'area',/* 's', 'so',*/
|
||||||
),
|
),
|
||||||
|
|
||||||
// rule set array
|
// rule set array
|
||||||
|
@@ -75,9 +75,10 @@ class tagwords
|
|||||||
function loadPlugin()
|
function loadPlugin()
|
||||||
{
|
{
|
||||||
global $pref;
|
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"))
|
if(is_readable(e_PLUGIN.$e_tag."/e_tagwords.php"))
|
||||||
{
|
{
|
||||||
|
@@ -263,6 +263,7 @@ class tagwords_shortcodes
|
|||||||
|
|
||||||
function sc_tag_button()
|
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']))
|
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 "<input class='button' type='submit' name='so' value='".LAN_TAG_SEARCH_3."' />";
|
||||||
return '';
|
return '';
|
||||||
@@ -317,7 +318,7 @@ class tagwords_shortcodes
|
|||||||
{
|
{
|
||||||
global $tag;
|
global $tag;
|
||||||
$id = 'tagwords_view_sort';
|
$id = 'tagwords_view_sort';
|
||||||
$sel = ($tag->pref[$id] ? "checked='checked'" : "");
|
$sel = (isset($tag->pref[$id]) && $tag->pref[$id] ? "checked='checked'" : "");
|
||||||
return "
|
return "
|
||||||
<label for='".$id."'>
|
<label for='".$id."'>
|
||||||
<input type='checkbox' name='".$id."' id='".$id."' value='1' ".$sel." /> ".LAN_TAG_OPT_12."
|
<input type='checkbox' name='".$id."' id='".$id."' value='1' ".$sel." /> ".LAN_TAG_OPT_12."
|
||||||
@@ -328,7 +329,7 @@ class tagwords_shortcodes
|
|||||||
{
|
{
|
||||||
global $tag;
|
global $tag;
|
||||||
$id = 'tagwords_view_style';
|
$id = 'tagwords_view_style';
|
||||||
$sel = ($tag->pref[$id] ? "checked='checked'" : "");
|
$sel = (isset($tag->pref[$id]) && $tag->pref[$id] ? "checked='checked'" : "");
|
||||||
return "
|
return "
|
||||||
<label for='".$id."'>
|
<label for='".$id."'>
|
||||||
<input type='checkbox' name='".$id."' id='".$id."' value='1' ".$sel." /> ".LAN_TAG_OPT_13."
|
<input type='checkbox' name='".$id."' id='".$id."' value='1' ".$sel." /> ".LAN_TAG_OPT_13."
|
||||||
@@ -339,7 +340,7 @@ class tagwords_shortcodes
|
|||||||
{
|
{
|
||||||
global $tag;
|
global $tag;
|
||||||
$id = 'tagwords_view_area';
|
$id = 'tagwords_view_area';
|
||||||
$sel = ($tag->pref[$id] ? "checked='checked'" : "");
|
$sel = (isset($tag->pref[$id]) && $tag->pref[$id] ? "checked='checked'" : "");
|
||||||
return "
|
return "
|
||||||
<label for='".$id."'>
|
<label for='".$id."'>
|
||||||
<input type='checkbox' name='".$id."' id='".$id."' value='1' ".$sel." /> ".LAN_TAG_OPT_14."
|
<input type='checkbox' name='".$id."' id='".$id."' value='1' ".$sel." /> ".LAN_TAG_OPT_14."
|
||||||
@@ -350,7 +351,7 @@ class tagwords_shortcodes
|
|||||||
{
|
{
|
||||||
global $tag;
|
global $tag;
|
||||||
$id = ($sc_mode=='menu' ? 'tagwords_menu_view_search' : 'tagwords_view_search');
|
$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 "
|
return "
|
||||||
<label for='".$id."'>
|
<label for='".$id."'>
|
||||||
<input type='checkbox' name='".$id."' id='".$id."' value='1' ".$sel." /> ".LAN_TAG_OPT_19."
|
<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';
|
$id = 'tagwords_view_freq';
|
||||||
}
|
}
|
||||||
$sel = ($tag->pref[$id] ? "checked='checked'" : "");
|
$sel = (isset($tag->pref[$id]) && $tag->pref[$id] ? "checked='checked'" : "");
|
||||||
return "
|
return "
|
||||||
<label for='".$id."'>
|
<label for='".$id."'>
|
||||||
<input type='checkbox' name='".$id."' id='".$id."' value='1' ".$sel." /> ".LAN_TAG_OPT_20."
|
<input type='checkbox' name='".$id."' id='".$id."' value='1' ".$sel." /> ".LAN_TAG_OPT_20."
|
||||||
|
Reference in New Issue
Block a user