Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2716
Modified Files:
serendipity_functions.inc.php index.php
Log Message:
use $serendipity['short_archives'] instead of a GET variable for displaying short archives, not to let the user screw up display by adding that switch to other display pages.
As well fix that *all* short links are shown, and not only 15 ($limit).
(Part of Bug #1009715)
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.402
retrieving revision 1.403
diff -u -d -r1.402 -r1.403
--- serendipity_functions.inc.php 21 Aug 2004 13:01:27 -0000 1.402
+++ serendipity_functions.inc.php 23 Aug 2004 08:50:01 -0000 1.403
@@ -630,6 +630,11 @@
$and = '';
+ if (isset($serendipity['short_archives']) && $serendipity['short_archives']) {
+ // In the short listing of all titles for a month, we don't want to have a limit applied.
+ $limit = '';
+ }
+
if ($full === true) {
$body = ', e.body, e.extended';
} else {
@@ -1156,7 +1161,7 @@
$bydate[$d][] = $entries[$x];
}
- if (!isset($serendipity['GET']['short']) || !$serendipity['GET']['short']) {
+ if (!isset($serendipity['short_archives']) || !$serendipity['short_archives']) {
foreach ($bydate as $date => $ents) {
?>
Index: index.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/index.php,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- index.php 21 Aug 2004 12:38:20 -0000 1.47
+++ index.php 23 Aug 2004 08:50:02 -0000 1.48
@@ -71,7 +71,7 @@
$range = $matches[1];
$_GET['serendipity']['action'] = 'read';
$_GET['serendipity']['range'] = $range;
- $_GET['serendipity']['short'] = true;
+ $serendipity['short_archives'] = true;
if (strlen($range) == 6) {
$date = date('m/Y', mktime(0,0,0, substr($range, 4, 6), 2, substr($range, 0, 4)));
|