r90400 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90399‎ | r90400 | r90401 >
Date:16:55, 19 June 2011
Author:yaron
Status:deferred
Tags:
Comment:
Improved some formatting and comments
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_Utils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_Utils.php
@@ -7,8 +7,6 @@
88 * @ingroup SF
99 */
1010
11 -if ( !defined( 'MEDIAWIKI' ) ) die();
12 -
1311 class SFUtils {
1412
1513 /**
@@ -242,10 +240,12 @@
243241 $form_body .= "\t" . Html::hidden( 'wpEditToken', $wgUser->isLoggedIn() ? $wgUser->editToken() : EDIT_TOKEN_SUFFIX ) . "\n";
244242 $form_body .= "\t" . Html::hidden( $action, null ) . "\n";
245243
246 - if ( $is_minor_edit )
 244+ if ( $is_minor_edit ) {
247245 $form_body .= "\t" . Html::hidden( 'wpMinoredit' , null ) . "\n";
248 - if ( $watch_this )
 246+ }
 247+ if ( $watch_this ) {
249248 $form_body .= "\t" . Html::hidden( 'wpWatchthis', null ) . "\n";
 249+ }
250250 $text .= Xml::tags(
251251 'form',
252252 array(
@@ -292,7 +292,7 @@
293293
294294 /**
295295 * Javascript files to be added regardless of the MediaWiki version
296 - * (i.e., even if the ResourceLoader is installed).
 296+ * (i.e., even if the ResourceLoader exists).
297297 */
298298 public static function addJavascriptFiles( $parser ) {
299299 global $wgOut, $wgFCKEditorDir, $wgScriptPath, $wgJsMimeType;
@@ -320,7 +320,7 @@
321321
322322 /**
323323 * Includes the necessary Javascript and CSS files for the form
324 - * to display and work correctly
 324+ * to display and work correctly.
325325 *
326326 * Accepts an optional Parser instance, or uses $wgOut if omitted.
327327 */
@@ -612,13 +612,13 @@
613613 }
614614
615615 /**
616 - * Creates an array of values that match the specified source name and type,
617 - * for use by both Javascript autocompletion and comboboxes.
 616+ * Creates an array of values that match the specified source name and
 617+ * type, for use by both Javascript autocompletion and comboboxes.
618618 */
619619 public static function getAutocompleteValues( $source_name, $source_type ) {
620620 $names_array = array();
621 - // the query depends on whether this is a property, category, concept
622 - // or namespace
 621+ // The query depends on whether this is a property, category,
 622+ // concept or namespace.
623623 if ( $source_type == 'property' || $source_type == 'attribute' || $source_type == 'relation' ) {
624624 $names_array = self::getAllValuesForProperty( $source_name );
625625 } elseif ( $source_type == 'category' ) {