mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 11:50:30 +02:00
Notice removal, eliminate DB queries
This commit is contained in:
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/list_new/list_class.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/list_new/list_class.php,v $
|
||||||
| $Revision: 1.3 $
|
| $Revision: 1.4 $
|
||||||
| $Date: 2007-05-31 21:02:53 $
|
| $Date: 2007-08-08 19:34:34 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
+---------------------------------------------------------------+
|
+---------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -120,8 +120,10 @@ class listclass {
|
|||||||
{
|
{
|
||||||
global $sql, $sections, $titles, $content_types, $content_name;
|
global $sql, $sections, $titles, $content_types, $content_name;
|
||||||
|
|
||||||
if(!$content_install = $sql -> db_Select("plugin", "plugin_id", "plugin_path = 'content' AND plugin_installflag = '1' ")){
|
// if(!$content_install = $sql -> db_Select("plugin", "plugin_id", "plugin_path = 'content' AND plugin_installflag = '1' "))
|
||||||
return;
|
if (!$content_install = isset($pref['plug_installed']['content']))
|
||||||
|
{
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
$datequery = " AND (content_datestamp=0 || content_datestamp < ".time().") AND (content_enddate=0 || content_enddate>".time().") ";
|
$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);
|
$tmp = array_reverse($tmp);
|
||||||
$icon['fname'] = $tmp[1];
|
$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")
|
if($icon['fname'] == "content")
|
||||||
{
|
{
|
||||||
@@ -187,7 +190,8 @@ class listclass {
|
|||||||
{
|
{
|
||||||
if(!in_array($sections[$i], $content_types))
|
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_menu_caption"] = $sections[$i];
|
||||||
$list_pref["$sections[$i]_recent_page_caption"] = $sections[$i];
|
$list_pref["$sections[$i]_recent_page_caption"] = $sections[$i];
|
||||||
|
@@ -11,17 +11,17 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/list_new/list_recent_menu.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/list_new/list_recent_menu.php,v $
|
||||||
| $Revision: 1.1.1.1 $
|
| $Revision: 1.2 $
|
||||||
| $Date: 2006-12-02 04:35:26 $
|
| $Date: 2007-08-08 19:34:34 $
|
||||||
| $Author: mcfly_e107 $
|
| $Author: e107steved $
|
||||||
+---------------------------------------------------------------+
|
+---------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
|
|
||||||
if(!$sql -> db_Select("plugin", "*", "plugin_path = 'list_new' AND plugin_installflag = '1' ")){
|
if (!isset($pref['plug_installed']['list_new'])) return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
global $sysprefs, $tp, $eArrayStorage;
|
global $sysprefs, $tp, $eArrayStorage;
|
||||||
$listplugindir = e_PLUGIN."list_new/";
|
$listplugindir = e_PLUGIN."list_new/";
|
||||||
@@ -42,10 +42,13 @@ $arr = $rc -> prepareSectionArray($mode, $sections);
|
|||||||
|
|
||||||
//display the sections
|
//display the sections
|
||||||
$text = "";
|
$text = "";
|
||||||
for($i=0;$i<count($arr);$i++){
|
for($i=0;$i<count($arr);$i++)
|
||||||
if($arr[$i][1] == "1"){
|
{
|
||||||
|
if($arr[$i][1] == "1")
|
||||||
|
{
|
||||||
$sectiontext = $rc -> show_section_list($arr[$i], $mode);
|
$sectiontext = $rc -> show_section_list($arr[$i], $mode);
|
||||||
if($sectiontext != ""){
|
if($sectiontext != "")
|
||||||
|
{
|
||||||
$text .= $sectiontext;
|
$text .= $sectiontext;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/pm/pm_func.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/pm/pm_func.php,v $
|
||||||
| $Revision: 1.2 $
|
| $Revision: 1.3 $
|
||||||
| $Date: 2007-05-28 11:18:18 $
|
| $Date: 2007-08-08 19:34:34 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -53,7 +53,7 @@ function pm_getInfo($which = "inbox")
|
|||||||
}
|
}
|
||||||
if(!isset($pm_info[$which]['limit']))
|
if(!isset($pm_info[$which]['limit']))
|
||||||
{
|
{
|
||||||
if($pref['pm_limits'] > 0)
|
if(varset($pref['pm_limits'],0) > 0)
|
||||||
{
|
{
|
||||||
if($pref['pm_limits'] == 1)
|
if($pref['pm_limits'] == 1)
|
||||||
{
|
{
|
||||||
|
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/poll/poll_class.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/poll/poll_class.php,v $
|
||||||
| $Revision: 1.4 $
|
| $Revision: 1.5 $
|
||||||
| $Date: 2007-08-06 19:16:28 $
|
| $Date: 2007-08-08 19:34:34 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -286,9 +286,17 @@ class poll
|
|||||||
|
|
||||||
if(count($voteArray))
|
if(count($voteArray))
|
||||||
{
|
{
|
||||||
foreach($voteArray as $votes){
|
foreach($voteArray as $votes)
|
||||||
$percentage[] = round(($votes/$voteTotal) * 100, 2);
|
{
|
||||||
|
if ($voteTotal > 0)
|
||||||
|
{
|
||||||
|
$percentage[] = round(($votes/$voteTotal) * 100, 2);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$percentage[] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* get template */
|
/* get template */
|
||||||
if (file_exists(THEME."poll_template.php"))
|
if (file_exists(THEME."poll_template.php"))
|
||||||
|
5
page.php
5
page.php
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/page.php,v $
|
| $Source: /cvs_backup/e107_0.8/page.php,v $
|
||||||
| $Revision: 1.11 $
|
| $Revision: 1.12 $
|
||||||
| $Date: 2007-08-03 18:40:49 $
|
| $Date: 2007-08-08 19:34:34 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
|
|
|
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
@@ -288,6 +288,7 @@ class pageClass
|
|||||||
function pageIndex()
|
function pageIndex()
|
||||||
{
|
{
|
||||||
$count = 0;
|
$count = 0;
|
||||||
|
$itext = '';
|
||||||
foreach($this -> pageTitles as $title)
|
foreach($this -> pageTitles as $title)
|
||||||
{
|
{
|
||||||
if (!$count) { $itext = "<br /><br />"; }
|
if (!$count) { $itext = "<br /><br />"; }
|
||||||
|
Reference in New Issue
Block a user