Index: trunk/phase3/maintenance/tests/SearchEngineTest.php |
— | — | @@ -34,12 +34,12 @@ |
35 | 35 | } |
36 | 36 | |
37 | 37 | function removeSearchData() { |
38 | | - return; |
39 | | - /*while ( count( $this->pageList ) ) { |
40 | | - list( $title, $id ) = array_pop( $this->pageList ); |
41 | | - $article = new Article( $title, $id ); |
42 | | - $article->doDeleteArticle( "Search Test" ); |
43 | | - }*/ |
| 38 | + return; |
| 39 | + /*while ( count( $this->pageList ) ) { |
| 40 | + list( $title, $id ) = array_pop( $this->pageList ); |
| 41 | + $article = new Article( $title, $id ); |
| 42 | + $article->doDeleteArticle( "Search Test" ); |
| 43 | + }*/ |
44 | 44 | } |
45 | 45 | |
46 | 46 | function fetchIds( $results ) { |
Index: trunk/phase3/includes/media/PNGMetadataExtractor.php |
— | — | @@ -33,12 +33,13 @@ |
34 | 34 | |
35 | 35 | $fh = fopen( $filename, 'r' ); |
36 | 36 | |
37 | | - if (!$fh) |
| 37 | + if (!$fh) { |
38 | 38 | throw new Exception( __METHOD__ . ": Unable to open file $filename" ); |
| 39 | + } |
39 | 40 | |
40 | 41 | // Check for the PNG header |
41 | 42 | $buf = fread( $fh, 8 ); |
42 | | - if ( !($buf == self::$png_sig) ) { |
| 43 | + if ( $buf != self::$png_sig ) { |
43 | 44 | throw new Exception( __METHOD__ . ": Not a valid PNG file; header: $buf" ); |
44 | 45 | } |
45 | 46 | |
— | — | @@ -46,21 +47,21 @@ |
47 | 48 | while( !feof( $fh ) ) { |
48 | 49 | $buf = fread( $fh, 4 ); |
49 | 50 | if( !$buf ) { |
50 | | - throw new Exception( __METHOD__ . ": Read error" ); |
51 | | - } |
| 51 | + throw new Exception( __METHOD__ . ": Read error" ); |
| 52 | + } |
52 | 53 | $chunk_size = unpack( "N", $buf); |
53 | 54 | $chunk_size = $chunk_size[1]; |
54 | 55 | |
55 | 56 | $chunk_type = fread( $fh, 4 ); |
56 | 57 | if( !$chunk_type ) { |
57 | | - throw new Exception( __METHOD__ . ": Read error" ); |
58 | | - } |
| 58 | + throw new Exception( __METHOD__ . ": Read error" ); |
| 59 | + } |
59 | 60 | |
60 | 61 | if ( $chunk_type == "acTL" ) { |
61 | 62 | $buf = fread( $fh, $chunk_size ); |
62 | 63 | if( !$buf ) { |
63 | | - throw new Exception( __METHOD__ . ": Read error" ); |
64 | | - } |
| 64 | + throw new Exception( __METHOD__ . ": Read error" ); |
| 65 | + } |
65 | 66 | |
66 | 67 | $actl = unpack( "Nframes/Nplays", $buf ); |
67 | 68 | $frameCount = $actl['frames']; |
— | — | @@ -68,8 +69,8 @@ |
69 | 70 | } elseif ( $chunk_type == "fcTL" ) { |
70 | 71 | $buf = fread( $fh, $chunk_size ); |
71 | 72 | if( !$buf ) { |
72 | | - throw new Exception( __METHOD__ . ": Read error" ); |
73 | | - } |
| 73 | + throw new Exception( __METHOD__ . ": Read error" ); |
| 74 | + } |
74 | 75 | $buf = substr( $buf, 20 ); |
75 | 76 | |
76 | 77 | $fctldur = unpack( "ndelay_num/ndelay_den", $buf ); |