cvs: pear /PEAR_Frontend_Web/Frontend Web.php

From: Date: Sat, 29 May 2004 10:30:48 +0000
Subject: cvs: pear /PEAR_Frontend_Web/Frontend Web.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-20035@lists.php.net to get a copy of this message
pajoye Sat May 29 06:30:48 2004 EDT Modified files: /pear/PEAR_Frontend_Web/Frontend Web.php Log: - Fix prev/next from the default page (which is now the installed packages) - Get the mode only once - Some fixes in the 'current' link http://cvs.php.net/diff.php/pear/PEAR_Frontend_Web/Frontend/Web.php?r1=1.24&r2=1.25&ty=u Index: pear/PEAR_Frontend_Web/Frontend/Web.php diff -u pear/PEAR_Frontend_Web/Frontend/Web.php:1.24 pear/PEAR_Frontend_Web/Frontend/Web.php:1.25 --- pear/PEAR_Frontend_Web/Frontend/Web.php:1.24 Tue May 25 16:59:37 2004 +++ pear/PEAR_Frontend_Web/Frontend/Web.php Sat May 29 06:30:48 2004 @@ -16,7 +16,7 @@ | Author: Christian Dickmann <dickmann@php.net> | +----------------------------------------------------------------------+ - $Id: Web.php,v 1.24 2004/05/25 20:59:37 pajoye Exp $ + $Id: Web.php,v 1.25 2004/05/29 10:30:48 pajoye Exp $ */ require_once "PEAR.php"; @@ -289,28 +289,28 @@ $to = $paging_data['next']; // Generate Linkinformation to redirect to _this_ page after performing an action - $link_str = '<a href="?command=%s&from=%s" class="paging_link">%s</a>'; - $links['current'] = '&from=' . $paging_data['from']; + $link_str = '<a href="?command=%s&from=%s&mode=%s" class="paging_link">%s</a>'; + + $command = isset($_GET['command']) ? $_GET['command']:'list-all'; + $mode = isset($_GET['mode'])?$_GET['mode']:''; + + if ($paging_data['from']>1) { - $links['back'] = sprintf($link_str, $command, $paging_data['prev'], '&lt;&lt;'); + $links['back'] = sprintf($link_str, $command, $paging_data['prev'], $mode, '&lt;&lt;'); } else { $links['back'] = ''; } if ( $paging_data['next']) { - $links['next'] = sprintf($link_str, $command, $paging_data['next'], '&gt;&gt;'); + $links['next'] = sprintf($link_str, $command, $paging_data['next'], $mode, '&gt;&gt;'); } else { $links['next'] = ''; } - if (isset($_GET['mode'])) { - $links['current'] .= '&mode='.$_GET['mode']; - } else { - $_GET['mode'] = ''; - } + $links['current'] = '&from=' . $paging_data['from'] . '&mode='.$_GET['mode']; if (isset($_GET['command']) && $_GET['command'] == 'search') { $links['current'] .= '&redirect=search&0='.$_REQUEST[0].'&1='.$_REQUEST[1];

« previous php.pear.cvs (#20035) next »