Update of /cvsroot/phpwsbb/phpwsbb/class
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25092/class
Modified Files:
Runtime.php
Log Message:
Applied Patch [1039265] "Latest Posts Block optimization"
Index: Runtime.php
===================================================================
RCS file: /cvsroot/phpwsbb/phpwsbb/class/Runtime.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** Runtime.php 17 Sep 2004 17:15:05 -0000 1.13
--- Runtime.php 8 Oct 2004 13:03:17 -0000 1.14
***************
*** 95,104 ****
$c=0;
$block = NULL;
! $result = $GLOBALS['core']->sqlSelect('mod_phpwsbb_threads', 'hidden', 0, 'lastpost DESC');
if($result) {
$block .= '<ul>';
foreach($result as $row) {
- if($c > $maxlatestthreads)
- break;
$thread = new PHPWSBB_Forum($row);
if(strlen($thread->getLabel()) > 15)
--- 95,102 ----
$c=0;
$block = NULL;
! $result = $GLOBALS['core']->sqlSelect('mod_phpwsbb_threads', 'hidden', 0, 'lastpost DESC', NULL, NULL, $maxlatestthreads);
if($result) {
$block .= '<ul>';
foreach($result as $row) {
$thread = new PHPWSBB_Forum($row);
if(strlen($thread->getLabel()) > 15)
***************
*** 106,118 ****
else
$lbl = $thread->getLabel();
- //$block .= PHPWS_Text::moduleLink($lbl, 'phpwsbb', array('PHPWSBB_MAN_OP'=>'view', 'PHPWS_MAN_ITEMS'=>$thread->getId())).'<br />';
$block .= '<li>' . PHPWS_Text::moduleLink($lbl, 'phpwsbb', array('PHPWSBB_MAN_OP'=>'view', 'PHPWS_MAN_ITEMS'=>$thread->getId())) . '</li>';
$c++;
}
$block .= '</ul>';
}
-
- $GLOBALS['CNT_phpwsbb_latestthreadsblock']['title'] = $latestthreadsblocktitle;
- $GLOBALS['CNT_phpwsbb_latestthreadsblock']['content'] = $block;
}
}// END FUNC showLatestThreadsBlock
--- 104,114 ----
else
$lbl = $thread->getLabel();
$block .= '<li>' . PHPWS_Text::moduleLink($lbl, 'phpwsbb', array('PHPWSBB_MAN_OP'=>'view', 'PHPWS_MAN_ITEMS'=>$thread->getId())) . '</li>';
$c++;
}
$block .= '</ul>';
+ $GLOBALS['CNT_phpwsbb_latestthreadsblock']['title'] = $latestthreadsblocktitle;
+ $GLOBALS['CNT_phpwsbb_latestthreadsblock']['content'] = $block;
}
}
}// END FUNC showLatestThreadsBlock
|