http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93532
Revision: 93532 Author: hartman Date: 2011-07-30 15:43:52 +0000 (Sat, 30 Jul 2011) Log Message: ----------- Rename javascriptize to headingTransform, to more accurately describe what it does. Restore use in WML. Modified Paths: -------------- trunk/extensions/MobileFrontend/MobileFrontend.php Modified: trunk/extensions/MobileFrontend/MobileFrontend.php =================================================================== --- trunk/extensions/MobileFrontend/MobileFrontend.php 2011-07-30 15:41:39 UTC (rev 93531) +++ trunk/extensions/MobileFrontend/MobileFrontend.php 2011-07-30 15:43:52 UTC (rev 93532) @@ -284,7 +284,7 @@ } } - private function showHideCallbackWML( $matches ) { + private function headingTransformCallbackWML( $matches ) { static $headings = 0; ++$headings; @@ -296,7 +296,7 @@ return $base; } - private function showHideCallbackXHTML( $matches ) { + private function headingTransformCallbackXHTML( $matches ) { if ( isset( $matches[0] ) ) { preg_match('/id="([^"]*)"/', $matches[0], $headlineMatches); @@ -329,8 +329,8 @@ return $base; } - public function javascriptize( $s ) { - $callback = 'showHideCallback'; + public function headingTransform( $s ) { + $callback = 'headingTransformCallback'; $callback .= $this->contentFormat; // Closures are a PHP 5.3 feature. @@ -510,7 +510,7 @@ if ( strlen( $contentHtml ) > 4000 && $this->contentFormat == 'XHTML' && self::$device['supports_javascript'] === true && empty( self::$search ) ) { - $contentHtml = $this->javascriptize( $contentHtml ); + $contentHtml = $this->headingTransform( $contentHtml ); } elseif ( $this->contentFormat == 'WML' ) { header( 'Content-Type: text/vnd.wap.wml' ); @@ -523,6 +523,9 @@ // table requires "columns" property // lang and dir officially unsupported (but often work on rtl phones) + // Add segmentation markers + $contentHtml = $this->headingTransform( $contentHtml ); + // Content wrapping $contentHtml = $this->createWMLCard( $contentHtml, $title ); require( 'views/layout/application.wml.php' ); _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs