cvs: pear /Pager Common.php
| From: | Lorenzo Alberton | Date: | Tue, 26 Oct 2004 09:55:06 +0000 |
| Subject: | cvs: pear /Pager Common.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-25233@lists.php.net to get a copy of this message | ||
quipo Tue Oct 26 05:55:06 2004 EDT
Modified files:
/pear/Pager Common.php
Log:
Pager can be used on a DirectoryIndex scrip, now (patch by ieure) [bug #2617]
http://cvs.php.net/diff.php/pear/Pager/Common.php?r1=1.22&r2=1.23&ty=u
Index: pear/Pager/Common.php
diff -u pear/Pager/Common.php:1.22 pear/Pager/Common.php:1.23
--- pear/Pager/Common.php:1.22 Mon Oct 18 16:18:16 2004
+++ pear/Pager/Common.php Tue Oct 26 05:55:05 2004
@@ -33,7 +33,7 @@
// | Lorenzo Alberton <l.alberton at quipo.it> |
// +-----------------------------------------------------------------------+
//
-// $Id: Common.php,v 1.22 2004/10/18 20:18:16 quipo Exp $
+// $Id: Common.php,v 1.23 2004/10/26 09:55:05 quipo Exp $
/**
* File Common.php
@@ -44,7 +44,11 @@
* Two constants used to guess the path- and file-name of the page
* when the user doesn't set any pther value
*/
-define('CURRENT_FILENAME', basename($_SERVER['PHP_SELF']));
+if (substr($_SERVER['PHP_SELF'], -1) == '/') {
+ define('CURRENT_FILENAME', '');
+} else {
+ define('CURRENT_FILENAME', basename($_SERVER['PHP_SELF']));
+}
define('CURRENT_PATHNAME', str_replace('\\', '/',
dirname($_SERVER['PHP_SELF'])));
/**
* Error codes
@@ -62,7 +66,7 @@
*
* @author Richard Heyes <richard@phpguru.org>,
* @author Lorenzo Alberton <l.alberton at quipo.it>
- * @version $Id: Common.php,v 1.22 2004/10/18 20:18:16 quipo Exp $
+ * @version $Id: Common.php,v 1.23 2004/10/26 09:55:05 quipo Exp $
* @package Pager
*/
class Pager_Common