Demon has submitted this change and it was merged.

Change subject: Minor formatting changes
......................................................................


Minor formatting changes

Change-Id: If314cf0434f8f6e899eb2be1bd34a0b9abfb9a33
---
M utils/CommonUtils.php
M utils/ConferenceAccountUtils.php
M utils/ConferenceEventUtils.php
3 files changed, 32 insertions(+), 20 deletions(-)

Approvals:
  Demon: Verified; Looks good to me, approved
  Freakolowsky: Looks good to me, but someone else must approve



diff --git a/utils/CommonUtils.php b/utils/CommonUtils.php
index 6dcdd53..dc0ba0e 100644
--- a/utils/CommonUtils.php
+++ b/utils/CommonUtils.php
@@ -2,20 +2,22 @@
 class CommonUtils
 {
        public static $months = array(
-                               'Jan',
-                               'Feb',
-                               'Mar',
-                               'Apr',
-                               'May',
-                               'Jun',
-                               'Jul',
-                               'Aug',
-                               'Sep',
-                               'Oct',
-                               'Nov',
-                               'Dec');
+               'jan',
+               'feb',
+               'mar',
+               'apr',
+               'may',
+               'jun',
+               'jul',
+               'aug',
+               'sep',
+               'oct',
+               'nov',
+               'dec'
+       );
+
        /**
-        * Parse the string mmddyyyy into an associative array
+        * Converts the string mmddyyyy into an associative array
         * @param String $date
         * @param String $lang
         * @return Array
@@ -34,14 +36,13 @@
                $year = substr( $date, 4, 4 );
                $parsedDate['day'] = date( 'l', mktime( 0, 0, 0, $month, 
$monthDay, $year ) );
                $parsedDate['date'] = strlen( $monthDay ) == 1 ? '0' . 
$monthDay : $monthDay;
-               $index = $month - 1;
-               $monthText = self::$months[$index];
-               $monthKey = lcfirst( $monthText );
+               $monthKey = self::$months[$month - 1];
                $monthLocalisedText = $lang === 'contlang' ? wfMsgForContent( 
$monthKey ) : wfMsg( $monthKey );
                $parsedDate['month'] = $monthLocalisedText;
                $parsedDate['year'] = $year;
                return $parsedDate;
        }
+
        /**
         * Get the names of all the days between the startdate and the enddate
         * @param String $startDate
diff --git a/utils/ConferenceAccountUtils.php b/utils/ConferenceAccountUtils.php
index 20bd3c4..54f1ca1 100644
--- a/utils/ConferenceAccountUtils.php
+++ b/utils/ConferenceAccountUtils.php
@@ -1,4 +1,10 @@
 <?php
+/**
+ * This is a util class for performing read queries related to account info 
stored
+ * in the database.
+ * @author User:Chughakshay16/[email protected]
+ *
+ */
 class ConferenceAccountUtils 
 {
        /**
@@ -10,7 +16,7 @@
        public static function hasParentAccount( $userId ) {
 
                $dbr = wfGetDB( DB_SLAVE );
-               //if at all the parent account is present there will only be 
one row
+               /* if at all the parent account is present there will only be 
one row */
                $result = $dbr->select( 'page_props',
                        '*',
                        array(
@@ -22,6 +28,7 @@
                );
                return $dbr->numRows( $result ) ? true : false;
        }
+
        /**
         * 
         * Fetches username for the given sub-account page_id 
@@ -32,8 +39,12 @@
                /* if we dont use selectRow() we will end up with many rows 
with the same pp_value */
                $dbr = wfGetDB( DB_SLAVE );
                $result = $dbr->selectRow( 'page_props', 
-                               'pp_value',
-                               array( 'pp_page' => $subAccountId, 
'pp_propname' => 'cvext-account-parent' ) );
+                       'pp_value',
+                       array(
+                               'pp_page' => $subAccountId,
+                               'pp_propname' => 'cvext-account-parent'
+                       )
+               );
 
                if ( $result !== false ) {
                        $row = $dbr->selectRow( 'page_props', 
diff --git a/utils/ConferenceEventUtils.php b/utils/ConferenceEventUtils.php
index cb05d55..dc88b4b 100644
--- a/utils/ConferenceEventUtils.php
+++ b/utils/ConferenceEventUtils.php
@@ -3,7 +3,7 @@
 {
        /**
         * 
-        * checks if any event in a conference points to a location,
+        * Checks if any event in a conference points to a location,
         * here we are not checking for a conference because
         * at the time of creating an event we always point an event 
         * towards a location that is also part of the conference that this 
event

-- 
To view, visit https://gerrit.wikimedia.org/r/26936
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If314cf0434f8f6e899eb2be1bd34a0b9abfb9a33
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConventionExtension
Gerrit-Branch: master
Gerrit-Owner: Chughakshay16 <[email protected]>
Gerrit-Reviewer: Demon <[email protected]>
Gerrit-Reviewer: Freakolowsky <[email protected]>
Gerrit-Reviewer: preilly <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to