]> granicus.if.org Git - php/commitdiff
MFH
authorPierre Joye <pajoye@php.net>
Sun, 25 Jan 2004 23:42:43 +0000 (23:42 +0000)
committerPierre Joye <pajoye@php.net>
Sun, 25 Jan 2004 23:42:43 +0000 (23:42 +0000)
pear/CMD.php
pear/CODING_STANDARDS
pear/PEAR.php
pear/System.php
pear/package-Console_Getopt.xml
pear/package-PEAR.xml
pear/package.dtd

index ea578b29c2d0206e90a4cb7f5bad8a91949cd563..7e82ff24b588ba7de59d74820f2f9f2be20f8fb2 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 //
 // +----------------------------------------------------------------------+
-// | PHP Version 4                                                        |
+// | PHP Version 5                                                        |
 // +----------------------------------------------------------------------+
 // | Copyright (c) 1997-2004 The PHP Group                                |
 // +----------------------------------------------------------------------+
index b42a70fbb8ff88004475d29b37bc3ca958753e03..b443ea8004f9792db5ab092a99edbd33f10da985 100644 (file)
@@ -1,5 +1,5 @@
 ===========================================================================
-|| PEAR Coding Standards                                                 ||
+|  PEAR Coding Standards                                                  |
 ===========================================================================
 
 $Id$
