mirror of
https://github.com/e107inc/e107.git
synced 2025-01-29 10:38:08 +01:00
Notice removal, eliminate DB queries
This commit is contained in:
parent
ee5bf62858
commit
8c320ad1de
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/pm/pm_func.php,v $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2007-05-28 11:18:18 $
|
||||
| $Revision: 1.3 $
|
||||
| $Date: 2007-08-08 19:34:34 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@ -53,7 +53,7 @@ function pm_getInfo($which = "inbox")
|
||||
}
|
||||
if(!isset($pm_info[$which]['limit']))
|
||||
{
|
||||
if($pref['pm_limits'] > 0)
|
||||
if(varset($pref['pm_limits'],0) > 0)
|
||||
{
|
||||
if($pref['pm_limits'] == 1)
|
||||
{
|
||||
|
@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/poll/poll_class.php,v $
|
||||
| $Revision: 1.4 $
|
||||
| $Date: 2007-08-06 19:16:28 $
|
||||
| $Revision: 1.5 $
|
||||
| $Date: 2007-08-08 19:34:34 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@ -286,9 +286,17 @@ class poll
|
||||
|
||||
if(count($voteArray))
|
||||
{
|
||||
foreach($voteArray as $votes){
|
||||
$percentage[] = round(($votes/$voteTotal) * 100, 2);
|
||||
foreach($voteArray as $votes)
|
||||
{
|
||||
if ($voteTotal > 0)
|
||||
{
|
||||
$percentage[] = round(($votes/$voteTotal) * 100, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
$percentage[] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* get template */
|
||||
if (file_exists(THEME."poll_template.php"))
|
||||
|
5
page.php
5
page.php
@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/page.php,v $
|
||||
| $Revision: 1.11 $
|
||||
| $Date: 2007-08-03 18:40:49 $
|
||||
| $Revision: 1.12 $
|
||||
| $Date: 2007-08-08 19:34:34 $
|
||||
| $Author: e107steved $
|
||||
|
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -288,6 +288,7 @@ class pageClass
|
||||
function pageIndex()
|
||||
{
|
||||
$count = 0;
|
||||
$itext = '';
|
||||
foreach($this -> pageTitles as $title)
|
||||
{
|
||||
if (!$count) { $itext = "<br /><br />"; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user