mirror of
https://github.com/e107inc/e107.git
synced 2025-08-22 14:13:03 +02:00
Code optimization for speed and reduced memory usage.
This commit is contained in:
@@ -165,7 +165,7 @@ class listclass
|
||||
function prepareSectionArray($mode)
|
||||
{
|
||||
//section reference
|
||||
for($i=0;$i<count($this->sections);$i++)
|
||||
for($i=0, $iMax = count($this->sections); $i< $iMax; $i++)
|
||||
{
|
||||
$s = $this->sections[$i];
|
||||
if(vartrue($this->list_pref[$s."_".$mode."_display"]) == '1')
|
||||
@@ -200,7 +200,7 @@ class listclass
|
||||
function getDefaultSections()
|
||||
{
|
||||
//default always present sections
|
||||
for($i=0;$i<count($this->defaultArray);$i++)
|
||||
for($i=0, $iMax = count($this->defaultArray); $i< $iMax; $i++)
|
||||
{
|
||||
$this->sections[] = $this->defaultArray[$i];
|
||||
$this->titles[] = $this->defaultArray[$i];
|
||||
@@ -293,7 +293,7 @@ class listclass
|
||||
|
||||
$prf = array();
|
||||
//section preferences
|
||||
for($i=0;$i<count($this->sections);$i++)
|
||||
for($i=0, $iMax = count($this->sections); $i< $iMax; $i++)
|
||||
{
|
||||
$s = $this->sections[$i];
|
||||
if(!in_array($this->sections[$i], $this->defaultArray))
|
||||
|
Reference in New Issue
Block a user