Commit 4a27b88d authored by nyloth's avatar nyloth

[FIX] prefs: using maxRecords as a special global that is copied from the...

[FIX] prefs: using maxRecords as a special global that is copied from the pref. Assigning it to smarty as a reference as well. + Take care of users prefs defaults (based on users_prefs_'s prefs).
parent bb1a92ac
......@@ -108,7 +108,7 @@ function Ok() {
{if $prefs.direct_pagination eq 'y'}
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="fck_tikilink.php?find={$find}&amp;offset={$selector_offset}">{smarty.section.foo.index_next}</a>
{/section}
{/if}
......
......@@ -114,7 +114,7 @@ function Ok() {
{if $prefs.direct_pagination eq 'y'}
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="fck_tikilink.php?find={$find}&amp;offset={$selector_offset}">{smarty.section.foo.index_next}</a>
{/section}
{/if}
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/lib/setup/prefs.php,v 1.15 2007-10-14 13:17:00 nyloth Exp $
// $Header: /cvsroot/tikiwiki/tiki/lib/setup/prefs.php,v 1.16 2007-10-14 15:17:18 nyloth Exp $
// Copyright (c) 2002-2005, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for
......@@ -975,6 +975,13 @@ if ( ! $_SESSION['need_reload_prefs'] ) {
if ( is_array($v) ) $_SESSION['serialized_prefs'][] = $p;
}
// Be sure we have a default value for user prefs
foreach ( $prefs as $p => $v ) {
if ( substr($p, 0, 12) == 'users_prefs_' ) {
$prefs[substr($p, 12)] = $v;
}
}
// Override default prefs with values specified in database
$tikilib->get_db_preferences();
......@@ -998,5 +1005,9 @@ if ( ! $_SESSION['need_reload_prefs'] ) {
// Assign the prefs array in smarty, by reference
$smarty->assign_by_ref('prefs', $_SESSION['prefs']);
// Define the special maxRecords global var
$maxRecords = $prefs['maxRecords'];
$smarty->assign_by_ref('maxRecords', $maxRecords);
// DEPRECATED: Use $prefs array instead of each global vars to access prefs ; this will be removed soon
extract($_SESSION['prefs']);
......@@ -55,7 +55,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="{$url}?nlId={$nlId}&amp;{$cur}_offset={$selector_offset}&amp;{$bak}_offset={$offset_bak}&amp;{$cur}_sort_mode={$sort_mode}&amp;{$bak}_sort_mode={$sort_mode_bak}&amp;cookietab={$tab}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
......@@ -93,7 +93,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-send_newsletters.php?find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
......@@ -93,7 +93,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-send_newsletters.php?find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
......@@ -89,7 +89,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-view_blog.php?find={$find}&amp;blogId={$blogId}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>
{/section}
......
......@@ -93,7 +93,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-send_newsletters.php?find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-admin-include-general.tpl,v 1.68 2007-10-12 07:55:49 nyloth Exp $ *}
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-admin-include-general.tpl,v 1.69 2007-10-14 15:17:19 nyloth Exp $ *}
<div class="cbox">
<div class="cbox-title">
......@@ -234,7 +234,7 @@
</tr><tr>
<td class="form"><label for="general-max_records">{tr}Maximum number of records in listings{/tr}:</label></td>
<td><input size="5" type="text" name="maxRecords" id="general-max_records"
value="{$prefs.maxRecords|escape}" /></td>
value="{$maxRecords|escape}" /></td>
</tr><tr>
<td class="form"><label for="feature_help">{tr}Help System{/tr}:</label></td>
......
{* $Id: tiki-admin_banning.tpl,v 1.32 2007-10-04 22:17:37 nyloth Exp $ *}
{* $Id: tiki-admin_banning.tpl,v 1.33 2007-10-14 15:17:19 nyloth Exp $ *}
{* this script (un/)checks all checkboxes with id 'banning-section' *}
<script type="text/javascript">
......@@ -167,7 +167,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-admin_banning.php?offset={$selector_offset}&amp;find={$find}">
{$smarty.section.foo.index_next}</a>
{/section}
......
......@@ -79,7 +79,7 @@ src='pics/icons/key.png' border='0' width='16' height='16' alt='{tr}Permissions{
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-admin_calendars.php?find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
......@@ -91,7 +91,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="{sameurl offset=$selector_offset}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
......@@ -181,7 +181,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="{sameurl offset=$selector_offset}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
......@@ -122,7 +122,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-admin_content_templates.php?find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
......@@ -82,7 +82,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-admin_cookies.php?find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-admin_drawings.tpl,v 1.31 2007-10-04 22:17:37 nyloth Exp $ *}
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-admin_drawings.tpl,v 1.32 2007-10-14 15:17:19 nyloth Exp $ *}
<h1><a class="pagetitle" href="tiki-admin_drawings.php">{tr}Admin drawings{/tr}</a>
......@@ -101,7 +101,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-admin_drawings.php?offset={$selector_offset}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
......@@ -60,7 +60,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-admin_dsn.php?find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
......@@ -56,7 +56,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-admin_external_wikis.php?find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-admin_hotwords.tpl,v 1.30 2007-10-04 22:17:38 nyloth Exp $ *}
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-admin_hotwords.tpl,v 1.31 2007-10-14 15:17:19 nyloth Exp $ *}
<h1><a class="pagetitle" href="tiki-admin_hotwords.php">{tr}Admin Hotwords{/tr}</a>
{if $prefs.feature_help eq 'y'}
......@@ -65,7 +65,7 @@ title="{tr}Delete{/tr}"><img src="pics/icons/cross.png" border="0" height="16" w
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-admin_hotwords.php?find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
......@@ -84,7 +84,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-admin_html_page_content.php?find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
......@@ -99,7 +99,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-admin_html_pages.php?find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-admin_menu_options.tpl,v 1.56 2007-10-08 23:14:17 sylvieg Exp $ *}
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-admin_menu_options.tpl,v 1.57 2007-10-14 15:17:19 nyloth Exp $ *}
<h1><a class="pagetitle" href="tiki-admin_menu_options.php?menuId={$menuId}">{tr}Admin Menu{/tr}: {$menu_info.name}</a><br /><br />
<span class="button2"><a href="tiki-admin_menus.php" class="linkbut">{tr}List menus{/tr}</a></span>
<span class="button2"><a href="tiki-admin_menus.php?menuId={$menuId}" class="linkbut">{tr}Edit this menu{/tr}</a></span></h1>
......@@ -164,7 +164,7 @@
{tr}Number of lines{/tr}
</td>
<td>
<input type="text" name="nbRecords" value="{if !empty($nbRecords)}{$nbRecords}{else}{$prefs.maxRecords}{/if}" size="3" />
<input type="text" name="nbRecords" value="{if !empty($nbRecords)}{$nbRecords}{else}{$maxRecords}{/if}" size="3" />
</td>
<td>
<input type="submit" value="{tr}Find{/tr}" name="search" />
......@@ -250,7 +250,7 @@ title="{tr}Delete{/tr}"><img src="pics/icons/cross.png" border="0" height="16" w
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-admin_menu_options.php?find={$find}&amp;menuId={$menuId}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}{if !empty($nbRecords)}&amp;nbRecords={$nbRecords}{/if}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
......@@ -92,7 +92,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-admin_menus.php?find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>
{/section}
......
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-admin_newsletter_subscriptions.tpl,v 1.31 2007-10-04 22:17:38 nyloth Exp $ *}
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-admin_newsletter_subscriptions.tpl,v 1.32 2007-10-14 15:17:19 nyloth Exp $ *}
<h1><a class="pagetitle" href="tiki-admin_newsletter_subscriptions.php?nlId={$nlId}">{tr}Admin newsletter subscriptions{/tr}</a></h1>
<div class="navbar">
......@@ -184,7 +184,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-admin_newsletter_subscriptions.php?nlId={$nlId}&amp;find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-admin_newsletters.tpl,v 1.39 2007-10-04 22:17:38 nyloth Exp $ *}
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-admin_newsletters.tpl,v 1.40 2007-10-14 15:17:19 nyloth Exp $ *}
<h1><a class="pagetitle" href="tiki-admin_newsletters.php">{tr}Admin newsletters{/tr}</a>
{if $prefs.feature_help eq 'y'}
......@@ -107,7 +107,7 @@ border="0" width="16" height="16" alt="{tr}Assign Permissions{/tr}" src="pics/ic
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-admin_newsletters.php?find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
......@@ -21,7 +21,7 @@
<input type="hidden" name="find" value="{$find|escape}" />
<input type="hidden" name="sort_mode" value="{$sort_mode|escape}" />
{if $offset}<input type="hidden" name="offset" value="{$offset|escape}" />{/if}
{if $numrows ne $prefs.maxRecords and $numrows}<input type="hidden" name="numrows" value="{$numrows|escape}" />{/if}
{if $numrows ne $maxRecords and $numrows}<input type="hidden" name="numrows" value="{$numrows|escape}" />{/if}
<tr><td class="formcolor">{tr}Event{/tr}:</td>
<td class="formcolor">
<select name="event">
......@@ -54,7 +54,7 @@
<form method="get" action="tiki-admin_notifications.php">
<input type="text" name="find" value="{$find|escape}" />
<input type="submit" value="{tr}Find{/tr}" name="search" />
{tr}Number of displayed rows{/tr}<input type="text" size="4" name="numrows" value="{if $numrows}{$numrows}{else}{$prefs.maxRecords}{/if}" />
{tr}Number of displayed rows{/tr}<input type="text" size="4" name="numrows" value="{if $numrows}{$numrows}{else}{$maxRecords}{/if}" />
<input type="hidden" name="sort_mode" value="{$sort_mode|escape}" />
</form>
</td>
......@@ -62,10 +62,10 @@
</table>
<table class="normal">
<tr>
<td class="heading"><a class="tableheading" href="tiki-admin_notifications.php?sort_mode={if $sort_mode eq 'event_desc'}event_asc{else}event_desc{/if}{if $offset}&amp;offset={$offset}{/if}{if $numrows ne $prefs.maxRecords}&amp;numrows={$numrows}{/if}">{tr}Event{/tr}</a></td>
<td class="heading"><a class="tableheading" href="tiki-admin_notifications.php?sort_mode={if $sort_mode eq 'object_desc'}object_asc{else}object_desc{/if}{if $offset}&amp;offset={$offset}{/if}{if $numrows ne $prefs.maxRecords}&amp;numrows={$numrows}{/if}">{tr}Object{/tr}</a></td>
<td class="heading"><a class="tableheading" href="tiki-admin_notifications.php?sort_mode={if $sort_mode eq 'email_desc'}email_asc{else}email_desc{/if}{if $offset}&amp;offset={$offset}{/if}{if $numrows ne $prefs.maxRecords}&amp;numrows={$numrows}{/if}">{tr}eMail{/tr}</a></td>
<td class="heading"><a class="tableheading" href="tiki-admin_notifications.php?sort_mode={if $sort_mode eq 'user_desc'}user_asc{else}user_desc{/if}{if $offset}&amp;offset={$offset}{/if}{if $numrows ne $prefs.maxRecords}&amp;numrows={$numrows}{/if}">{tr}User{/tr}</a></td>
<td class="heading"><a class="tableheading" href="tiki-admin_notifications.php?sort_mode={if $sort_mode eq 'event_desc'}event_asc{else}event_desc{/if}{if $offset}&amp;offset={$offset}{/if}{if $numrows ne $maxRecords}&amp;numrows={$numrows}{/if}">{tr}Event{/tr}</a></td>
<td class="heading"><a class="tableheading" href="tiki-admin_notifications.php?sort_mode={if $sort_mode eq 'object_desc'}object_asc{else}object_desc{/if}{if $offset}&amp;offset={$offset}{/if}{if $numrows ne $maxRecords}&amp;numrows={$numrows}{/if}">{tr}Object{/tr}</a></td>
<td class="heading"><a class="tableheading" href="tiki-admin_notifications.php?sort_mode={if $sort_mode eq 'email_desc'}email_asc{else}email_desc{/if}{if $offset}&amp;offset={$offset}{/if}{if $numrows ne $maxRecords}&amp;numrows={$numrows}{/if}">{tr}eMail{/tr}</a></td>
<td class="heading"><a class="tableheading" href="tiki-admin_notifications.php?sort_mode={if $sort_mode eq 'user_desc'}user_asc{else}user_desc{/if}{if $offset}&amp;offset={$offset}{/if}{if $numrows ne $maxRecords}&amp;numrows={$numrows}{/if}">{tr}User{/tr}</a></td>
<td class="heading">{tr}Action{/tr}</td>
</tr>
{cycle print=false values="even,odd"}
......@@ -95,7 +95,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-admin_notifications.php?find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
{* $Id: tiki-admin_polls.tpl,v 1.36 2007-10-12 07:55:50 nyloth Exp $ *}
{* $Id: tiki-admin_polls.tpl,v 1.37 2007-10-14 15:17:20 nyloth Exp $ *}
<h1><a class="pagetitle" href="tiki-admin_polls.php">{tr}Admin Polls{/tr}</a>
{if $prefs.feature_help eq 'y'}
......@@ -98,7 +98,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-admin_polls.php?find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
......@@ -70,7 +70,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" {ajax_href template="tiki-admin_quicktags_content.tpl" htmlelement="quicktags-content"}tiki-admin_quicktags.php?find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}&amp;category={$category}{/ajax_href}}>
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
......@@ -147,7 +147,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-admin_rssmodules.php?find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
......@@ -60,7 +60,7 @@ title="{tr}Delete{/tr}"><img src="pics/icons/cross.png" border="0" height="16" w
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-admin_shoutbox_words.php?find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
......@@ -80,7 +80,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-admin_survey_questions.php?surveyId={$surveyId}&amp;find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-admin_surveys.tpl,v 1.31 2007-10-04 22:17:38 nyloth Exp $ *}
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-admin_surveys.tpl,v 1.32 2007-10-14 15:17:20 nyloth Exp $ *}
<h1><a class="pagetitle" href="tiki-admin_surveys.php">{tr}Admin surveys{/tr}</a>
{if $prefs.feature_help eq 'y'}
<a href="{$prefs.helpurl}Surveys" target="tikihelp" class="tikihelp" title="{tr}Surveys{/tr}">
......@@ -114,7 +114,7 @@
</tr>
{/section}
</table>
<!-- the little page adjust... need to find the $prefs.maxRecords value so that we can set that to a user controlled value-->
<!-- the little page adjust... need to find the $maxRecords value so that we can set that to a user controlled value-->
<div class="mini">
{if $prev_offset >= 0}
......@@ -127,7 +127,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-admin_surveys.php?find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-adminusers.tpl,v 1.110 2007-10-04 22:17:38 nyloth Exp $ *}
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-adminusers.tpl,v 1.111 2007-10-14 15:17:20 nyloth Exp $ *}
{popup_init src="lib/overlib.js"}
<h1><a href="tiki-adminusers.php" class="pagetitle">{tr}Admin users{/tr}</a>
......@@ -221,7 +221,7 @@ title="{tr}Delete{/tr}"><img src="pics/icons/cross.png" border="0" height="16" w
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-adminusers.php?find={$find|escape:"url"}&amp;{if $initial}initial={$initial}&amp;{/if}offset={$selector_offset}&amp;numrows={$numrows}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
......
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-ajax_table.tpl,v 1.5 2007-10-04 22:17:38 nyloth Exp $ *}
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-ajax_table.tpl,v 1.6 2007-10-14 15:17:20 nyloth Exp $ *}
<form action="" method="">
<input type="hidden" name="sort_mode" value="{$sort_mode|escape}" />
<input type="hidden" name="tag" value="{$tag|escape}" />
......@@ -13,7 +13,7 @@
<th><a href="javascript:setSortMode('{$ajax_cols[j][0]}_desc')" id="ajax_{$ajax_cols[j][0]}Header">{$ajax_cols[j][0]}</a></th>
{/section}
</tr>
{section name=i start=0 loop=$prefs.maxRecords step=1}
{section name=i start=0 loop=$maxRecords step=1}
<tr class="freetagObject {if $smarty.section.i.index is even}odd{else}even{/if}">
{section name="j" start=0 loop=$ajax_cols step=1}
{if $ajax_cols[j][1] eq "innerHTML"}
......@@ -27,9 +27,9 @@
</table>
<div class="mini">
[<a class="prevnext" href="javascript:setOffset(-{$prefs.maxRecords});">{tr}Prev{/tr}</a>]&nbsp;
[<a class="prevnext" href="javascript:setOffset(-{$maxRecords});">{tr}Prev{/tr}</a>]&nbsp;
{tr}Page{/tr}: <span id="actual_page">1</span>/<span id="cant_pages"></span>
&nbsp;[<a class="prevnext" href="javascript:setOffset({$prefs.maxRecords});">{tr}Next{/tr}</a>]
&nbsp;[<a class="prevnext" href="javascript:setOffset({$maxRecords});">{tr}Next{/tr}</a>]
{if $prefs.direct_pagination eq 'y'}
<br />
......
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-assignuser.tpl,v 1.41 2007-10-04 22:17:38 nyloth Exp $ *}
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-assignuser.tpl,v 1.42 2007-10-14 15:17:20 nyloth Exp $ *}
<h1><a href="tiki-assignuser.php?assign_user={$assign_user|escape:url}" class="pagetitle">{tr}Assign User {$assign_user} to Groups{/tr}</a></h1>
......@@ -21,7 +21,7 @@
{foreach from=$user_info.groups item=what key=grp}
{if $what eq 'included'}<i>{/if}{$grp}{if $what eq 'included'}</i>{/if}
{if $grp != "Anonymous" && $grp != "Registered"}
(<a class="link" href="tiki-assignuser.php?offset={$offset}&amp;maxRecords={$prefs.maxRecords}&amp;sort_mode={$sort_mode}&amp;assign_user={$assign_user|escape:url}&amp;action=removegroup&amp;group={$grp|escape:url}" title="remove">x</a>)
(<a class="link" href="tiki-assignuser.php?offset={$offset}&amp;maxRecords={$maxRecords}&amp;sort_mode={$sort_mode}&amp;assign_user={$assign_user|escape:url}&amp;action=removegroup&amp;group={$grp|escape:url}" title="remove">x</a>)
{/if}&nbsp;&nbsp;
{/foreach}
</td></tr>
......@@ -34,7 +34,7 @@
{/foreach}
</select>
<input type="hidden" value="{$user_info.login}" name="login" />
<input type="hidden" value="{$prefs.maxRecords}" name="maxRecords" />
<input type="hidden" value="{$maxRecords}" name="maxRecords" />
<input type="hidden" value="{$offset}" name="offset" />
<input type="hidden" value="{$sort_mode}" name="sort_mode" />
<input type="submit" value="{tr}Set{/tr}" name="set_default" />
......@@ -51,7 +51,7 @@
<input type="submit" value="{tr}Find{/tr}" name="search" />
<input type="hidden" name="sort_mode" value="{$sort_mode|escape}" />
<input type="hidden" name="assign_user" value="{$assign_user|escape}" />
{tr}Number of displayed rows{/tr}</td><td class="findtitle"><input type="text" name="maxRecords" value="{$prefs.maxRecords|escape}" size="3" />
{tr}Number of displayed rows{/tr}</td><td class="findtitle"><input type="text" name="maxRecords" value="{$maxRecords|escape}" size="3" />
</form>
</td>
</tr>
......@@ -59,8 +59,8 @@
<table class="normal">
<tr>
<td class="heading"><a class="tableheading" href="tiki-assignuser.php?assign_user={$assign_user|escape:url}&amp;offset={$offset}&amp;maxRecords={$prefs.maxRecords}&amp;sort_mode={if $sort_mode eq 'groupName_desc'}groupName_asc{else}groupName_desc{/if}">{tr}Name{/tr}</a></td>
<td class="heading"><a class="tableheading" href="tiki-assignuser.php?assign_user={$assign_user|escape:url}&amp;offset={$offset}&amp;maxRecords={$prefs.maxRecords}&amp;sort_mode={if $sort_mode eq 'groupDesc_desc'}groupDesc_asc{else}groupDesc_desc{/if}">{tr}Description{/tr}</a></td>
<td class="heading"><a class="tableheading" href="tiki-assignuser.php?assign_user={$assign_user|escape:url}&amp;offset={$offset}&amp;maxRecords={$maxRecords}&amp;sort_mode={if $sort_mode eq 'groupName_desc'}groupName_asc{else}groupName_desc{/if}">{tr}Name{/tr}</a></td>
<td class="heading"><a class="tableheading" href="tiki-assignuser.php?assign_user={$assign_user|escape:url}&amp;offset={$offset}&amp;maxRecords={$maxRecords}&amp;sort_mode={if $sort_mode eq 'groupDesc_desc'}groupDesc_asc{else}groupDesc_desc{/if}">{tr}Description{/tr}</a></td>
<td class="heading">{tr}Action{/tr}</td>
</tr>
{cycle values="even,odd" print=false}
......@@ -72,9 +72,9 @@
<td class="{cycle advance=false}">{tr}{$users[user].groupDesc}{/tr}</td>
<td class="{cycle}">
{if $users[user].what ne 'real'}
<a class="link" href="tiki-assignuser.php?offset={$offset}&amp;maxRecords={$prefs.maxRecords}&amp;sort_mode={$sort_mode}&amp;action=assign&amp;group={$users[user].groupName|escape:url}&amp;assign_user={$assign_user|escape:url}" title="{tr}Assign User to Group{/tr}"><img src="pics/icons/accept.png" border="0" width="16" height="16" alt='{tr}Assign{/tr}' /></a>
<a class="link" href="tiki-assignuser.php?offset={$offset}&amp;maxRecords={$maxRecords}&amp;sort_mode={$sort_mode}&amp;action=assign&amp;group={$users[user].groupName|escape:url}&amp;assign_user={$assign_user|escape:url}" title="{tr}Assign User to Group{/tr}"><img src="pics/icons/accept.png" border="0" width="16" height="16" alt='{tr}Assign{/tr}' /></a>
{elseif $users[user].groupName ne "Registered"}
<a class="link" href="tiki-assignuser.php?offset={$offset}&amp;maxRecords={$prefs.maxRecords}&amp;sort_mode={$sort_mode}&amp;assign_user={$assign_user|escape:url}&amp;action=removegroup&amp;group={$users[user].groupName|escape:url}" title="unassign"><img src="pics/icons/cross.png" border="0" width="16" height="16" alt='{tr}Unassign{/tr}' /></a>
<a class="link" href="tiki-assignuser.php?offset={$offset}&amp;maxRecords={$maxRecords}&amp;sort_mode={$sort_mode}&amp;assign_user={$assign_user|escape:url}&amp;action=removegroup&amp;group={$users[user].groupName|escape:url}" title="unassign"><img src="pics/icons/cross.png" border="0" width="16" height="16" alt='{tr}Unassign{/tr}' /></a>
{/if}
</td></tr>
{/if}
......@@ -92,7 +92,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-assignuser.php?find={$find}&amp;assign_user={$assign_user|escape:url}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-browse_categories.tpl,v 1.31 2007-10-04 22:17:38 nyloth Exp $ *}
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-browse_categories.tpl,v 1.32 2007-10-14 15:17:20 nyloth Exp $ *}
<h1><a class="pagetitle" href="tiki-browse_categories.php">{if $parentId ne 0}{tr}Category{/tr} {$p_info.name}{else}{tr}Categories{/tr}{/if}</a></h1>
{if $parentId and $p_info.description}<div class="description">{$p_info.description}</div>{/if}
......@@ -138,7 +138,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-browse_categories.php?find={$find}&amp;deep={$deep}&amp;type={$type}&amp;parentId={$parentId}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}
</a>&nbsp;
......
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-browse_freetags.tpl,v 1.34 2007-10-13 00:17:15 nkoth Exp $ *}
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-browse_freetags.tpl,v 1.35 2007-10-14 15:17:20 nyloth Exp $ *}
{if $prefs.feature_ajax eq 'y'}
{include file='tiki-ajax_header.tpl' test=$test}
......@@ -190,7 +190,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-browse_freetags.php?tag={$tagString|escape:'url'}&find={$find|escape:'url'}&amp;type={$type|escape:'url'}&amp;offset={$selector_offset}{if $broaden}&amp;broaden={$broaden}{/if}">
{$smarty.section.foo.index_next}
</a>&nbsp;
......
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-charts.tpl,v 1.7 2007-10-04 22:17:39 nyloth Exp $ *}
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-charts.tpl,v 1.8 2007-10-14 15:17:20 nyloth Exp $ *}
{popup_init src="lib/overlib.js"}
<h1><a class="pagetitle" href="tiki-charts.php">{tr}Charts{/tr}</a></h1>
......@@ -50,7 +50,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="{sameurl offset=$selector_offset}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
......@@ -114,7 +114,7 @@ title="{tr}Delete{/tr}"><img src="pics/icons/cross_admin.png" border="0" height=
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-contacts.php?find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
......@@ -135,7 +135,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-directory_admin_categories.php?parent={$parent}&amp;find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
......
......@@ -88,7 +88,7 @@
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}