summaryrefslogtreecommitdiff
path: root/list_content.php
diff options
context:
space:
mode:
authorJams H Thompson <jht001@users.sourceforge.net>2008-03-01 07:29:41 +0000
committerJams H Thompson <jht001@users.sourceforge.net>2008-03-01 07:29:41 +0000
commita6434d41f99663704d231df5dac1ef92aea7c30d (patch)
treecff6bb47bfa14a8cc93ad2117581d997b72749c3 /list_content.php
parent3f6cecd81bdba4fc9ea184a1d3b53be720eb18d6 (diff)
downloadliberty-a6434d41f99663704d231df5dac1ef92aea7c30d.tar.gz
liberty-a6434d41f99663704d231df5dac1ef92aea7c30d.tar.bz2
liberty-a6434d41f99663704d231df5dac1ef92aea7c30d.zip
remember records to display per page within session
Diffstat (limited to 'list_content.php')
-rw-r--r--list_content.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/list_content.php b/list_content.php
index aa708d1..8de00a0 100644
--- a/list_content.php
+++ b/list_content.php
@@ -3,7 +3,7 @@
* list_content
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.24 $
+ * @version $Revision: 1.25 $
* @package liberty
* @subpackage functions
*/
@@ -21,7 +21,21 @@ if( !empty( $_REQUEST['sort_mode'] )) {
$gBitSmarty->assign( 'sort_mode', $content_sort_mode );
}
-$max_content = ( !empty( $_REQUEST['max_records'] )) ? $_REQUEST['max_records'] : $gBitSystem->getConfig( 'max_records' );
+#$max_content = ( !empty( $_REQUEST['max_records'] )) ? $_REQUEST['max_records'] : $gBitSystem->getConfig( 'max_records' );
+
+if (!empty($_SESSION['liberty_records_per_page'])) {
+ $max_content = $_SESSION['liberty_records_per_page'];
+ }
+else {
+ $max_content = $gBitSystem->getConfig( 'max_records', 10 );
+ }
+if (!empty($_REQUEST["max_records"])) {
+ $max_content = $_REQUEST["max_records"];
+ $_SESSION['liberty_records_per_page'] = $max_content;
+}
+
+
+
$gBitSmarty->assign( 'user_id', @BitBase::verifyId( $_REQUEST['user_id'] ) ? $_REQUEST['user_id'] : NULL );
// now that we have all the offsets, we can get the content list