Index: common/db/textblock.php
===================================================================
--- common/db/textblock.php	(revision 952)
+++ common/db/textblock.php	(working copy)
@@ -173,16 +173,17 @@
     ));
 }
 
-// Get all textblocks(without content) with a certain prefix).
+// Get all textblocks(without content) with a certain prefix.
 // Ordered by name.
-function textblock_get_changes($prefix, $content = false, $username = true, $count = 50) {
+function textblock_get_changes($prefix, $content = false, $username = true,
+                               $offset = 0, $count = 50) {
     return textblock_complex_query(array(
             'content' => $content,
             'username' => $username,
             'prefix' => $prefix,
             'history' => true,
             'order' => 'desc',
-            'limit_start' => 0,
+            'limit_start' => $offset,
             'limit_count' => $count,
     ));
 }
Index: www/config.php
===================================================================
--- www/config.php	(revision 952)
+++ www/config.php	(working copy)
@@ -32,8 +32,9 @@
 
 // Constrains and default value for pager display_rows.
 define('IA_PAGER_DEFAULT_DISPLAY_ENTRIES', 50);
-define('IA_PAGER_MAX_DISPLAY_ENTRIES', 200);
+define('IA_PAGER_MAX_DISPLAY_ENTRIES', 250);
 define('IA_PAGER_MIN_DISPLAY_ENTRIES', 3);
+$IA_PAGER_DISPLAY_ENTRIES_OPTIONS = array(25, 50, 100, 250);
 
 // User date formatting.
 // Everything in the database is UTC.
Index: www/controllers/changes.php
===================================================================
--- www/controllers/changes.php	(revision 952)
+++ www/controllers/changes.php	(working copy)
@@ -10,7 +10,9 @@
     $view = array();
     $title = 'Schimbari pe www.infoarena.ro';
     $prefix = request('prefix', '');
-    $revisions = textblock_get_changes($prefix, false, true, $pager_opts['display_entries']);
+    $revisions = textblock_get_changes($prefix, false, true,
+                                       $pager_opts["first_entry"],
+                                       $pager_opts['display_entries']);
 
     // FIXME: horrible horrible hack to add revision ids.
     $rev_ids = array();
Index: www/format/pager.php
===================================================================
--- www/format/pager.php	(revision 952)
+++ www/format/pager.php	(working copy)
@@ -44,7 +44,7 @@
         $display_entries = IA_PAGER_DEFAULT_DISPLAY_ENTRIES;
         log_warn("Bad display_entries");
     }
-    $display_entries = 
+    $display_entries =
             max(IA_PAGER_MIN_DISPLAY_ENTRIES,
             min($display_entries, IA_PAGER_MAX_DISPLAY_ENTRIES));
 
@@ -120,8 +120,8 @@
     log_assert($options['pager_style'] == "standard");
     $first_entry = getattr($options, 'first_entry', 0);
     $total_entries = getattr($options, 'total_entries', 0);
-    $show_count = getattr($options, 'show_count', false);   
-    $show_display_entries = getattr($options, 'show_display_entries', false); 
+    $show_count = getattr($options, 'show_count', false);
+    $show_display_entries = getattr($options, 'show_display_entries', false);
     $display_entries = getattr($options, 'display_entries', IA_PAGER_DEFAULT_DISPLAY_ENTRIES);
     $surround_pages = getattr($options, 'surround_pages', 5);
     $access_keys = getattr($options, 'use_digit_access_keys', true);
@@ -130,8 +130,6 @@
     assert(is_whole_number($first_entry));
     assert(is_whole_number($total_entries));
 
-    //log_print_r($options);
-
     $curpage = (int)($first_entry / $display_entries);
     $totpages = (int)(($total_entries + $display_entries - 1) / $display_entries);
 
@@ -139,13 +137,14 @@
 
 
     if ($show_display_entries) {
-        //FIXME: hardcoded numbers are bad
+        global $IA_PAGER_DISPLAY_ENTRIES_OPTIONS;
+        $links = array();
+        foreach ($IA_PAGER_DISPLAY_ENTRIES_OPTIONS as $num) {
+            $links[] = _format_standard_pager_link_with_text(array('display_entries' => $num) + $options, $num);
+        }
+
         $result .= '<span class="entries-per-page">(';
-        $result .= _format_standard_pager_link_with_text(array('display_entries' => '25') + $options, '25')."|";
-        $result .= _format_standard_pager_link_with_text(array('display_entries' => '50') + $options, '50')."|";
-        $result .= _format_standard_pager_link_with_text(array('display_entries' => '100') + $options, '100')."|";
-        $result .= _format_standard_pager_link_with_text(array('display_entries' => '250') + $options, '250')."|";
-        $result .= _format_standard_pager_link_with_text(array('display_entries' => '500') + $options, '500');
+        $result .= implode("|", $links);
         $result .= ")</span>";
     }
 
