Index: trunk/extensions/PatchOutputMobile/PatchOutputMobile.php |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | 'onOutputPageBeforeHTML' ); |
26 | 26 | |
27 | 27 | class ExtPatchOutputMobile { |
28 | | - const VERSION = '0.2.2'; |
| 28 | + const VERSION = '0.2.3'; |
29 | 29 | |
30 | 30 | private $doc; |
31 | 31 | |
— | — | @@ -61,11 +61,11 @@ |
62 | 62 | ); |
63 | 63 | |
64 | 64 | public function onOutputPageBeforeHTML( &$out, &$text ) { |
65 | | - ob_start( array( &$this, 'parse' ) ); |
| 65 | + ob_start( array( $this, 'parse' ) ); |
66 | 66 | return true; |
67 | 67 | } |
68 | 68 | |
69 | | - private function _show_hide_callback( $matches ) { |
| 69 | + private function showHideCallback( $matches ) { |
70 | 70 | static $headings = 0; |
71 | 71 | $show = 'Show'; |
72 | 72 | $hide = 'Hide'; |
— | — | @@ -95,7 +95,7 @@ |
96 | 96 | // So, using old style for now. |
97 | 97 | $s = preg_replace_callback( |
98 | 98 | '/<h2(.*)<span class="mw-headline" [^>]*>(.+)<\/span>\w*<\/h2>/', |
99 | | - array( &$this, '_show_hide_callback' ), |
| 99 | + array( $this, 'showHideCallback' ), |
100 | 100 | $s |
101 | 101 | ); |
102 | 102 | |
— | — | @@ -115,13 +115,13 @@ |
116 | 116 | return $this->DOMParse( $s ); |
117 | 117 | } |
118 | 118 | |
119 | | - private function _parse_items_to_remove() { |
| 119 | + private function parseItemsToRemove() { |
120 | 120 | $item_to_remove_records = array(); |
121 | 121 | |
122 | 122 | foreach ( $this->items_to_remove as $item_to_remove ) { |
123 | 123 | $type = ''; |
124 | 124 | $raw_name = ''; |
125 | | - CSS_detection::detect_id_css_or_tag( $item_to_remove, $type, $raw_name ); |
| 125 | + CssDetection::detectIdCssOrTag( $item_to_remove, $type, $raw_name ); |
126 | 126 | $item_to_remove_records[$type][] = $raw_name; |
127 | 127 | } |
128 | 128 | |
— | — | @@ -135,7 +135,7 @@ |
136 | 136 | $this->doc->preserveWhiteSpace = false; |
137 | 137 | $this->doc->strictErrorChecking = false; |
138 | 138 | |
139 | | - $item_to_remove_records = $this->_parse_items_to_remove(); |
| 139 | + $item_to_remove_records = $this->parseItemsToRemove(); |
140 | 140 | |
141 | 141 | // Tags |
142 | 142 | |
— | — | @@ -229,9 +229,9 @@ |
230 | 230 | } |
231 | 231 | } |
232 | 232 | |
233 | | -class CSS_detection { |
| 233 | +class CssDetection { |
234 | 234 | |
235 | | - public static function detect_id_css_or_tag( $snippet, &$type, &$raw_name ) { |
| 235 | + public static function detectIdCssOrTag( $snippet, &$type, &$raw_name ) { |
236 | 236 | $output = ''; |
237 | 237 | |
238 | 238 | if ( strpos( $snippet, '.' ) === 0 ) { |