mirror of
https://github.com/e107inc/e107.git
synced 2025-08-10 16:46:50 +02:00
Notice removal, eliminate DB queries
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/list_new/list_class.php,v $
|
||||
| $Revision: 1.3 $
|
||||
| $Date: 2007-05-31 21:02:53 $
|
||||
| $Revision: 1.4 $
|
||||
| $Date: 2007-08-08 19:34:34 $
|
||||
| $Author: e107steved $
|
||||
+---------------------------------------------------------------+
|
||||
*/
|
||||
@@ -120,8 +120,10 @@ class listclass {
|
||||
{
|
||||
global $sql, $sections, $titles, $content_types, $content_name;
|
||||
|
||||
if(!$content_install = $sql -> db_Select("plugin", "plugin_id", "plugin_path = 'content' AND plugin_installflag = '1' ")){
|
||||
return;
|
||||
// if(!$content_install = $sql -> db_Select("plugin", "plugin_id", "plugin_path = 'content' AND plugin_installflag = '1' "))
|
||||
if (!$content_install = isset($pref['plug_installed']['content']))
|
||||
{
|
||||
return;
|
||||
}
|
||||
$datequery = " AND (content_datestamp=0 || content_datestamp < ".time().") AND (content_enddate=0 || content_enddate>".time().") ";
|
||||
|
||||
@@ -160,7 +162,8 @@ class listclass {
|
||||
$tmp = array_reverse($tmp);
|
||||
$icon['fname'] = $tmp[1];
|
||||
|
||||
if($plugin_installed = $sql -> db_Select("plugin", "plugin_id", "plugin_path = '".$icon['fname']."' AND plugin_installflag = '1' "))
|
||||
// if($plugin_installed = $sql -> db_Select("plugin", "plugin_id", "plugin_path = '".$icon['fname']."' AND plugin_installflag = '1' "))
|
||||
if ($plugin_installed = isset($pref['plug_installed'][$icon['fname']]))
|
||||
{
|
||||
if($icon['fname'] == "content")
|
||||
{
|
||||
@@ -187,7 +190,8 @@ class listclass {
|
||||
{
|
||||
if(!in_array($sections[$i], $content_types))
|
||||
{
|
||||
if($plugin_installed = $sql -> db_Select("plugin", "plugin_id", "plugin_path = '".$tp -> toDB($sections[$i], true)."' AND plugin_installflag = '1' "))
|
||||
// if($plugin_installed = $sql -> db_Select("plugin", "plugin_id", "plugin_path = '".$tp -> toDB($sections[$i], true)."' AND plugin_installflag = '1' "))
|
||||
if ($plugin_installed = isset($pref['plug_installed'][$tp -> toDB($sections[$i], true)]))
|
||||
{
|
||||
$list_pref["$sections[$i]_recent_menu_caption"] = $sections[$i];
|
||||
$list_pref["$sections[$i]_recent_page_caption"] = $sections[$i];
|
||||
|
@@ -11,17 +11,17 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/list_new/list_recent_menu.php,v $
|
||||
| $Revision: 1.1.1.1 $
|
||||
| $Date: 2006-12-02 04:35:26 $
|
||||
| $Author: mcfly_e107 $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2007-08-08 19:34:34 $
|
||||
| $Author: e107steved $
|
||||
+---------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
if(!$sql -> db_Select("plugin", "*", "plugin_path = 'list_new' AND plugin_installflag = '1' ")){
|
||||
return;
|
||||
}
|
||||
if (!isset($pref['plug_installed']['list_new'])) return;
|
||||
|
||||
|
||||
|
||||
global $sysprefs, $tp, $eArrayStorage;
|
||||
$listplugindir = e_PLUGIN."list_new/";
|
||||
@@ -42,10 +42,13 @@ $arr = $rc -> prepareSectionArray($mode, $sections);
|
||||
|
||||
//display the sections
|
||||
$text = "";
|
||||
for($i=0;$i<count($arr);$i++){
|
||||
if($arr[$i][1] == "1"){
|
||||
for($i=0;$i<count($arr);$i++)
|
||||
{
|
||||
if($arr[$i][1] == "1")
|
||||
{
|
||||
$sectiontext = $rc -> show_section_list($arr[$i], $mode);
|
||||
if($sectiontext != ""){
|
||||
if($sectiontext != "")
|
||||
{
|
||||
$text .= $sectiontext;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user