Index: trunk/extensions/QrCode/QrCode.php |
— | — | @@ -62,14 +62,22 @@ |
63 | 63 | $parser = array_shift($params); // we'll need the parser later |
64 | 64 | |
65 | 65 | // Handling "Undefined variable" notices |
66 | | - $margin = $ecc = $size = $boundary = $label = false; |
| 66 | + $margin = $ecc = $size = $label = false; |
67 | 67 | |
68 | 68 | foreach( $params as $pair ) { |
69 | 69 | $rpms = explode( '=', $pair ); |
70 | | - if( $rpms[0] == 'ecc' ) $ecc = $rpms[1]; |
71 | | - if( $rpms[0] == 'size' ) $size = $rpms[1]; |
72 | | - if( $rpms[0] == 'boundary' ) $margin = $rpms[1]; |
73 | | - if( $rpms[0] == 'label' ) $label = $rpms[1]; |
| 70 | + if( $rpms[0] == 'ecc' ) { |
| 71 | + $ecc = $rpms[1]; |
| 72 | + } |
| 73 | + if( $rpms[0] == 'size' ) { |
| 74 | + $size = $rpms[1]; |
| 75 | + } |
| 76 | + if( $rpms[0] == 'boundary' ) { |
| 77 | + $margin = $rpms[1]; |
| 78 | + } |
| 79 | + if( $rpms[0] == 'label' ) { |
| 80 | + $label = $rpms[1]; |
| 81 | + } |
74 | 82 | } |
75 | 83 | |
76 | 84 | $newQrCode = new MWQrCode( $parser, $ecc, $size, $margin ); |
— | — | @@ -82,7 +90,14 @@ |
83 | 91 | */ |
84 | 92 | class MWQrCode { |
85 | 93 | |
| 94 | + /** |
| 95 | + * @var Parser |
| 96 | + */ |
86 | 97 | private $_parser; // simply a link to the parser object |
| 98 | + |
| 99 | + /** |
| 100 | + * @var Title |
| 101 | + */ |
87 | 102 | private $_title; // the current page's title object |
88 | 103 | private $_label; // contents of the qrcode |
89 | 104 | private $_dstFileName; // what the file will be named? |
— | — | @@ -186,7 +201,7 @@ |
187 | 202 | $mUpload->initialize( $this->_dstFileName, $this->_tmpName, null ); // we don't know the filesize, how could we? |
188 | 203 | |
189 | 204 | $pageText = 'QrCode '.$this->_dstFileName.', generated on '.date( "r" ) |
190 | | - .' by the QrCode Extension for page [['.$this->_title->getFullText().']].'; |
| 205 | + .' by the QrCode Extension for page [['.$this->title->getFullText().']].'; |
191 | 206 | |
192 | 207 | wfDebug( 'UploadQrCodeJob::run: Uploading qrcode, c: '.$this->_uploadComment . ' t: ' . $pageText."\n" ); |
193 | 208 | $status = $mUpload->performUpload( $this->_uploadComment, $pageText, false, $this->_getBot() ); |