index fcdf3ac36ac9262e334392a44f13e3b6662a6f85..7af397313c3b2e4bbccb8628825642cd2e2c7863 100644 (file)
@@ -232,8 +232,8 @@ class PEAR
      */
     function isError($data, $code = null)
     {
-        if (is_object($data) && (get_class($data) == 'pear_error' ||
-                                 is_subclass_of($data, 'pear_error'))) {
+        if (is_object($data) && (strtolower(get_class($data)) == 'pear_error' ||
+                                 is_subclass_of($data, 'PEAR_Error'))) {
             if (is_null($code)) {
                 return true;
             } elseif (is_string($code)) {
@@ -290,7 +290,7 @@ class PEAR
     function setErrorHandling($mode = null, $options = null)
     {
         if (isset($this) &&
-            (get_class($this) == 'pear' || is_subclass_of($this, 'pear'))) {
+            (strtolower(get_class($this)) == 'pear' || is_subclass_of($this, 'PEAR'))) {
             $setmode     = &$this->_default_error_mode;
             $setoptions  = &$this->_default_error_options;
         } else {
@@ -416,7 +416,7 @@ class PEAR
             // $error_code is a non-empty array here;
             // we walk through it trying to unset all
             // values
-            foreach($error_code AS $key => $error) {
+            foreach($error_code as $key => $error) {
                 if ($this->_checkDelExpect($error)) {
                     $deleted =  true;
                 } else {
@@ -538,7 +538,7 @@ class PEAR
      * @param string $message
      *
      */
-    function &throwError($message = null,
+    function throwError($message = null,
                          $code = null,
                          $userinfo = null)
     {
@@ -568,7 +568,7 @@ class PEAR
     {
         $stack = &$GLOBALS['_PEAR_error_handler_stack'];
         if (isset($this) &&
-            (get_class($this) == 'pear' || is_subclass_of($this, 'pear'))) {
+            (strtolower(get_class($this)) == 'pear' || is_subclass_of($this, 'PEAR'))) {
             $def_mode    = &$this->_default_error_mode;
             $def_options = &$this->_default_error_options;
         } else {
@@ -578,7 +578,7 @@ class PEAR
         $stack[] = array($def_mode, $def_options);
 
         if (isset($this) &&
-            (get_class($this) == 'pear' || is_subclass_of($this, 'pear'))) {
+            (strtolower(get_class($this)) == 'pear' || is_subclass_of($this, 'PEAR'))) {
             $this->setErrorHandling($mode, $options);
         } else {
             PEAR::setErrorHandling($mode, $options);
@@ -604,7 +604,7 @@ class PEAR
         list($mode, $options) = $stack[sizeof($stack) - 1];
         array_pop($stack);
         if (isset($this) &&
-            (get_class($this) == 'pear' || is_subclass_of($this, 'pear'))) {
+            (strtolower(get_class($this)) == 'pear' || is_subclass_of($this, 'PEAR'))) {
             $this->setErrorHandling($mode, $options);
         } else {
             PEAR::setErrorHandling($mode, $options);
index 2881a6a17a98d1e0cb9f2e9182b6e05e6a15b91c..1d5cd55aed1c67c6cdeaeb3af905f39a23a9be20 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 //
 // +----------------------------------------------------------------------+
-// | PHP Version 4                                                        |
+// | PHP Version 5                                                        |
 // +----------------------------------------------------------------------+
 // | Copyright (c) 1997-2004 The PHP Group                                |
 // +----------------------------------------------------------------------+
@@ -68,7 +68,7 @@ class System
         if (!is_array($argv) && $argv !== null) {
             $argv = preg_split('/\s+/', $argv);
         }
-        return Console_Getopt::getopt($argv, $short_options);
+        return Console_Getopt::getopt2($argv, $short_options);
     }
 
     /**
@@ -226,6 +226,14 @@ class System
             if ($opt[0] == 'p') {
                 $create_parents = true;
             } elseif($opt[0] == 'm') {
+                // if the mode is clearly an octal number (starts with 0)
+                // convert it to decimal
+                if (strlen($opt[1]) && $opt[1]{0} == '0') {
+                    $opt[1] = octdec($opt[1]);
+                } else {
+                    // convert to int
+                    $opt[1] += 0;
+                }
                 $mode = $opt[1];
             }
         }
index fa3275c2f3d337278a5270b48c5a805eb5ad3168..57769e6b9291cf2de530dec3a5523ec76fe4069e 100644 (file)
@@ -21,6 +21,12 @@ short and long options.</description>
       <name>Stig Bakken</name>
       <email>stig@php.net</email>
     </maintainer>
+    <maintainer>
+      <user>cellog</user>
+      <role>helper</role>
+      <name>Greg Beaver</name>
+      <email>cellog@php.net</email>
+    </maintainer>
   </maintainers>
   <release>
     <version>1.2</version>
@@ -28,9 +34,9 @@ short and long options.</description>
     <notes>Fix to preserve BC with 1.0 and allow correct behaviour for new users</notes>
     <state>stable</state>
     <filelist>
-     <dir name="Console">
-      <file role="php" name="Getopt.php"/>
-     </dir>
+      <dir name="Console">
+        <file role="php" name="Getopt.php"/>
+      </dir>
     </filelist>
   </release>
   <changelog>
@@ -46,29 +52,29 @@ short and long options.</description>
       </filelist>
     </release>
    <release>
-     <version>0.11</version>
-     <date>2002-05-26</date>
-     <notes>POSIX getopt compatibility fix: treat first element of args
-       array as command name
-     </notes>
-     <state>beta</state>
-     <filelist>
-       <dir name="Console">
-         <file role="php" name="Getopt.php"/>
-       </dir>
-     </filelist>
-   </release>
-   <release>
-     <version>0.10</version>
-     <date>2002-05-12</date>
-     <notes>Packaging fix</notes>
-     <state>beta</state>
-   </release>
-   <release>
-     <version>0.9</version>
-     <date>2002-05-12</date>
-     <notes>Initial release</notes>
-     <state>beta</state>
-   </release>
+      <version>0.11</version>
+      <date>2002-05-26</date>
+      <notes>POSIX getopt compatibility fix: treat first element of args
+        array as command name
+      </notes>
+      <state>beta</state>
+      <filelist>
+        <dir name="Console">
+          <file role="php" name="Getopt.php"/>
+        </dir>
+      </filelist>
+    </release>
+    <release>
+      <version>0.10</version>
+      <date>2002-05-12</date>
+      <notes>Packaging fix</notes>
+      <state>beta</state>
+    </release>
+    <release>
+      <version>0.9</version>
+      <date>2002-05-12</date>
+      <notes>Initial release</notes>
+      <state>beta</state>
+    </release>
   </changelog>
- </package>
+</package>
index 16a6b2b88b13a39583c3aac3b0f30e0c44f4ff5d..bed951bb1385a1dd7e9bc0de281d979e081fbc4a 100644 (file)
@@ -47,8 +47,8 @@
     </maintainer>
   </maintainers>
   <release>
-    <version>1.3b5</version>
-    <date>2003-12-19</date>
+    <version>1.3b6</version>
+    <date>2004-01-26</date>
     <state>beta</state>
     <notes>
 PEAR Installer:
@@ -58,6 +58,7 @@ PEAR Installer:
 * Bug #248 --force command does not work as expected
 * Bug #293 [Patch] PEAR_Error not calling static method callbacks for error-handler
 * Bug #324 pear -G gives Fatal Error (PHP-GTK not installed, but error is at engine level)
+* Bug #594 PEAR_Common::analyzeSourceCode fails on string with $var and {
 * Moved download code into its own class
 * Fully unit tested the installer, packager, downloader, and PEAR_Common
 
@@ -125,8 +126,8 @@ PEAR Installer:
       <dep type="pkg" rel="ge" version="1.1">Archive_Tar</dep>
       <dep type="pkg" rel="ge" version="1.2">Console_Getopt</dep>
       <dep type="pkg" rel="ge" version="1.0.4">XML_RPC</dep>
-      <dep type="ext" rel="has" optional="yes">xmlrpc</dep>
       <dep type="ext" rel="has">xml</dep>
+      <dep type="ext" rel="has">pcre</dep>
     </deps>
   </release>
 </package>
index 2474efadfafa7e1c48e39d66d76623154943360d..0c4c667a5d773eb817b1e96b51cf2b1446a58099 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-     $Id: package.dtd,v 1.27.4.9 2004-01-25 23:35:02 pajoye Exp $
+     $Id: package.dtd,v 1.27.4.10 2004-01-25 23:42:43 pajoye Exp $
 
      This is the PEAR package description, version 1.0.
      It should be used with the informal public identifier: