Completed
Push — 1.10.x ( 90a383...61feb9 )
by Angel Fernando Quiroz
39:29
created
main/inc/lib/display.lib.php 1 patch
Indentation   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -49,12 +49,12 @@  discard block
 block discarded – undo
49 49
         );
50 50
     }
51 51
 
52
-     /**
53
-     * Displays the page header
54
-     * @param string The name of the page (will be showed in the page title)
55
-     * @param string Optional help file name
56
-     * @param string $page_header
57
-     */
52
+        /**
53
+         * Displays the page header
54
+         * @param string The name of the page (will be showed in the page title)
55
+         * @param string Optional help file name
56
+         * @param string $page_header
57
+         */
58 58
     public static function display_header($tool_name ='', $help = null, $page_header = null)
59 59
     {
60 60
         $origin = api_get_origin();
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
      */
449 449
     public static function display_normal_message($message, $filter = true, $returnValue = false)
450 450
     {
451
-    	$message = self::return_message($message, 'normal', $filter);
451
+        $message = self::return_message($message, 'normal', $filter);
452 452
         if ($returnValue) {
453 453
             return $message;
454 454
         } else {
@@ -524,22 +524,22 @@  discard block
 block discarded – undo
524 524
     public static function return_message($message, $type = 'normal', $filter = true)
525 525
     {
526 526
         if ($filter) {
527
-        	$message = api_htmlentities($message, ENT_QUOTES, api_is_xml_http_request() ? 'UTF-8' : api_get_system_encoding());
527
+            $message = api_htmlentities($message, ENT_QUOTES, api_is_xml_http_request() ? 'UTF-8' : api_get_system_encoding());
528 528
         }
529 529
 
530 530
         $class = "";
531 531
         switch($type) {
532 532
             case 'warning':
533 533
                $class .= 'alert alert-warning';
534
-               break;
534
+                break;
535 535
             case 'error':
536 536
                $class .= 'alert alert-danger';
537
-               break;
537
+                break;
538 538
             case 'confirmation':
539 539
             case 'confirm':
540 540
             case 'success':
541 541
                 $class .= 'alert alert-success';
542
-               break;
542
+                break;
543 543
             case 'normal':
544 544
             default:
545 545
                 $class .= 'alert alert-info';
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
      * @param array    additional attributes (for instance height, width, onclick, ...)
683 683
      * @param integer  The wanted width of the icon (to be looked for in the corresponding img/icons/ folder)
684 684
      * @return void
685
-    */
685
+     */
686 686
     public static function display_icon(
687 687
         $image,
688 688
         $alt_text = '',
@@ -705,7 +705,7 @@  discard block
 block discarded – undo
705 705
      * @author Julio Montoya 2010 Function improved, adding image constants
706 706
      * @author Yannick Warnier 2011 Added size handler
707 707
      * @version Feb 2011
708
-    */
708
+     */
709 709
     public static function return_icon(
710 710
         $image,
711 711
         $alt_text = '',
@@ -884,14 +884,14 @@  discard block
 block discarded – undo
884 884
      */
885 885
     public static function input($type, $name, $value, $attributes = array())
886 886
     {
887
-         if (isset($type)) {
888
-             $attributes['type']= $type;
889
-         }
890
-         if (isset($name)) {
891
-             $attributes['name']= $name;
892
-         }
893
-         if (isset($value)) {
894
-             $attributes['value']= $value;
887
+            if (isset($type)) {
888
+                $attributes['type']= $type;
889
+            }
890
+            if (isset($name)) {
891
+                $attributes['name']= $name;
892
+            }
893
+            if (isset($value)) {
894
+                $attributes['value']= $value;
895 895
         }
896 896
         return self::tag('input', '', $attributes);
897 897
     }
@@ -904,10 +904,10 @@  discard block
 block discarded – undo
904 904
      */
905 905
     public static function button($name, $value, $attributes = array())
906 906
     {
907
-    	if (!empty($name)) {
907
+        if (!empty($name)) {
908 908
             $attributes['name'] = $name;
909
-    	}
910
-    	return self::tag('button', $value, $attributes);
909
+        }
910
+        return self::tag('button', $value, $attributes);
911 911
     }
912 912
 
913 913
     /**
@@ -974,7 +974,7 @@  discard block
 block discarded – undo
974 974
      * in the $htmlHeadXtra variable before the display_header
975 975
      * Add this script
976 976
      * @example
977
-             * <script>
977
+     * <script>
978 978
                     $(function() {
979 979
                         $( "#tabs" ).tabs();
980 980
                     });
@@ -1035,20 +1035,20 @@  discard block
 block discarded – undo
1035 1035
      */
1036 1036
     public static function tabsOnlyLink($headers, $selected = null)
1037 1037
     {
1038
-         $id = uniqid();
1039
-         $i = 1;
1040
-         $lis = null;
1041
-         foreach ($headers as $item) {
1038
+            $id = uniqid();
1039
+            $i = 1;
1040
+            $lis = null;
1041
+            foreach ($headers as $item) {
1042 1042
             $class = null;
1043 1043
             if ($i == $selected) {
1044 1044
                 $class = 'active';
1045 1045
             }
1046
-             $item = self::tag(
1047
-                 'a',
1048
-                 $item['content'],
1049
-                 array('id' => $id.'-'.$i, 'href' => $item['url'])
1050
-             );
1051
-             $lis .= self::tag('li', $item, array('class' => $class));
1046
+                $item = self::tag(
1047
+                    'a',
1048
+                    $item['content'],
1049
+                    array('id' => $id.'-'.$i, 'href' => $item['url'])
1050
+                );
1051
+                $lis .= self::tag('li', $item, array('class' => $class));
1052 1052
             $i++;
1053 1053
         }
1054 1054
         return self::tag('ul', $lis, array('class' => 'nav nav-tabs tabs-margin'));
@@ -1260,8 +1260,8 @@  discard block
 block discarded – undo
1260 1260
      */
1261 1261
     public static function table($headers, $rows, $attributes = array())
1262 1262
     {
1263
-    	if (empty($attributes)) {
1264
-    		$attributes['class'] = 'data_table';
1263
+        if (empty($attributes)) {
1264
+            $attributes['class'] = 'data_table';
1265 1265
         }
1266 1266
         $table = new HTML_Table($attributes);
1267 1267
         $row = 0;
@@ -1269,17 +1269,17 @@  discard block
 block discarded – undo
1269 1269
 
1270 1270
         // Course headers
1271 1271
         if (!empty($headers)) {
1272
-	        foreach ($headers as $item) {
1273
-	            $table->setHeaderContents($row, $column, $item);
1274
-	            $column++;
1275
-	        }
1276
-	        $row = 1;
1277
-	        $column = 0;
1272
+            foreach ($headers as $item) {
1273
+                $table->setHeaderContents($row, $column, $item);
1274
+                $column++;
1275
+            }
1276
+            $row = 1;
1277
+            $column = 0;
1278 1278
         }
1279 1279
 
1280 1280
         if (!empty($rows)) {
1281
-	        foreach($rows as $content) {
1282
-	            $table->setCellContents($row, $column, $content);
1281
+            foreach($rows as $content) {
1282
+                $table->setCellContents($row, $column, $content);
1283 1283
                 $row++;
1284 1284
             }
1285 1285
         }
@@ -1385,7 +1385,7 @@  discard block
 block discarded – undo
1385 1385
                         //$item_property['tool'] != TOOL_DROPBOX &&
1386 1386
                         $item_property['tool'] != TOOL_NOTEBOOK &&
1387 1387
                         $item_property['tool'] != TOOL_CHAT)
1388
-                   )
1388
+                    )
1389 1389
                 )
1390 1390
                 // Take only what's visible or "invisible but where the user is a teacher" or where the visibility is unset.
1391 1391
                 && ($item_property['visibility'] == '1'
@@ -1401,7 +1401,7 @@  discard block
 block discarded – undo
1401 1401
                         ($item_property['to_user_id'] != $user_id) &&
1402 1402
                         (!isset($item_property['to_group_id']) || !in_array($item_property['to_group_id'], $group_ids)))
1403 1403
                 ) {
1404
-                   continue;
1404
+                    continue;
1405 1405
                 }
1406 1406
 
1407 1407
                 // If it's a survey, make sure the user's invited. Otherwise drop it.
@@ -1620,21 +1620,21 @@  discard block
 block discarded – undo
1620 1620
      *
1621 1621
      * @param  string  id of the rating ul element
1622 1622
      * @param  string  url that will be added (for jquery see hot_courses.tpl)
1623
-	 * @param	string	point info array see function CourseManager::get_course_ranking()
1624
-	 * @param	bool	add a div wrapper
1625
-	 * @todo	use     templates
1623
+     * @param	string	point info array see function CourseManager::get_course_ranking()
1624
+     * @param	bool	add a div wrapper
1625
+     * @todo	use     templates
1626 1626
      **/
1627 1627
     public static function return_rating_system($id, $url, $point_info = array(), $add_div_wrapper = true)
1628 1628
     {
1629
-		$number_of_users_who_voted = isset($point_info['users_who_voted']) ? $point_info['users_who_voted'] : null;
1630
-		$percentage = isset($point_info['point_average']) ? $point_info['point_average'] : 0;
1629
+        $number_of_users_who_voted = isset($point_info['users_who_voted']) ? $point_info['users_who_voted'] : null;
1630
+        $percentage = isset($point_info['point_average']) ? $point_info['point_average'] : 0;
1631 1631
 
1632
-		if (!empty($percentage)) {
1632
+        if (!empty($percentage)) {
1633 1633
             $percentage = $percentage*125/100;
1634 1634
         }
1635
-		$accesses =  isset($point_info['accesses']) ? $point_info['accesses'] : 0;
1635
+        $accesses =  isset($point_info['accesses']) ? $point_info['accesses'] : 0;
1636 1636
 
1637
-		$star_label = sprintf(get_lang('XStarsOutOf5'), $point_info['point_average_star']);
1637
+        $star_label = sprintf(get_lang('XStarsOutOf5'), $point_info['point_average_star']);
1638 1638
 
1639 1639
         $html = '<ul id="'.$id.'" class="star-rating">
1640 1640
 					<li class="current-rating" style="width:'.$percentage.'px;"></li>
@@ -1645,26 +1645,26 @@  discard block
 block discarded – undo
1645 1645
 					<li><a href="javascript:void(0);" data-link="'.$url.'&amp;star=5" title="'.$star_label.'" class="five-stars">5</a></li>
1646 1646
 				</ul>';
1647 1647
 
1648
-		$labels = array();
1648
+        $labels = array();
1649 1649
 
1650
-		$labels[]= $number_of_users_who_voted == 1 ? $number_of_users_who_voted.' '.get_lang('Vote') : $number_of_users_who_voted.' '.get_lang('Votes');
1651
-		$labels[]= $accesses == 1 ? $accesses.' '.get_lang('Visit') : $accesses.' '.get_lang('Visits');
1652
-		if (!empty($number_of_users_who_voted)) {
1653
-			$labels[]= get_lang('Average').' '.$point_info['point_average_star'].'/5';
1654
-		}
1650
+        $labels[]= $number_of_users_who_voted == 1 ? $number_of_users_who_voted.' '.get_lang('Vote') : $number_of_users_who_voted.' '.get_lang('Votes');
1651
+        $labels[]= $accesses == 1 ? $accesses.' '.get_lang('Visit') : $accesses.' '.get_lang('Visits');
1652
+        if (!empty($number_of_users_who_voted)) {
1653
+            $labels[]= get_lang('Average').' '.$point_info['point_average_star'].'/5';
1654
+        }
1655 1655
 
1656
-		$labels[]= $point_info['user_vote']  ? get_lang('YourVote').' ['.$point_info['user_vote'].']' : get_lang('YourVote'). ' [?] ';
1656
+        $labels[]= $point_info['user_vote']  ? get_lang('YourVote').' ['.$point_info['user_vote'].']' : get_lang('YourVote'). ' [?] ';
1657 1657
 
1658
-		if (!$add_div_wrapper && api_is_anonymous()) {
1659
-			$labels[]= Display::tag('span', get_lang('LoginToVote'), array('class' => 'error'));
1660
-		}
1658
+        if (!$add_div_wrapper && api_is_anonymous()) {
1659
+            $labels[]= Display::tag('span', get_lang('LoginToVote'), array('class' => 'error'));
1660
+        }
1661 1661
 
1662 1662
         $html .= Display::div(implode(' | ', $labels) , array('id' =>  'vote_label_'.$id, 'class' => 'vote_label_info'));
1663 1663
         $html .= ' '.Display::span(' ', array('id' =>  'vote_label2_'.$id));
1664 1664
 
1665 1665
         if ($add_div_wrapper) {
1666
-			$html = Display::div($html, array('id' => 'rating_wrapper_'.$id));
1667
-		}
1666
+            $html = Display::div($html, array('id' => 'rating_wrapper_'.$id));
1667
+        }
1668 1668
 
1669 1669
         return $html;
1670 1670
     }
@@ -1702,8 +1702,8 @@  discard block
 block discarded – undo
1702 1702
         return self::page_header($title, $second_title);
1703 1703
     }
1704 1704
 
1705
-     public static function page_subheader_and_translate($title, $second_title = null)
1706
-     {
1705
+        public static function page_subheader_and_translate($title, $second_title = null)
1706
+        {
1707 1707
         $title = get_lang($title);
1708 1708
         return self::page_subheader($title, $second_title);
1709 1709
     }
Please login to merge, or discard this patch.
main/inc/lib/plugin.class.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -591,13 +591,13 @@
 block discarded – undo
591 591
 
592 592
     }
593 593
 
594
-   /**
595
-    * Add a tab to platform
596
-    * @param string   $tabName
597
-    * @param string   $url
598
-    *
599
-    * @return boolean
600
-    */
594
+    /**
595
+     * Add a tab to platform
596
+     * @param string   $tabName
597
+     * @param string   $url
598
+     *
599
+     * @return boolean
600
+     */
601 601
     public function addTab($tabName, $url)
602 602
     {
603 603
         $sql = "SELECT * FROM settings_current
Please login to merge, or discard this patch.
main/inc/lib/course.lib.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1679,7 +1679,7 @@  discard block
 block discarded – undo
1679 1679
 
1680 1680
         // We get the coach for the given course in a given session.
1681 1681
         $sql = 'SELECT user_id FROM ' . Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER) .
1682
-               ' WHERE session_id ="' . $session_id . '" AND c_id="' . $courseId . '" AND status = 2';
1682
+                ' WHERE session_id ="' . $session_id . '" AND c_id="' . $courseId . '" AND status = 2';
1683 1683
         $rs = Database::query($sql);
1684 1684
         while ($user = Database::fetch_array($rs)) {
1685 1685
             $user_info = api_get_user_info($user['user_id']);
@@ -3972,7 +3972,7 @@  discard block
 block discarded – undo
3972 3972
         }
3973 3973
 
3974 3974
         $session_title .= isset($course['special_course']) ? ' ' .
3975
-                          Display::return_icon('klipper.png', get_lang('CourseAutoRegister')) : '';
3975
+                            Display::return_icon('klipper.png', get_lang('CourseAutoRegister')) : '';
3976 3976
 
3977 3977
         $params['title'] = $session_title;
3978 3978
         $params['extra'] = '';
Please login to merge, or discard this patch.
main/inc/lib/social.lib.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
         if ($course_visibility != COURSE_VISIBILITY_HIDDEN &&
511 511
             ($course_visibility != COURSE_VISIBILITY_CLOSED || $user_in_course_status == COURSEMANAGER)
512 512
         ) {
513
-           $result .= '<span class="title">' . $course_title . '<span>';
513
+            $result .= '<span class="title">' . $course_title . '<span>';
514 514
         } else {
515 515
             $result .= $course_title." "." ".get_lang('CourseClosed')."";
516 516
         }
@@ -1414,7 +1414,7 @@  discard block
 block discarded – undo
1414 1414
             }
1415 1415
             $media .= '<div class="user-image">';
1416 1416
             $media .= '<a href="'.$url.'" ><img src="'. $users[$userIdLoop]['avatar'] .
1417
-                       '" alt="'.$users[$userIdLoop]['complete_name'].'" class="avatar-thumb"></a>';
1417
+                        '" alt="'.$users[$userIdLoop]['complete_name'].'" class="avatar-thumb"></a>';
1418 1418
             $media .= '</div>';
1419 1419
             $media .= '<div class="user-data">';
1420 1420
             $media .= '<div class="username">' . '<a href="'.$url.'">'.$nameComplete.'</a></div>';
@@ -1645,10 +1645,10 @@  discard block
 block discarded – undo
1645 1645
         return $name;
1646 1646
     }
1647 1647
     /**
1648
-    * Delete messages delete logic
1649
-    * @param int $id id message to delete.
1650
-    * @return bool status query
1651
-    */
1648
+     * Delete messages delete logic
1649
+     * @param int $id id message to delete.
1650
+     * @return bool status query
1651
+     */
1652 1652
     public static function deleteMessage($id)
1653 1653
     {
1654 1654
         $id = intval($id);
Please login to merge, or discard this patch.
main/inc/lib/message.lib.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1532,7 +1532,7 @@
 block discarded – undo
1532 1532
 
1533 1533
         if (isset($_REQUEST['action'])) {
1534 1534
             switch ($_REQUEST['action']) {
1535
-                 case 'mark_as_unread' :
1535
+                    case 'mark_as_unread' :
1536 1536
                     $number_of_selected_messages = count($_POST['id']);
1537 1537
                     if (is_array($_POST['id'])) {
1538 1538
                         foreach ($_POST['id'] as $index => $message_id) {
Please login to merge, or discard this patch.
main/inc/lib/skill.lib.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
     }
34 34
 
35 35
     /**
36
-    * This function is for editing profile info from profile_id.
37
-    * @param int    $profileId
38
-    * @param string $name
39
-    * @param string $description
40
-    */
36
+     * This function is for editing profile info from profile_id.
37
+     * @param int    $profileId
38
+     * @param string $name
39
+     * @param string $description
40
+     */
41 41
     public function updateProfileInfo($profileId, $name, $description)
42 42
     {
43 43
         $profileId = intval($profileId);
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
     }
129 129
 
130 130
     /**
131
-    * This function is for getting profile info from profile_id.
132
-    * @param int $profileId
133
-    */
131
+     * This function is for getting profile info from profile_id.
132
+     * @param int $profileId
133
+     */
134 134
 
135 135
     public function getProfileInfo($profileId)
136 136
     {
Please login to merge, or discard this patch.
main/inc/lib/baker.lib.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
                 $data = substr($png,$ipos,$chunk['size']);
151 151
                 $sections = explode("\0", $data);
152 152
                 if ($sections[0] == $key) {
153
-                   return $sections;
153
+                    return $sections;
154 154
                 }
155 155
             }
156 156
             // Extract the data and the CRC
Please login to merge, or discard this patch.
main/inc/lib/formvalidator/Element/DateRangePicker.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
 class DateRangePicker extends HTML_QuickForm_text
8 8
 {
9 9
     /**
10
-    * Constructor
11
-    */
10
+     * Constructor
11
+     */
12 12
     public function __construct($elementName = null, $elementLabel = null, $attributes = null)
13 13
     {
14 14
         if (!isset($attributes['id'])) {
@@ -144,10 +144,10 @@  discard block
 block discarded – undo
144 144
     }
145 145
 
146 146
     /**
147
-    * @param array $dates result of parseDateRange()
148
-    *
149
-    * @return bool
150
-    */
147
+     * @param array $dates result of parseDateRange()
148
+     *
149
+     * @return bool
150
+     */
151 151
     public function validateDates($dates, $format = null)
152 152
     {
153 153
         if (empty($dates['start']) || empty($dates['end'])) {
Please login to merge, or discard this patch.
main/inc/lib/formvalidator/Element/HtmlEditor.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,9 +74,9 @@
 block discarded – undo
74 74
             $styleCss = $this->editor->getConfigAttribute('style');
75 75
 
76 76
             if ($styleCss) {
77
-               $style = true;
77
+                $style = true;
78 78
             } else {
79
-               $style = false;
79
+                $style = false;
80 80
             }
81 81
 
82 82
             return $this->buildEditor($style);
Please login to merge, or discard this patch.