[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-cvs
Subject:    [DOC-CVS] cvs: phpdoc /scripts reviewedcheck.php
From:       "Philip Olson" <philip () php ! net>
Date:       2008-12-29 22:09:13
Message-ID: cvsphilip1230588553 () cvsserver
[Download RAW message or body]

philip		Mon Dec 29 22:09:13 2008 UTC

  Modified files:              
    /phpdoc/scripts	reviewedcheck.php 
  Log:
  Eliminated a few E_NOTICE errors (with a touch of WS mixed in)
  
  
http://cvs.php.net/viewvc.cgi/phpdoc/scripts/reviewedcheck.php?r1=1.6&r2=1.7&diff_format=u
                
Index: phpdoc/scripts/reviewedcheck.php
diff -u phpdoc/scripts/reviewedcheck.php:1.6 phpdoc/scripts/reviewedcheck.php:1.7
--- phpdoc/scripts/reviewedcheck.php:1.6	Mon Dec 29 21:09:17 2008
+++ phpdoc/scripts/reviewedcheck.php	Mon Dec 29 22:09:13 2008
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-if ( $argv[1] == '--help' || $argc < 2 ) {
+if ( isset($argv[1]) && $argv[1] == '--help' || $argc < 2 ) {
 ?>
 
 Check the actual status of reviewed files against
@@ -133,8 +133,12 @@
 
 
 // Sort the result
-if( is_array($result['reviewed_no']) ) { ksort($result['reviewed_no']); }
-if( is_array($result['no_tag']) ) { ksort($result['no_tag']); }
+if (isset($result['reviewed_no']) ) {
+    ksort($result['reviewed_no']); 
+}
+if (isset($result['no_tag'])) {
+    ksort($result['no_tag']);
+}
 
 // Rpint résult
 
@@ -267,32 +271,22 @@
 ';
 
 // List file with Reviewed's tag to no
-while( list($key, $val) = each($result['reviewed_no']) ) {
+if (isset($result['reviewed_no']) && count($result['reviewed_no']) > 0) {
 
-echo '
-<tr class="blue"><th colspan="2">'.$key.'</th></tr>
-';
+    while( list($key, $val) = each($result['reviewed_no']) ) {
 
-asort($val);
+        echo '<tr class="blue"><th colspan="2">'.$key.'</th></tr>';
 
- while( list($k, $v) = each($val) ) {
-
-$url = 'http://cvs.php.net/viewvc.cgi/' . preg_replace( "'^".$path_doc."'", \
                'phpdoc-'.$LANG.'/', $key.$v).'?view=markup';
-
-echo '
-<tr class="old">
- <td><a href="'.$url.'">'.$v.'</a></td>
- <td class="c">'.intval(filesize($key.$v)/1024).'</td>
-</tr>
-';
+        asort($val);
 
- } // end of for
+        while( list($k, $v) = each($val) ) {
 
+            $url = 'http://cvs.php.net/viewvc.cgi/' . preg_replace( \
"'^".$path_doc."'", 'phpdoc-'.$LANG.'/', $key.$v).'?view=markup';  
-} // end of while
+            echo '<tr class="old"><td><a href="'.$url.'">'.$v.'</a></td><td \
class="c">'.intval(filesize($key.$v)/1024).'</td></tr>';  
-echo '
-</table>
-</html>';
+        }
+    }
 
-?>
+    echo '</table></html>';
+}
\ No newline at end of file



-- 
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic