php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57160 apc.php: wrong option values in sort fields select on Per-Directory summary
Submitted: 2006-07-27 10:59 UTC Modified: 2006-07-28 07:59 UTC
From: olivier dot clavel at gmail dot com Assigned:
Status: Closed Package: APC (PECL)
PHP Version: 5.1.4 OS: Debian Woody
Private report: No CVE-ID: None
 [2006-07-27 10:59 UTC] olivier dot clavel at gmail dot com
Description:
------------
When looking at the Per-Directory cache stats in apc.php, values in the select widget for sort field are wrong for the "Number of Files" and "Avg. Size" entries. Selecting either of these option leads to the wrong result.

Here is a patch locally made against a copy of revision 3.58 of apc.php in cvs tree.

Reproduce code:
---------------
####### diff -u apc-cvsREV3.58.php apc.php
--- apc-cvsREV3.58.php        2006-07-27 16:33:30.000000000 +0200
+++ apc.php     2006-07-27 16:33:55.000000000 +0200
@@ -1106,9 +1106,9 @@
                ", Sorting:<select name=SORT1>",
                "<option value=H",$MYREQUEST['SORT1']=='H' ? " selected":"",">Total Hits</option>",
                "<option value=Z",$MYREQUEST['SORT1']=='Z' ? " selected":"",">Total Size</option>",
-               "<option value=S",$MYREQUEST['SORT1']=='T' ? " selected":"",">Number of Files</option>",
+               "<option value=T",$MYREQUEST['SORT1']=='T' ? " selected":"",">Number of Files</option>",
                "<option value=S",$MYREQUEST['SORT1']=='S' ? " selected":"",">Directory Name</option>",
-               "<option value=M",$MYREQUEST['SORT1']=='A' ? " selected":"",">Avg. Size</option>",
+               "<option value=A",$MYREQUEST['SORT1']=='A' ? " selected":"",">Avg. Size</option>",
                "<option value=C",$MYREQUEST['SORT1']=='C' ? " selected":"",">Avg. Hits</option>",
                '</select>',
                '<select name=SORT2>',


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-27 11:45 UTC] gopalv82 at yahoo dot com
Nice catch.

Could not apply patch cleanly, so please check CVS to confirm whether the changes have been made correctly.
 [2006-07-28 07:59 UTC] olivier dot clavel at gmail dot com
Looks good. Cheers.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 13 22:01:31 2024 UTC