Completed
Pull Request — 1.11.x (#1458)
by José
138:44 queued 104:05
created
main/inc/lib/statistics.lib.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -666,7 +666,7 @@
 block discarded – undo
666 666
         $res = Database::query($sql);
667 667
         $count1 = Database::fetch_object($res);
668 668
         $sql = "SELECT COUNT(*) AS n FROM $user_table as u $table ".
669
-               "WHERE LENGTH(picture_uri) > 0 $url_condition2";
669
+                "WHERE LENGTH(picture_uri) > 0 $url_condition2";
670 670
         $res = Database::query($sql);
671 671
         $count2 = Database::fetch_object($res);
672 672
         // #users without picture
Please login to merge, or discard this patch.
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
         $course_user_table = Database:: get_main_table(TABLE_MAIN_COURSE_USER);
105 105
         $course_table = Database:: get_main_table(TABLE_MAIN_COURSE);
106 106
         $user_table = Database:: get_main_table(TABLE_MAIN_USER);
107
-        $access_url_rel_user_table= Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
107
+        $access_url_rel_user_table = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
108 108
         $current_url_id = api_get_current_access_url_id();
109
-        $active_filter = $onlyActive?' AND active=1':'';
110
-        $status_filter = isset($status)?' AND status = '.intval($status):'';
109
+        $active_filter = $onlyActive ? ' AND active=1' : '';
110
+        $status_filter = isset($status) ? ' AND status = '.intval($status) : '';
111 111
 
112 112
         if (api_is_multiple_url_enabled()) {
113 113
             $sql = "SELECT COUNT(DISTINCT(u.user_id)) AS number
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
                     FROM $user_table
132 132
                     WHERE 1=1 $status_filter $active_filter";
133 133
             if (isset($categoryCode)) {
134
-                $status_filter = isset($status)?' AND status = '.intval($status):'';
134
+                $status_filter = isset($status) ? ' AND status = '.intval($status) : '';
135 135
                 $sql = "SELECT COUNT(DISTINCT(cu.user_id)) AS number
136 136
                         FROM $course_user_table cu, $course_table c
137 137
                         WHERE
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     public static function countSessions()
157 157
     {
158 158
         $session_table = Database :: get_main_table(TABLE_MAIN_SESSION);
159
-        $access_url_rel_session_table= Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION);
159
+        $access_url_rel_session_table = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION);
160 160
         if (api_is_multiple_url_enabled()) {
161 161
             $current_url_id = api_get_current_access_url_id();
162 162
             $sql = "SELECT COUNT(id) AS number
@@ -179,9 +179,9 @@  discard block
 block discarded – undo
179 179
     public static function getNumberOfActivities()
180 180
     {
181 181
         // Database table definitions
182
-        $track_e_default  = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_DEFAULT);
182
+        $track_e_default = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_DEFAULT);
183 183
         $table_user = Database::get_main_table(TABLE_MAIN_USER);
184
-        $access_url_rel_user_table= Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
184
+        $access_url_rel_user_table = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
185 185
         $current_url_id = api_get_current_access_url_id();
186 186
         if (api_is_multiple_url_enabled()) {
187 187
             $sql = "SELECT count(default_id) AS total_number_of_items
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
         $from = intval($from);
230 230
         $numberOfItems = intval($numberOfItems);
231 231
 
232
-        if (!in_array($direction, array('ASC','DESC'))) {
232
+        if (!in_array($direction, array('ASC', 'DESC'))) {
233 233
             $direction = 'DESC';
234 234
         }
235 235
 
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
         $sql .= " LIMIT $from,$numberOfItems ";
281 281
 
282 282
         $res = Database::query($sql);
283
-        $activities = array ();
283
+        $activities = array();
284 284
         while ($row = Database::fetch_row($res)) {
285 285
 
286 286
             if (strpos($row[1], '_object') === false && strpos($row[1], '_array') === false) {
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
         $sql = "SELECT code, name FROM $categoryTable
351 351
                 ORDER BY tree_pos";
352 352
         $res = Database::query($sql);
353
-        $categories = array ();
353
+        $categories = array();
354 354
         while ($category = Database::fetch_object($res)) {
355 355
             $categories[$category->code] = $category->name;
356 356
         }
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
             $data_max = ($data_max < $value ? $value : $data_max);
372 372
         }
373 373
         reset($data);
374
-        $result = array ();
374
+        $result = array();
375 375
         $delta = $max / $data_max;
376 376
         foreach ($data as $index => $value) {
377 377
             $result[$index] = (int) round($value * $delta);
@@ -405,9 +405,9 @@  discard block
 block discarded – undo
405 405
             } else {
406 406
                 $number_label = Statistics::makeSizeString($number);
407 407
             }
408
-            $percentage = ($total>0?number_format(100*$number/$total, 1, ',', '.'):'0');
408
+            $percentage = ($total > 0 ? number_format(100 * $number / $total, 1, ',', '.') : '0');
409 409
 
410
-            echo '<tr class="row_'.($i%2 == 0 ? 'odd' : 'even').'">
410
+            echo '<tr class="row_'.($i % 2 == 0 ? 'odd' : 'even').'">
411 411
                     <td width="150">'.$subtitle.'</td>
412 412
                     <td width="550">'.Display::bar_progress($percentage, false).'</td>
413 413
                     <td align="right">'.$number_label.'</td>';
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
                 echo '<td align="right"> '.$percentage.'%</td>';
416 416
             }
417 417
             echo '</tr>';
418
-            $i ++;
418
+            $i++;
419 419
         }
420 420
         if ($showTotal) {
421 421
             if (!$isFileSize) {
@@ -435,17 +435,17 @@  discard block
 block discarded – undo
435 435
     public static function printLoginStats($type)
436 436
     {
437 437
         $table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_LOGIN);
438
-        $access_url_rel_user_table= Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
438
+        $access_url_rel_user_table = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
439 439
         $current_url_id = api_get_current_access_url_id();
440 440
 
441 441
         $table_url = null;
442 442
         $where_url = null;
443 443
         $now = api_get_utc_datetime();
444
-        $where_url_last = ' WHERE login_date > DATE_SUB("' . $now . '",INTERVAL 1 %s)';
444
+        $where_url_last = ' WHERE login_date > DATE_SUB("'.$now.'",INTERVAL 1 %s)';
445 445
         if (api_is_multiple_url_enabled()) {
446 446
             $table_url = ", $access_url_rel_user_table";
447 447
             $where_url = " WHERE login_user_id=user_id AND access_url_id='".$current_url_id."'";
448
-            $where_url_last = ' AND login_date > DATE_SUB("' . $now . '",INTERVAL 1 %s)';
448
+            $where_url_last = ' AND login_date > DATE_SUB("'.$now.'",INTERVAL 1 %s)';
449 449
         }
450 450
 
451 451
         $period = get_lang('PeriodMonth');
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
                         GROUP BY stat_date 
465 465
                         ORDER BY stat_date ";
466 466
                 $sql_last_x = "SELECT DATE_FORMAT( login_date, '%H' ) AS stat_date , count( login_id ) AS number_of_logins 
467
-                               FROM ".$table.$table_url.$where_url.sprintf($where_url_last,'DAY')." 
467
+                               FROM ".$table.$table_url.$where_url.sprintf($where_url_last, 'DAY')." 
468 468
                                GROUP BY stat_date 
469 469
                                ORDER BY stat_date ";
470 470
                 break;
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
                         GROUP BY stat_date 
477 477
                         ORDER BY DATE_FORMAT( login_date, '%w' ) ";
478 478
                 $sql_last_x = "SELECT DATE_FORMAT( login_date, '%w' ) AS stat_date, count( login_id ) AS number_of_logins 
479
-                               FROM ".$table.$table_url.$where_url.sprintf($where_url_last,'WEEK')." 
479
+                               FROM ".$table.$table_url.$where_url.sprintf($where_url_last, 'WEEK')." 
480 480
                                GROUP BY stat_date 
481 481
                                ORDER BY DATE_FORMAT( login_date, '%w' ) ";
482 482
                 break;
@@ -520,14 +520,14 @@  discard block
 block discarded – undo
520 520
     {
521 521
         $totalLogin = array();
522 522
         $table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_LOGIN);
523
-        $access_url_rel_user_table= Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
523
+        $access_url_rel_user_table = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
524 524
         $current_url_id = api_get_current_access_url_id();
525 525
         if (api_is_multiple_url_enabled()) {
526 526
             $table_url = ", $access_url_rel_user_table";
527 527
             $where_url = " AND login_user_id=user_id AND access_url_id='".$current_url_id."'";
528 528
         } else {
529 529
             $table_url = '';
530
-            $where_url='';
530
+            $where_url = '';
531 531
         }
532 532
         $now = api_get_utc_datetime();
533 533
         $field = 'login_user_id';
@@ -559,14 +559,14 @@  discard block
 block discarded – undo
559 559
     {
560 560
         $totalLogin = [];
561 561
         $table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_LOGIN);
562
-        $access_url_rel_user_table= Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
562
+        $access_url_rel_user_table = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
563 563
         $current_url_id = api_get_current_access_url_id();
564 564
         if (api_is_multiple_url_enabled()) {
565 565
             $table_url = ", $access_url_rel_user_table";
566 566
             $where_url = " AND login_user_id=user_id AND access_url_id='".$current_url_id."'";
567 567
         } else {
568 568
             $table_url = '';
569
-            $where_url='';
569
+            $where_url = '';
570 570
         }
571 571
         $now = api_get_utc_datetime();
572 572
         $field = 'login_user_id';
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
                 GROUP BY date(login_date)";
580 580
 
581 581
         $res = Database::query($sql);
582
-        while ($row = Database::fetch_array($res,'ASSOC')){
582
+        while ($row = Database::fetch_array($res, 'ASSOC')) {
583 583
             $totalLogin[$row['login_date']] = $row['number'];
584 584
         }
585 585
 
@@ -673,13 +673,13 @@  discard block
 block discarded – undo
673 673
     public static function printUserPicturesStats()
674 674
     {
675 675
         $user_table = Database :: get_main_table(TABLE_MAIN_USER);
676
-        $access_url_rel_user_table= Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
676
+        $access_url_rel_user_table = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
677 677
         $current_url_id = api_get_current_access_url_id();
678 678
         $url_condition = null;
679 679
         $url_condition2 = null;
680 680
         $table = null;
681 681
         if (api_is_multiple_url_enabled()) {
682
-            $url_condition =  ", $access_url_rel_user_table as url WHERE url.user_id=u.user_id AND access_url_id='".$current_url_id."'";
682
+            $url_condition = ", $access_url_rel_user_table as url WHERE url.user_id=u.user_id AND access_url_id='".$current_url_id."'";
683 683
             $url_condition2 = " AND url.user_id=u.user_id AND access_url_id='".$current_url_id."'";
684 684
             $table = ", $access_url_rel_user_table as url ";
685 685
         }
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
             'width=200px',
712 712
             false
713 713
         );
714
-        $renderer =& $form->defaultRenderer();
714
+        $renderer = & $form->defaultRenderer();
715 715
         $renderer->setCustomElementTemplate('<span>{element}</span> ');
716 716
         $form->addElement('hidden', 'report', 'activities');
717 717
         $form->addElement('hidden', 'activities_direction', 'DESC');
@@ -761,10 +761,10 @@  discard block
 block discarded – undo
761 761
         $columns[1] = 'access_date';
762 762
         $sql_order[SORT_ASC] = 'ASC';
763 763
         $sql_order[SORT_DESC] = 'DESC';
764
-        $per_page = isset($_GET['per_page'])?intval($_GET['per_page']) : 10;
765
-        $page_nr = isset($_GET['page_nr'])?intval($_GET['page_nr']) : 1;
766
-        $column = isset($_GET['column'])?intval($_GET['column']) : 0;
767
-        $date_diff = isset($_GET['date_diff'])?intval($_GET['date_diff']) : 60;
764
+        $per_page = isset($_GET['per_page']) ? intval($_GET['per_page']) : 10;
765
+        $page_nr = isset($_GET['page_nr']) ? intval($_GET['page_nr']) : 1;
766
+        $column = isset($_GET['column']) ? intval($_GET['column']) : 0;
767
+        $date_diff = isset($_GET['date_diff']) ? intval($_GET['date_diff']) : 60;
768 768
         $direction = isset($_GET['direction']) ? $_GET['direction'] : SORT_ASC;
769 769
 
770 770
         if (!in_array($direction, array(SORT_ASC, SORT_DESC))) {
@@ -792,25 +792,25 @@  discard block
 block discarded – undo
792 792
                         access_url_id='".$current_url_id."'
793 793
                    GROUP BY c_id
794 794
                    HAVING c_id <> ''
795
-                   AND DATEDIFF( '".date('Y-m-d h:i:s')."' , access_date ) <= ". $date_diff;
795
+                   AND DATEDIFF( '".date('Y-m-d h:i:s')."' , access_date ) <= ".$date_diff;
796 796
         } else {
797 797
             $sql = "SELECT * FROM $table
798 798
                    GROUP BY c_id
799 799
                    HAVING c_id <> ''
800
-                   AND DATEDIFF( '".date('Y-m-d h:i:s')."' , access_date ) <= ". $date_diff;
800
+                   AND DATEDIFF( '".date('Y-m-d h:i:s')."' , access_date ) <= ".$date_diff;
801 801
         }
802 802
         $sql .= ' ORDER BY '.$columns[$column].' '.$sql_order[$direction];
803
-        $from = ($page_nr -1) * $per_page;
803
+        $from = ($page_nr - 1) * $per_page;
804 804
         $sql .= ' LIMIT '.$from.','.$per_page;
805 805
 
806 806
         echo '<p>'.get_lang('LastAccess').' &gt;= '.$date_diff.' '.get_lang('Days').'</p>';
807 807
         $res = Database::query($sql);
808 808
         if (Database::num_rows($res) > 0) {
809
-            $courses = array ();
809
+            $courses = array();
810 810
             while ($obj = Database::fetch_object($res)) {
811 811
                 $courseInfo = api_get_course_info_by_id($obj->c_id);
812
-                $course = array ();
813
-                $course[]= '<a href="'.api_get_path(WEB_COURSE_PATH).$courseInfo['code'].'">'.$courseInfo['code'].' <a>';
812
+                $course = array();
813
+                $course[] = '<a href="'.api_get_path(WEB_COURSE_PATH).$courseInfo['code'].'">'.$courseInfo['code'].' <a>';
814 814
                 // Allow sort by date hiding the numerical date
815 815
                 $course[] = '<span style="display:none;">'.$obj->access_date.'</span>'.api_convert_and_format_date($obj->access_date);
816 816
                 $courses[] = $course;
@@ -888,7 +888,7 @@  discard block
 block discarded – undo
888 888
     {
889 889
         $user_friend_table = Database::get_main_table(TABLE_MAIN_USER_REL_USER);
890 890
         $user_table = Database::get_main_table(TABLE_MAIN_USER);
891
-        $access_url_rel_user_table= Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
891
+        $access_url_rel_user_table = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
892 892
         $current_url_id = api_get_current_access_url_id();
893 893
 
894 894
         if (api_is_multiple_url_enabled()) {
@@ -927,7 +927,7 @@  discard block
 block discarded – undo
927 927
     {
928 928
         $totalLogin = array();
929 929
         $table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_LOGIN);
930
-        $access_url_rel_user_table= Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
930
+        $access_url_rel_user_table = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
931 931
         $current_url_id = api_get_current_access_url_id();
932 932
         $total = self::countUsers();
933 933
         if (api_is_multiple_url_enabled()) {
@@ -935,7 +935,7 @@  discard block
 block discarded – undo
935 935
             $where_url = " AND login_user_id=user_id AND access_url_id='".$current_url_id."'";
936 936
         } else {
937 937
             $table_url = '';
938
-            $where_url='';
938
+            $where_url = '';
939 939
         }
940 940
         $now = api_get_utc_datetime();
941 941
         $sql[get_lang('ThisDay')] =
Please login to merge, or discard this patch.
main/inc/lib/opengraph/OpenGraph.php 1 patch
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -18,11 +18,11 @@  discard block
 block discarded – undo
18 18
 
19 19
 class OpenGraph implements Iterator
20 20
 {
21
-  /**
22
-   * There are base schema's based on type, this is just
23
-   * a map so that the schema can be obtained
24
-   *
25
-   */
21
+    /**
22
+     * There are base schema's based on type, this is just
23
+     * a map so that the schema can be obtained
24
+     *
25
+     */
26 26
     public static $TYPES = array(
27 27
         'activity' => array('activity', 'sport'),
28 28
         'business' => array('bar', 'company', 'cafe', 'hotel', 'restaurant'),
@@ -34,19 +34,19 @@  discard block
 block discarded – undo
34 34
         'website' => array('blog', 'website'),
35 35
     );
36 36
 
37
-  /**
38
-   * Holds all the Open Graph values we've parsed from a page
39
-   *
40
-   */
37
+    /**
38
+     * Holds all the Open Graph values we've parsed from a page
39
+     *
40
+     */
41 41
     private $_values = array();
42 42
 
43
-  /**
44
-   * Fetches a URI and parses it for Open Graph data, returns
45
-   * false on error.
46
-   *
47
-   * @param $URI    URI to page to parse for Open Graph data
48
-   * @return OpenGraph
49
-   */
43
+    /**
44
+     * Fetches a URI and parses it for Open Graph data, returns
45
+     * false on error.
46
+     *
47
+     * @param $URI    URI to page to parse for Open Graph data
48
+     * @return OpenGraph
49
+     */
50 50
     static public function fetch($URI) {
51 51
         $curl = curl_init($URI);
52 52
 
@@ -69,13 +69,13 @@  discard block
 block discarded – undo
69 69
         }
70 70
     }
71 71
 
72
-  /**
73
-   * Parses HTML and extracts Open Graph data, this assumes
74
-   * the document is at least well formed.
75
-   *
76
-   * @param $HTML    HTML to parse
77
-   * @return OpenGraph
78
-   */
72
+    /**
73
+     * Parses HTML and extracts Open Graph data, this assumes
74
+     * the document is at least well formed.
75
+     *
76
+     * @param $HTML    HTML to parse
77
+     * @return OpenGraph
78
+     */
79 79
     static private function _parse($HTML) {
80 80
         $old_libxml_error = libxml_use_internal_errors(true);
81 81
 
@@ -140,13 +140,13 @@  discard block
 block discarded – undo
140 140
         return $page;
141 141
     }
142 142
 
143
-  /**
144
-   * Helper method to access attributes directly
145
-   * Example:
146
-   * $graph->title
147
-   *
148
-   * @param $key    Key to fetch from the lookup
149
-   */
143
+    /**
144
+     * Helper method to access attributes directly
145
+     * Example:
146
+     * $graph->title
147
+     *
148
+     * @param $key    Key to fetch from the lookup
149
+     */
150 150
     public function __get($key) {
151 151
         if (array_key_exists($key, $this->_values)) {
152 152
             return $this->_values[$key];
@@ -161,29 +161,29 @@  discard block
 block discarded – undo
161 161
         }
162 162
     }
163 163
 
164
-  /**
165
-   * Return all the keys found on the page
166
-   *
167
-   * @return array
168
-   */
164
+    /**
165
+     * Return all the keys found on the page
166
+     *
167
+     * @return array
168
+     */
169 169
     public function keys() {
170 170
         return array_keys($this->_values);
171 171
     }
172 172
 
173
-  /**
174
-   * Helper method to check an attribute exists
175
-   *
176
-   * @param $key
177
-   */
173
+    /**
174
+     * Helper method to check an attribute exists
175
+     *
176
+     * @param $key
177
+     */
178 178
     public function __isset($key) {
179 179
         return array_key_exists($key, $this->_values);
180 180
     }
181 181
 
182
-  /**
183
-   * Will return true if the page has location data embedded
184
-   *
185
-   * @return boolean Check if the page has location data
186
-   */
182
+    /**
183
+     * Will return true if the page has location data embedded
184
+     *
185
+     * @return boolean Check if the page has location data
186
+     */
187 187
     public function hasLocation() {
188 188
         if (array_key_exists('latitude', $this->_values) && array_key_exists('longitude', $this->_values)) {
189 189
             return true;
@@ -197,9 +197,9 @@  discard block
 block discarded – undo
197 197
         return $valid_address;
198 198
     }
199 199
 
200
-  /**
201
-   * Iterator code
202
-   */
200
+    /**
201
+     * Iterator code
202
+     */
203 203
     private $_position = 0;
204 204
     public function rewind() { reset($this->_values); $this->_position = 0; }
205 205
     public function current() { return current($this->_values); }
Please login to merge, or discard this patch.
main/inc/lib/events_dispatcher.class.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,9 +18,11 @@
 block discarded – undo
18 18
 
19 19
         foreach ($event_config[$event_name]["actions"] as $func) {
20 20
             $execute = true;
21
-            if (!function_exists($func)) // if the function doesn't exist, we log
21
+            if (!function_exists($func)) {
22
+                // if the function doesn't exist, we log
22 23
             {
23 24
                 error_log("EventsDispatcher warning : ".$func." does not exist.");
25
+            }
24 26
                 $execute = false;
25 27
             }
26 28
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     }
39 39
 
40 40
     /**
41
-     * @return bool
41
+     * @return false|null
42 42
      */
43 43
     public function create_user_folder()
44 44
     {
Please login to merge, or discard this patch.
main/inc/lib/internationalization.lib.php 4 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1710,8 +1710,7 @@
 block discarded – undo
1710 1710
             }
1711 1711
         }
1712 1712
         return false;
1713
-    }
1714
-    elseif (is_array($encoding2)) {
1713
+    } elseif (is_array($encoding2)) {
1715 1714
         foreach ($encoding2 as $encoding) {
1716 1715
             if (api_equal_encodings($encoding1, $encoding, $strict)) {
1717 1716
                 return true;
Please login to merge, or discard this patch.
Indentation   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     }
100 100
 
101 101
     if (!isset($used_lang_vars)) {
102
-    	$used_lang_vars = array();
102
+        $used_lang_vars = array();
103 103
     }
104 104
 
105 105
     // Caching results from some API functions, for speed.
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
     static $text_direction = array();
289 289
 
290 290
     if (empty($language)) {
291
-    	$language = api_get_interface_language();
291
+        $language = api_get_interface_language();
292 292
     }
293 293
     if (!isset($text_direction[$language])) {
294 294
         $text_direction[$language] = in_array(api_purify_language_id($language),
@@ -1703,7 +1703,6 @@  discard block
 block discarded – undo
1703 1703
 
1704 1704
 /**
1705 1705
  * Return true a date is valid
1706
-
1707 1706
  * @param string $date example: 2014-06-30 13:05:05
1708 1707
  * @param string $format example: "Y-m-d H:i:s"
1709 1708
  *
@@ -1973,15 +1972,15 @@  discard block
 block discarded – undo
1973 1972
 {
1974 1973
     if ($showTime) {
1975 1974
         if ($humanForm) {
1976
-           return $date->format('j M Y H:i:s');
1975
+            return $date->format('j M Y H:i:s');
1977 1976
         } else {
1978
-           return $date->format('Y-m-d H:i:s');
1977
+            return $date->format('Y-m-d H:i:s');
1979 1978
         }
1980 1979
     } else {
1981 1980
         if ($humanForm) {
1982
-           return $date->format('j M Y');
1981
+            return $date->format('j M Y');
1983 1982
         } else {
1984
-           return $date->format('Y-m-d');
1983
+            return $date->format('Y-m-d');
1985 1984
         }
1986 1985
     }
1987 1986
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -633,10 +633,10 @@  discard block
 block discarded – undo
633 633
         $date_format = str_replace(
634 634
             array('%A', '%a', '%B', '%b'),
635 635
             array(
636
-                $translated['days_long'][(int)strftime('%w', $time)],
637
-                $translated['days_short'][(int)strftime('%w', $time)],
638
-                $translated['months_long'][(int)strftime('%m', $time) - 1],
639
-                $translated['months_short'][(int)strftime('%m', $time) - 1],
636
+                $translated['days_long'][(int) strftime('%w', $time)],
637
+                $translated['days_short'][(int) strftime('%w', $time)],
638
+                $translated['months_long'][(int) strftime('%m', $time) - 1],
639
+                $translated['months_short'][(int) strftime('%m', $time) - 1],
640 640
             ),
641 641
             $date_format
642 642
         );
@@ -1583,7 +1583,7 @@  discard block
 block discarded – undo
1583 1583
  * @return string					Returns the encoding identificator modified in suitable for comparison way.
1584 1584
  */
1585 1585
 function api_refine_encoding_id($encoding) {
1586
-    if (is_array($encoding)){
1586
+    if (is_array($encoding)) {
1587 1587
         return array_map('api_refine_encoding_id', $encoding);
1588 1588
     }
1589 1589
     return strtoupper(str_replace('_', '-', $encoding));
Please login to merge, or discard this patch.
Doc Comments   +19 added lines, -12 removed lines patch added patch discarded remove patch
@@ -419,6 +419,7 @@  discard block
 block discarded – undo
419 419
  * If null, the timezone will be determined based on user preference,
420 420
  * or timezone chosen by the admin for the platform.
421 421
  * @param string The timezone to be converted from. If null, UTC will be assumed.
422
+ * @param string $to_timezone
422 423
  * @return string The converted time formatted as Y-m-d H:i:s
423 424
  *
424 425
  * @author Guillaume Viguier <[email protected]>
@@ -683,6 +684,8 @@  discard block
 block discarded – undo
683 684
  * @param mixed The time to be converted
684 685
  * @param mixed Format to be used (TIME_NO_SEC_FORMAT, DATE_FORMAT_SHORT, DATE_FORMAT_LONG, DATE_TIME_FORMAT_LONG)
685 686
  * @param string Timezone to be converted from. If null, UTC will be assumed.
687
+ * @param integer $format
688
+ * @param string $from_timezone
686 689
  * @return string Converted and localized date
687 690
  *
688 691
  * @author Guillaume Viguier <[email protected]>
@@ -752,7 +755,7 @@  discard block
 block discarded – undo
752 755
  * @param int|string $format (optional)	The person name format. It may be a pattern-string (for example '%t %l, %f' or '%T %F %L', ...) or some of the constants PERSON_NAME_COMMON_CONVENTION (default), PERSON_NAME_WESTERN_ORDER, PERSON_NAME_EASTERN_ORDER, PERSON_NAME_LIBRARY_ORDER.
753 756
  * @param string $language (optional)	The language id. If it is omitted, the current interface language is assumed. This parameter has meaning with the format PERSON_NAME_COMMON_CONVENTION only.
754 757
  * @param string $encoding (optional)	The used internally by this function character encoding. If it is omitted, the platform character set will be used by default.
755
- * @return bool							The result is sort of full name of the person.
758
+ * @return string							The result is sort of full name of the person.
756 759
  * Sample results:
757 760
  * Peter Ustinoff or Dr. Peter Ustinoff     - the Western order
758 761
  * Ustinoff Peter or Dr. Ustinoff Peter     - the Eastern order
@@ -1071,8 +1074,8 @@  discard block
 block discarded – undo
1071 1074
 
1072 1075
 /**
1073 1076
  * This function returns a string or an array with all occurrences of search in subject (ignoring case) replaced with the given replace value.
1074
- * @param mixed $search					String or array of strings to be found.
1075
- * @param mixed $replace				String or array of strings used for replacement.
1077
+ * @param string $search					String or array of strings to be found.
1078
+ * @param string $replace				String or array of strings used for replacement.
1076 1079
  * @param mixed $subject				String or array of strings being searched.
1077 1080
  * @param int $count (optional)			The number of matched and replaced needles will be returned in count, which is passed by reference.
1078 1081
  * @param string $encoding (optional)	The used internally by this function character encoding.
@@ -1135,10 +1138,10 @@  discard block
 block discarded – undo
1135 1138
 /**
1136 1139
  * Finds first occurrence of a string within another, case insensitive.
1137 1140
  * @param string $haystack					The string from which to get the first occurrence.
1138
- * @param mixed $needle						The string to be found.
1141
+ * @param string $needle						The string to be found.
1139 1142
  * @param bool $before_needle (optional)	Determines which portion of $haystack this function returns. The default value is FALSE.
1140 1143
  * @param string $encoding (optional)		The used internally by this function character encoding. If it is omitted, the platform character set will be used by default.
1141
- * @return mixed							Returns the portion of $haystack, or FALSE if $needle is not found.
1144
+ * @return false|string							Returns the portion of $haystack, or FALSE if $needle is not found.
1142 1145
  * Notes:
1143 1146
  * If $needle is not a string, it is converted to an integer and applied as the ordinal value (codepoint if the encoding is UTF-8) of a character.
1144 1147
  * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence of $needle.
@@ -1194,7 +1197,7 @@  discard block
 block discarded – undo
1194 1197
  * @param mixed $needle						The string which first character is to be found.
1195 1198
  * @param bool $before_needle (optional)	Determines which portion of $haystack this function returns. The default value is FALSE.
1196 1199
  * @param string $encoding (optional)		The used internally by this function character encoding. If it is omitted, the platform character set will be used by default.
1197
- * @return mixed							Returns the portion of $haystack, or FALSE if the first character from $needle is not found.
1200
+ * @return false|string							Returns the portion of $haystack, or FALSE if the first character from $needle is not found.
1198 1201
  * Notes:
1199 1202
  * If $needle is not a string, it is converted to an integer and applied as the ordinal value (codepoint if the encoding is UTF-8) of a character.
1200 1203
  * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence.
@@ -1261,7 +1264,7 @@  discard block
 block discarded – undo
1261 1264
  * @param mixed $needle						The string to be found.
1262 1265
  * @param bool $before_needle (optional)	Determines which portion of $haystack this function returns. The default value is FALSE.
1263 1266
  * @param string $encoding (optional)		The used internally by this function character encoding. If it is omitted, the platform character set will be used by default.
1264
- * @return mixed							Returns the portion of $haystack, or FALSE if $needle is not found.
1267
+ * @return false|string							Returns the portion of $haystack, or FALSE if $needle is not found.
1265 1268
  * Notes:
1266 1269
  * If $needle is not a string, it is converted to an integer and applied as the ordinal value (codepoint if the encoding is UTF-8) of a character.
1267 1270
  * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence of $needle.
@@ -1442,8 +1445,8 @@  discard block
 block discarded – undo
1442 1445
 
1443 1446
 /**
1444 1447
  * Performs a regular expression search and replace, UTF-8 aware when it is applicable.
1445
- * @param string|array $pattern			The pattern to search for. It can be either a string or an array with strings.
1446
- * @param string|array $replacement		The string or an array with strings to replace.
1448
+ * @param string $pattern			The pattern to search for. It can be either a string or an array with strings.
1449
+ * @param string $replacement		The string or an array with strings to replace.
1447 1450
  * @param string|array $subject			The string or an array with strings to search and replace.
1448 1451
  * @param int $limit					The maximum possible replacements for each pattern in each subject string. Defaults to -1 (no limit).
1449 1452
  * @param int &$count					If specified, this variable will be filled with the number of replacements done.
@@ -1591,7 +1594,7 @@  discard block
 block discarded – undo
1591 1594
 
1592 1595
 /**
1593 1596
  * This function checks whether two $encoding are equal (same, equvalent).
1594
- * @param string|array $encoding1		The first encoding
1597
+ * @param string $encoding1		The first encoding
1595 1598
  * @param string|array $encoding2		The second encoding
1596 1599
  * @param bool $strict					When this parameter is TRUE the comparison ignores aliases of encodings.
1597 1600
  * When the parameter is FALSE, aliases are taken into account.
@@ -1695,6 +1698,7 @@  discard block
 block discarded – undo
1695 1698
 /**
1696 1699
  * Checks a string for UTF-8 validity.
1697 1700
  *
1701
+ * @param string $string
1698 1702
  */
1699 1703
 function api_is_valid_utf8(&$string)
1700 1704
 {
@@ -1837,7 +1841,7 @@  discard block
 block discarded – undo
1837 1841
 /**
1838 1842
  * Replaces non-valid formats for person names with the default (English) format.
1839 1843
  * @param string $format	The input format to be verified.
1840
- * @return bool				Returns the same format if is is valid, otherwise returns a valid English format.
1844
+ * @return string				Returns the same format if is is valid, otherwise returns a valid English format.
1841 1845
  */
1842 1846
 function _api_validate_person_name_format($format) {
1843 1847
     if (empty($format) || stripos($format, '%f') === false || stripos($format, '%l') === false) {
@@ -1964,6 +1968,9 @@  discard block
 block discarded – undo
1964 1968
 
1965 1969
 // This function checks whether the function _api_convert_encoding() (the php-
1966 1970
 // implementation) is able to convert from/to a given encoding.
1971
+/**
1972
+ * @param string $encoding
1973
+ */
1967 1974
 function _api_convert_encoding_supports($encoding) {
1968 1975
     static $supports = array();
1969 1976
     if (!isset($supports[$encoding])) {
@@ -1974,7 +1981,7 @@  discard block
 block discarded – undo
1974 1981
 
1975 1982
 /**
1976 1983
  * Given a date object, return a human or ISO format, with or without h:m:s
1977
- * @param object $date The Date object
1984
+ * @param DateTime $date The Date object
1978 1985
  * @param bool $showTime Whether to show the time and date (true) or only the date (false)
1979 1986
  * @param bool $humanForm Whether to show day-month-year (true) or year-month-day (false)
1980 1987
  * @return string Formatted date
Please login to merge, or discard this patch.
main/inc/lib/course_request.lib.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
         $exemplary_content
66 66
     ) {
67 67
         $wanted_code = trim($wanted_code);
68
-        $user_id = (int)$user_id;
69
-        $exemplary_content = (bool)$exemplary_content ? 1 : 0;
68
+        $user_id = (int) $user_id;
69
+        $exemplary_content = (bool) $exemplary_content ? 1 : 0;
70 70
 
71 71
         if ($wanted_code == '') {
72 72
             return false;
@@ -254,10 +254,10 @@  discard block
 block discarded – undo
254 254
         $user_id,
255 255
         $exemplary_content
256 256
     ) {
257
-        $id = (int)$id;
257
+        $id = (int) $id;
258 258
         $wanted_code = trim($wanted_code);
259
-        $user_id = (int)$user_id;
260
-        $exemplary_content = (bool)$exemplary_content ? 1 : 0;
259
+        $user_id = (int) $user_id;
260
+        $exemplary_content = (bool) $exemplary_content ? 1 : 0;
261 261
 
262 262
         if ($wanted_code == '') {
263 263
             return false;
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
      */
361 361
     public static function delete_course_request($id)
362 362
     {
363
-        $id = (int)$id;
363
+        $id = (int) $id;
364 364
         $sql = "DELETE FROM ".Database :: get_main_table(TABLE_MAIN_COURSE_REQUEST)."
365 365
                 WHERE id = ".$id;
366 366
         $result = Database::query($sql);
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
         if (is_null($status)) {
378 378
             $sql = "SELECT COUNT(id) AS number FROM ".$course_table;
379 379
         } else {
380
-            $status = (int)$status;
380
+            $status = (int) $status;
381 381
             $sql = "SELECT COUNT(id) AS number FROM ".$course_table."
382 382
                     WHERE status = ".$status;
383 383
         }
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
      */
396 396
     public static function get_course_request_info($id)
397 397
     {
398
-        $id = (int)$id;
398
+        $id = (int) $id;
399 399
         $sql = "SELECT *
400 400
                 FROM ".Database :: get_main_table(TABLE_MAIN_COURSE_REQUEST)."
401 401
                 WHERE id = ".$id;
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
      */
414 414
     public static function get_course_request_code($id)
415 415
     {
416
-        $id = (int)$id;
416
+        $id = (int) $id;
417 417
         $sql = "SELECT code
418 418
                 FROM ".Database :: get_main_table(TABLE_MAIN_COURSE_REQUEST)."
419 419
                 WHERE id = ".$id;
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
      */
435 435
     public static function accept_course_request($id)
436 436
     {
437
-        $id = (int)$id;
437
+        $id = (int) $id;
438 438
 
439 439
         // Retrieve request's data
440 440
         $course_request_info = self::get_course_request_info($id);
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
             return false;
448 448
         }*/
449 449
 
450
-        $user_id = (int)$course_request_info['user_id'];
450
+        $user_id = (int) $course_request_info['user_id'];
451 451
         if ($user_id <= 0) {
452 452
             return false;
453 453
         }
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
      */
532 532
     public static function reject_course_request($id)
533 533
     {
534
-        $id = (int)$id;
534
+        $id = (int) $id;
535 535
         // Retrieve request's data
536 536
         $course_request_info = self::get_course_request_info($id);
537 537
         if (!is_array($course_request_info)) {
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
      */
610 610
     public static function ask_for_additional_info($id)
611 611
     {
612
-        $id = (int)$id;
612
+        $id = (int) $id;
613 613
 
614 614
         // Retrieve request's data
615 615
         $course_request_info = self::get_course_request_info($id);
@@ -700,7 +700,7 @@  discard block
 block discarded – undo
700 700
      */
701 701
     public static function additional_info_asked($id)
702 702
     {
703
-        $id = (int)$id;
703
+        $id = (int) $id;
704 704
         $sql = "SELECT id FROM ".Database :: get_main_table(TABLE_MAIN_COURSE_REQUEST)."
705 705
                 WHERE (id = ".$id." AND info > 0)";
706 706
         $result = Database::num_rows(Database::query($sql));
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
      * @param string $objetives
52 52
      * @param string $target_audience
53 53
      * @param int $user_id
54
-     * @return mixed The database id of the newly created course request or FALSE on failure.
54
+     * @return false|string The database id of the newly created course request or FALSE on failure.
55 55
      */
56 56
     public static function create_course_request(
57 57
         $wanted_code,
Please login to merge, or discard this patch.
main/inc/lib/access_url_edit_sessions_to_url_functions.lib.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,17 +44,17 @@
 block discarded – undo
44 44
                     ORDER BY name, id
45 45
                     LIMIT 11';
46 46
             $rs = Database::query($sql);
47
-            $i=0;
47
+            $i = 0;
48 48
             while ($session = Database :: fetch_array($rs)) {
49 49
                 $i++;
50
-                if ($i<=10) {
50
+                if ($i <= 10) {
51 51
                      $return .= '<a href="#" onclick="add_user_to_url(\''.addslashes($session['id']).'\',\''.addslashes($session['name']).' ('.addslashes($session['id']).')'.'\')">'.$session['name'].' </a><br />';
52 52
                 } else {
53 53
                     $return .= '...<br />';
54 54
                 }
55 55
             }
56 56
         }
57
-        $xajax_response -> addAssign('ajax_list_courses','innerHTML',api_utf8_encode($return));
57
+        $xajax_response -> addAssign('ajax_list_courses', 'innerHTML', api_utf8_encode($return));
58 58
         return $xajax_response;
59 59
     }
60 60
 }
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
             while ($session = Database :: fetch_array($rs)) {
49 49
                 $i++;
50 50
                 if ($i<=10) {
51
-                     $return .= '<a href="#" onclick="add_user_to_url(\''.addslashes($session['id']).'\',\''.addslashes($session['name']).' ('.addslashes($session['id']).')'.'\')">'.$session['name'].' </a><br />';
51
+                        $return .= '<a href="#" onclick="add_user_to_url(\''.addslashes($session['id']).'\',\''.addslashes($session['name']).' ('.addslashes($session['id']).')'.'\')">'.$session['name'].' </a><br />';
52 52
                 } else {
53 53
                     $return .= '...<br />';
54 54
                 }
Please login to merge, or discard this patch.
main/inc/lib/mp3player/is_autostart.as.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -12,13 +12,13 @@
 block discarded – undo
12 12
 switch ($_SESSION['whereami']) {
13 13
 
14 14
 
15
-	case 'lp/build' :
16
-	case 'document/create' :
17
-	case 'document/edit' :
18
-		$autostart = 'false';
19
-	break;
20
-	default :
21
-		$autostart = 'true';
15
+    case 'lp/build' :
16
+    case 'document/create' :
17
+    case 'document/edit' :
18
+        $autostart = 'false';
19
+    break;
20
+    default :
21
+        $autostart = 'true';
22 22
 
23 23
 }
24 24
 echo utf8_encode('autostart='.$autostart);
Please login to merge, or discard this patch.
main/inc/lib/AnnouncementManager.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1510,7 +1510,7 @@
 block discarded – undo
1510 1510
                             ip.to_user_id=$user_id OR (ip.to_group_id IS NULL OR ip.to_group_id IN (0, ".implode(", ", $group_memberships)."))
1511 1511
                         ) ";
1512 1512
                     } else {
1513
-                       $cond_user_id = " AND (
1513
+                        $cond_user_id = " AND (
1514 1514
                             ip.to_user_id=$user_id OR (ip.to_group_id IS NULL OR ip.to_group_id IN (0, ".api_get_group_id()."))
1515 1515
                         )";
1516 1516
                     }
Please login to merge, or discard this patch.
Doc Comments   +10 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     }
19 19
 
20 20
     /**
21
-     * @return array
21
+     * @return string[]
22 22
      */
23 23
     public static function get_tags()
24 24
     {
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      * @param string    $course_code
41 41
      * @param int       $session_id
42 42
      *
43
-     * @return mixed
43
+     * @return string
44 44
      */
45 45
     public static function parse_content($userId, $content, $course_code, $session_id = 0)
46 46
     {
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
      * @param int $courseId
184 184
      * @param int $userId
185 185
      *
186
-     * @return array
186
+     * @return integer
187 187
      */
188 188
     public static function getAnnouncementInfoById($announcementId, $courseId, $userId)
189 189
     {
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
      * @param array	    uploaded file $_FILES
385 385
      * @param string    Comment describing the attachment
386 386
      * @param bool  $sendToUsersInSession
387
-     * @return int      false on failure, ID of the announcement on success
387
+     * @return false|string      false on failure, ID of the announcement on success
388 388
      */
389 389
     public static function add_announcement(
390 390
         $emailTitle,
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
      * @param string $file_comment
496 496
      * @param bool $sendToUsersInSession
497 497
      *
498
-     * @return bool|int
498
+     * @return false|string
499 499
      */
500 500
     public static function add_group_announcement(
501 501
         $emailTitle,
@@ -739,7 +739,7 @@  discard block
 block discarded – undo
739 739
 
740 740
     /**
741 741
      * @param int $insert_id
742
-     * @return bool
742
+     * @return false|null
743 743
      */
744 744
     public static function update_mail_sent($insert_id)
745 745
     {
@@ -759,6 +759,7 @@  discard block
 block discarded – undo
759 759
      * Gets all announcements from a user by course
760 760
      * @param	string course db
761 761
      * @param	int user id
762
+     * @param integer $user_id
762 763
      * @return	array html with the content and count of announcements or false otherwise
763 764
      */
764 765
     public static function get_all_annoucement_by_user_course($course_code, $user_id)
@@ -1224,6 +1225,7 @@  discard block
 block discarded – undo
1224 1225
      * has been sent to
1225 1226
      * @param    string  The tool (announcement, agenda, ...)
1226 1227
      * @param    int     ID of the element of the corresponding type
1228
+     * @param string $tool
1227 1229
      * @return   array   Array of users and groups to whom the element has been sent
1228 1230
      */
1229 1231
     public static function sent_to($tool, $id)
@@ -1348,6 +1350,8 @@  discard block
 block discarded – undo
1348 1350
      * @param int attach id
1349 1351
      * @param array uploaded file $_FILES
1350 1352
      * @param string file comment
1353
+     * @param integer $id_attach
1354
+     * @param string $file_comment
1351 1355
      * @return int
1352 1356
      */
1353 1357
     public static function edit_announcement_attachment_file($id_attach, $file, $file_comment)
Please login to merge, or discard this patch.
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
                         IP.tool='announcement' AND
218 218
                         (
219 219
                             IP.toUser = $userId OR
220
-                            IP.group IN ('0', '" . implode("', '", $group_list) . "') OR
220
+                            IP.group IN ('0', '".implode("', '", $group_list)."') OR
221 221
                             IP.group IS NULL
222 222
                         ) AND
223 223
                         IP.visibility = '1' AND
@@ -282,13 +282,13 @@  discard block
 block discarded – undo
282 282
         $content = $announcement->getContent();
283 283
 
284 284
         $html .= "<table height=\"100\" width=\"100%\" cellpadding=\"5\" cellspacing=\"0\" class=\"data_table\">";
285
-        $html .= "<tr><td><h2>" . $title . "</h2></td></tr>";
285
+        $html .= "<tr><td><h2>".$title."</h2></td></tr>";
286 286
 
287 287
         if (api_is_allowed_to_edit(false, true) ||
288 288
             (api_get_course_setting('allow_user_edit_announcement') && !api_is_anonymous())
289 289
         ) {
290
-            $modify_icons = "<a href=\"" . api_get_self() . "?" . api_get_cidreq() . "&action=modify&id=" . $announcement_id . "\">" .
291
-                Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL) . "</a>";
290
+            $modify_icons = "<a href=\"".api_get_self()."?".api_get_cidreq()."&action=modify&id=".$announcement_id."\">".
291
+                Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL)."</a>";
292 292
             if ($itemProperty->getVisibility() === 1) {
293 293
                 $image_visibility = "visible";
294 294
                 $alt_visibility = get_lang('Hide');
@@ -298,12 +298,12 @@  discard block
 block discarded – undo
298 298
             }
299 299
             global $stok;
300 300
 
301
-            $modify_icons .= "<a href=\"" . api_get_self() . "?" . api_get_cidreq() . "&action=showhide&id=" . $announcement_id . "&sec_token=" . $stok . "\">" .
302
-                Display::return_icon($image_visibility . '.png', $alt_visibility, '', ICON_SIZE_SMALL) . "</a>";
301
+            $modify_icons .= "<a href=\"".api_get_self()."?".api_get_cidreq()."&action=showhide&id=".$announcement_id."&sec_token=".$stok."\">".
302
+                Display::return_icon($image_visibility.'.png', $alt_visibility, '', ICON_SIZE_SMALL)."</a>";
303 303
 
304 304
             if (api_is_allowed_to_edit(false, true)) {
305
-                $modify_icons .= "<a href=\"" . api_get_self() . "?" . api_get_cidreq() . "&action=delete&id=" . $announcement_id . "&sec_token=" . $stok . "\" onclick=\"javascript:if(!confirm('" . addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)) . "')) return false;\">" .
306
-                    Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL) .
305
+                $modify_icons .= "<a href=\"".api_get_self()."?".api_get_cidreq()."&action=delete&id=".$announcement_id."&sec_token=".$stok."\" onclick=\"javascript:if(!confirm('".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset))."')) return false;\">".
306
+                    Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).
307 307
                     "</a>";
308 308
             }
309 309
             $html .= "<tr><th style='text-align:right'>$modify_icons</th></tr>";
@@ -320,9 +320,9 @@  discard block
 block discarded – undo
320 320
         );
321 321
 
322 322
         $html .= "<tr><td>$content</td></tr>";
323
-        $html .= "<tr><td class=\"announcements_datum\">" . get_lang('LastUpdateDate') . " : " . api_convert_and_format_date(
323
+        $html .= "<tr><td class=\"announcements_datum\">".get_lang('LastUpdateDate')." : ".api_convert_and_format_date(
324 324
             $itemProperty->getInsertDate(), DATE_TIME_FORMAT_LONG
325
-        ) . "</td></tr>";
325
+        )."</td></tr>";
326 326
 
327 327
         if ($itemProperty->getGroup() !== null) {
328 328
             $sent_to_icon = Display::return_icon('group.gif', get_lang('AnnounceSentToUserSelection'));
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
             $sent_to_form = self::sent_to_form($sent_to);
333 333
             $html .= Display::tag(
334 334
                 'td',
335
-                get_lang('SentTo') . ' : ' . $sent_to_form,
335
+                get_lang('SentTo').' : '.$sent_to_form,
336 336
                 array('class' => 'announcements_datum')
337 337
             );
338 338
         }
@@ -342,15 +342,15 @@  discard block
 block discarded – undo
342 342
             $html .= "<tr><td>";
343 343
             $realname = $attachment_list['path'];
344 344
             $user_filename = $attachment_list['filename'];
345
-            $full_file_name = 'download.php?'.api_get_cidreq().'&file=' . $realname;
345
+            $full_file_name = 'download.php?'.api_get_cidreq().'&file='.$realname;
346 346
             $html .= '<br/>';
347 347
             $html .= Display::return_icon('attachment.gif', get_lang('Attachment'));
348
-            $html .= '<a href="' . $full_file_name . ' "> ' . $user_filename . ' </a>';
349
-            $html .= ' - <span class="forum_attach_comment" >' . $attachment_list['comment'] . '</span>';
348
+            $html .= '<a href="'.$full_file_name.' "> '.$user_filename.' </a>';
349
+            $html .= ' - <span class="forum_attach_comment" >'.$attachment_list['comment'].'</span>';
350 350
             if (api_is_allowed_to_edit(false, true)) {
351 351
                 $html .= Display::url(
352 352
                     Display::return_icon('delete.png', get_lang('Delete'), '', 16),
353
-                    api_get_self() . "?" . api_get_cidreq() . "&action=delete_attachment&id_attach=" . $attachment_list['id'] . "&sec_token=" . $stok
353
+                    api_get_self()."?".api_get_cidreq()."&action=delete_attachment&id_attach=".$attachment_list['id']."&sec_token=".$stok
354 354
                 );
355 355
             }
356 356
             $html .= '</td></tr>';
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
         $order = 0;
376 376
         if (Database::num_rows($res_max)) {
377 377
             $row_max = Database::fetch_array($res_max);
378
-            $order = intval($row_max[0])+1;
378
+            $order = intval($row_max[0]) + 1;
379 379
         }
380 380
 
381 381
         return $order;
@@ -798,8 +798,8 @@  discard block
 block discarded – undo
798 798
             $result = array();
799 799
             if ($num_rows > 0) {
800 800
                 while ($myrow = Database::fetch_array($rs)) {
801
-                    $content.= '<strong>' . $myrow['title'] . '</strong><br /><br />';
802
-                    $content.= $myrow['content'];
801
+                    $content .= '<strong>'.$myrow['title'].'</strong><br /><br />';
802
+                    $content .= $myrow['content'];
803 803
                     $i++;
804 804
                 }
805 805
                 $result['content'] = $content;
@@ -917,14 +917,14 @@  discard block
 block discarded – undo
917 917
             switch ($to_group) {
918 918
                 // it was send to one specific user
919 919
                 case null:
920
-                    $to[] = "USER:" . $row['to_user_id'];
920
+                    $to[] = "USER:".$row['to_user_id'];
921 921
                     break;
922 922
                 // it was sent to everyone
923 923
                 case 0:
924 924
                     return "everyone";
925 925
                     break;
926 926
                 default:
927
-                    $to[] = "GROUP:" . $row['to_group_id'];
927
+                    $to[] = "GROUP:".$row['to_group_id'];
928 928
             }
929 929
         }
930 930
         return $to;
@@ -987,10 +987,10 @@  discard block
 block discarded – undo
987 987
                 $sent_to_array['groups'][0] !== 0
988 988
             ) {
989 989
                 $group_id = $sent_to_array['groups'][0];
990
-                $output[] = "&nbsp;" . $group_names[$group_id]['name'];
990
+                $output[] = "&nbsp;".$group_names[$group_id]['name'];
991 991
             }
992 992
             if (empty($sent_to_array['groups']) and empty($sent_to_array['users'])) {
993
-                $output[] = "&nbsp;" . get_lang('Everybody');
993
+                $output[] = "&nbsp;".get_lang('Everybody');
994 994
             }
995 995
         }
996 996
 
@@ -1023,7 +1023,7 @@  discard block
 block discarded – undo
1023 1023
 
1024 1024
         $sql = "SELECT to_group_id, to_user_id
1025 1025
                 FROM $tbl_item_property
1026
-                WHERE c_id = $course_id AND tool = '$tool' AND ref=" . $id;
1026
+                WHERE c_id = $course_id AND tool = '$tool' AND ref=".$id;
1027 1027
         $result = Database::query($sql);
1028 1028
 
1029 1029
         while ($row = Database::fetch_array($result)) {
@@ -1064,8 +1064,8 @@  discard block
 block discarded – undo
1064 1064
         $announcementId = intval($announcementId);
1065 1065
         $course_id = api_get_course_int_id();
1066 1066
         $row = array();
1067
-        $sql = 'SELECT id, path, filename, comment FROM ' . $tbl_announcement_attachment . '
1068
-				WHERE c_id = ' . $course_id . ' AND announcement_id = ' . $announcementId;
1067
+        $sql = 'SELECT id, path, filename, comment FROM '.$tbl_announcement_attachment.'
1068
+				WHERE c_id = ' . $course_id.' AND announcement_id = '.$announcementId;
1069 1069
         $result = Database::query($sql);
1070 1070
         if (Database::num_rows($result) != 0) {
1071 1071
             $row = Database::fetch_array($result, 'ASSOC');
@@ -1090,9 +1090,9 @@  discard block
 block discarded – undo
1090 1090
 
1091 1091
         if (is_array($file) && $file['error'] == 0) {
1092 1092
             // TODO: This path is obsolete. The new document repository scheme should be kept in mind here.
1093
-            $courseDir = $_course['path'] . '/upload/announcements';
1093
+            $courseDir = $_course['path'].'/upload/announcements';
1094 1094
             $sys_course_path = api_get_path(SYS_COURSE_PATH);
1095
-            $updir = $sys_course_path . $courseDir;
1095
+            $updir = $sys_course_path.$courseDir;
1096 1096
 
1097 1097
             // Try to add an extension to the file if it hasn't one
1098 1098
             $new_file_name = add_ext_on_mime(stripslashes($file['name']), $file['type']);
@@ -1104,7 +1104,7 @@  discard block
 block discarded – undo
1104 1104
                 Display :: display_error_message(get_lang('UplUnableToSaveFileFilteredExtension'));
1105 1105
             } else {
1106 1106
                 $new_file_name = uniqid('');
1107
-                $new_path = $updir . '/' . $new_file_name;
1107
+                $new_path = $updir.'/'.$new_file_name;
1108 1108
                 copy($file['tmp_name'], $new_path);
1109 1109
 
1110 1110
                 $params = [
@@ -1145,9 +1145,9 @@  discard block
 block discarded – undo
1145 1145
 
1146 1146
         if (is_array($file) && $file['error'] == 0) {
1147 1147
             // TODO: This path is obsolete. The new document repository scheme should be kept in mind here.
1148
-            $courseDir = $_course['path'] . '/upload/announcements';
1148
+            $courseDir = $_course['path'].'/upload/announcements';
1149 1149
             $sys_course_path = api_get_path(SYS_COURSE_PATH);
1150
-            $updir = $sys_course_path . $courseDir;
1150
+            $updir = $sys_course_path.$courseDir;
1151 1151
 
1152 1152
             // Try to add an extension to the file if it hasn't one
1153 1153
             $new_file_name = add_ext_on_mime(stripslashes($file['name']), $file['type']);
@@ -1159,13 +1159,13 @@  discard block
 block discarded – undo
1159 1159
                 Display :: display_error_message(get_lang('UplUnableToSaveFileFilteredExtension'));
1160 1160
             } else {
1161 1161
                 $new_file_name = uniqid('');
1162
-                $new_path = $updir . '/' . $new_file_name;
1162
+                $new_path = $updir.'/'.$new_file_name;
1163 1163
                 @move_uploaded_file($file['tmp_name'], $new_path);
1164 1164
                 $safe_file_comment = Database::escape_string($file_comment);
1165 1165
                 $safe_file_name = Database::escape_string($file_name);
1166 1166
                 $safe_new_file_name = Database::escape_string($new_file_name);
1167 1167
                 $id_attach = intval($id_attach);
1168
-                $sql = "UPDATE $tbl_announcement_attachment SET filename = '$safe_file_name', comment = '$safe_file_comment', path = '$safe_new_file_name', size ='" . intval($file['size']) . "'
1168
+                $sql = "UPDATE $tbl_announcement_attachment SET filename = '$safe_file_name', comment = '$safe_file_comment', path = '$safe_new_file_name', size ='".intval($file['size'])."'
1169 1169
 					 	WHERE c_id = $course_id AND id = '$id_attach'";
1170 1170
                 $result = Database::query($sql);
1171 1171
                 if ($result === false) {
@@ -1272,7 +1272,7 @@  discard block
 block discarded – undo
1272 1272
 
1273 1273
             //if (!empty($user_id)) {
1274 1274
             if (0) {
1275
-                if (is_array($group_memberships) && count($group_memberships) > 0 ) {
1275
+                if (is_array($group_memberships) && count($group_memberships) > 0) {
1276 1276
                     $sql = "SELECT $select
1277 1277
                             FROM $tbl_announcement announcement, $tbl_item_property ip
1278 1278
                             WHERE
@@ -1472,8 +1472,8 @@  discard block
 block discarded – undo
1472 1472
                 if ($myrow['email_sent'] == '1') {
1473 1473
                     $sent_to_icon = ' '.Display::return_icon('email.gif', get_lang('AnnounceSentByEmail'));
1474 1474
                 }
1475
-                $groupReference = ($myrow['to_group_id'] > 0) ? ' <span class="label label-info">' . get_lang('Group') . '</span> ' : '' ;
1476
-                $title = $myrow['title'] . $groupReference . $sent_to_icon;
1475
+                $groupReference = ($myrow['to_group_id'] > 0) ? ' <span class="label label-info">'.get_lang('Group').'</span> ' : '';
1476
+                $title = $myrow['title'].$groupReference.$sent_to_icon;
1477 1477
                 $item_visibility = api_get_item_visibility($_course, TOOL_ANNOUNCEMENT, $myrow['id'], $session_id);
1478 1478
                 $myrow['visibility'] = $item_visibility;
1479 1479
 
@@ -1481,8 +1481,8 @@  discard block
 block discarded – undo
1481 1481
                 $attachment_list = AnnouncementManager::get_attachment($myrow['id']);
1482 1482
 
1483 1483
                 $attachment_icon = '';
1484
-                if (count($attachment_list)>0) {
1485
-                    $attachment_icon = ' '.Display::return_icon('attachment.gif',get_lang('Attachment'));
1484
+                if (count($attachment_list) > 0) {
1485
+                    $attachment_icon = ' '.Display::return_icon('attachment.gif', get_lang('Attachment'));
1486 1486
                 }
1487 1487
 
1488 1488
                 /* TITLE */
@@ -1501,16 +1501,16 @@  discard block
 block discarded – undo
1501 1501
                     || (api_get_course_setting('allow_user_edit_announcement') && !api_is_anonymous())
1502 1502
                 ) {
1503 1503
                     $modify_icons = "<a href=\"".$actionUrl."&action=modify&id=".$myrow['id']."\">".
1504
-                        Display::return_icon('edit.png', get_lang('Edit'),'',ICON_SIZE_SMALL)."</a>";
1505
-                    if ($myrow['visibility']==1) {
1506
-                        $image_visibility="visible";
1507
-                        $alt_visibility=get_lang('Hide');
1504
+                        Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL)."</a>";
1505
+                    if ($myrow['visibility'] == 1) {
1506
+                        $image_visibility = "visible";
1507
+                        $alt_visibility = get_lang('Hide');
1508 1508
                     } else {
1509
-                        $image_visibility="invisible";
1510
-                        $alt_visibility=get_lang('Visible');
1509
+                        $image_visibility = "invisible";
1510
+                        $alt_visibility = get_lang('Visible');
1511 1511
                     }
1512
-                    $modify_icons .=  "<a href=\"".$actionUrl."&action=showhide&id=".$myrow['id']."&sec_token=".$stok."\">".
1513
-                        Display::return_icon($image_visibility.'.png', $alt_visibility,'',ICON_SIZE_SMALL)."</a>";
1512
+                    $modify_icons .= "<a href=\"".$actionUrl."&action=showhide&id=".$myrow['id']."&sec_token=".$stok."\">".
1513
+                        Display::return_icon($image_visibility.'.png', $alt_visibility, '', ICON_SIZE_SMALL)."</a>";
1514 1514
 
1515 1515
                     // DISPLAY MOVE UP COMMAND only if it is not the top announcement
1516 1516
                     if ($iterator != 1) {
@@ -1525,12 +1525,12 @@  discard block
 block discarded – undo
1525 1525
                     } else {
1526 1526
                         $modify_icons .= Display::return_icon('down_na.gif', get_lang('Down'));
1527 1527
                     }
1528
-                    if (api_is_allowed_to_edit(false,true)) {
1529
-                        $modify_icons .= "<a href=\"".$actionUrl."&action=delete&id=".$myrow['id']."&sec_token=".$stok."\" onclick=\"javascript:if(!confirm('".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,api_get_system_encoding()))."')) return false;\">".
1530
-                            Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).
1528
+                    if (api_is_allowed_to_edit(false, true)) {
1529
+                        $modify_icons .= "<a href=\"".$actionUrl."&action=delete&id=".$myrow['id']."&sec_token=".$stok."\" onclick=\"javascript:if(!confirm('".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, api_get_system_encoding()))."')) return false;\">".
1530
+                            Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).
1531 1531
                             "</a>";
1532 1532
                     }
1533
-                    $iterator ++;
1533
+                    $iterator++;
1534 1534
                 } else {
1535 1535
                     $modify_icons = Display::url(
1536 1536
                         Display::return_icon('default.png'),
@@ -1571,7 +1571,7 @@  discard block
 block discarded – undo
1571 1571
         $userId = api_get_user_id();
1572 1572
         $condition_session = api_get_session_condition($session_id, true, true, 'announcement.session_id');
1573 1573
 
1574
-        if (api_is_allowed_to_edit(false,true))  {
1574
+        if (api_is_allowed_to_edit(false, true)) {
1575 1575
             // check teacher status
1576 1576
             if (empty($_GET['origin']) or $_GET['origin'] !== 'learnpath') {
1577 1577
 
@@ -1635,7 +1635,7 @@  discard block
 block discarded – undo
1635 1635
 
1636 1636
                 // the user is member of several groups => display personal announcements AND
1637 1637
                 // his group announcements AND the general announcements
1638
-                if (is_array($group_memberships) && count($group_memberships)>0) {
1638
+                if (is_array($group_memberships) && count($group_memberships) > 0) {
1639 1639
                     $sql = "SELECT announcement.*, ip.visibility, ip.to_group_id, ip.insert_user_id
1640 1640
                     FROM $tbl_announcement announcement, $tbl_item_property ip
1641 1641
                     WHERE
@@ -1685,7 +1685,7 @@  discard block
 block discarded – undo
1685 1685
                         }
1686 1686
 
1687 1687
                         // the user is not identiefied => show only the general announcements
1688
-                        $sql="SELECT announcement.*, ip.visibility, ip.to_group_id, ip.insert_user_id
1688
+                        $sql = "SELECT announcement.*, ip.visibility, ip.to_group_id, ip.insert_user_id
1689 1689
                                 FROM $tbl_announcement announcement, $tbl_item_property ip
1690 1690
                                 WHERE
1691 1691
                                     announcement.c_id = $course_id AND
Please login to merge, or discard this patch.
main/inc/lib/internationalization_database/name_order_conventions.php 2 patches
Indentation   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -19,82 +19,82 @@
 block discarded – undo
19 19
  * last_name                   - sorting names with priority for the last name.
20 20
  */
21 21
 return array(
22
-	'afrikaans' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
23
-	'albanian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
24
-	'alemannic' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
25
-	'amharic' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
26
-	'armenian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
27
-	'arabic' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
28
-	'asturian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
29
-	'bosnian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
30
-	'brazilian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
31
-	'breton' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
32
-	'bulgarian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
33
-	'catalan' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
34
-	'croatian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
35
-	'czech' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
36
-	'danish' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
37
-	'dari' =>             array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
38
-	'dutch' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
39
-	'english' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
40
-	'esperanto' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
41
-	'estonian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
42
-	'basque'  =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
43
-	'finnish' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
44
-	'french' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
45
-	'frisian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
46
-	'friulian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
22
+    'afrikaans' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
23
+    'albanian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
24
+    'alemannic' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
25
+    'amharic' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
26
+    'armenian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
27
+    'arabic' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
28
+    'asturian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
29
+    'bosnian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
30
+    'brazilian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
31
+    'breton' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
32
+    'bulgarian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
33
+    'catalan' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
34
+    'croatian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
35
+    'czech' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
36
+    'danish' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
37
+    'dari' =>             array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
38
+    'dutch' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
39
+    'english' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
40
+    'esperanto' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
41
+    'estonian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
42
+    'basque'  =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
43
+    'finnish' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
44
+    'french' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
45
+    'frisian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
46
+    'friulian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
47 47
     'galician' =>         array('format' => 'title last_name first_name',  'sort_by' => 'last_name'),
48
-	'georgian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
49
-	'german' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
50
-	'greek' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
51
-	'hawaiian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
52
-	'hebrew' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
53
-	'hindi' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
54
-	'hungarian' =>        array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
55
-	'icelandic' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
56
-	'indonesian' =>       array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
57
-	'irish' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
58
-	'italian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
59
-	'japanese' =>         array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
60
-	'korean' =>           array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
61
-	'latin' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
62
-	'latvian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
63
-	'lithuanian' =>       array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
64
-	'macedonian' =>       array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
65
-	'malay' =>            array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
66
-	'manx' =>             array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
67
-	'marathi' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
68
-	'middle_frisian' =>   array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
69
-	'mingo' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
70
-	'nepali' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
71
-	'norwegian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
72
-	'occitan' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
73
-	'pashto' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
74
-	'persian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
75
-	'polish' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
76
-	'portuguese' =>       array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
77
-	'quechua_cusco' =>    array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
78
-	'romanian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
79
-	'rumantsch' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
80
-	'russian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
81
-	'sanskrit' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
82
-	'serbian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
83
-	'serbian_cyrillic' => array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
84
-	'simpl_chinese' =>    array('format' => 'title last_name first_name',  'sort_by' => 'last_name' ), // Eastern order
85
-	'slovak' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
86
-	'slovenian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
87
-	'spanish' =>          array('format' => 'title last_name, first_name',  'sort_by' => 'last_name'), // Library order
88
-	'swahili' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
89
-	'swedish' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
90
-	'tagalog' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
91
-	'tamil' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
92
-	'thai' =>             array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
93
-	'trad_chinese' =>     array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
94
-	'turkish' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
95
-	'ukrainian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
96
-	'vietnamese' =>       array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
97
-	'welsh' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
98
-	'yiddish' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
99
-	'yoruba' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name')
48
+    'georgian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
49
+    'german' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
50
+    'greek' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
51
+    'hawaiian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
52
+    'hebrew' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
53
+    'hindi' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
54
+    'hungarian' =>        array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
55
+    'icelandic' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
56
+    'indonesian' =>       array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
57
+    'irish' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
58
+    'italian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
59
+    'japanese' =>         array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
60
+    'korean' =>           array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
61
+    'latin' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
62
+    'latvian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
63
+    'lithuanian' =>       array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
64
+    'macedonian' =>       array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
65
+    'malay' =>            array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
66
+    'manx' =>             array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
67
+    'marathi' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
68
+    'middle_frisian' =>   array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
69
+    'mingo' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
70
+    'nepali' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
71
+    'norwegian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
72
+    'occitan' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
73
+    'pashto' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
74
+    'persian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
75
+    'polish' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
76
+    'portuguese' =>       array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
77
+    'quechua_cusco' =>    array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
78
+    'romanian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
79
+    'rumantsch' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
80
+    'russian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
81
+    'sanskrit' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
82
+    'serbian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
83
+    'serbian_cyrillic' => array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
84
+    'simpl_chinese' =>    array('format' => 'title last_name first_name',  'sort_by' => 'last_name' ), // Eastern order
85
+    'slovak' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
86
+    'slovenian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
87
+    'spanish' =>          array('format' => 'title last_name, first_name',  'sort_by' => 'last_name'), // Library order
88
+    'swahili' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
89
+    'swedish' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
90
+    'tagalog' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
91
+    'tamil' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
92
+    'thai' =>             array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
93
+    'trad_chinese' =>     array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
94
+    'turkish' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
95
+    'ukrainian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
96
+    'vietnamese' =>       array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
97
+    'welsh' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
98
+    'yiddish' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
99
+    'yoruba' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name')
100 100
 );
Please login to merge, or discard this patch.
Spacing   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -19,82 +19,82 @@
 block discarded – undo
19 19
  * last_name                   - sorting names with priority for the last name.
20 20
  */
21 21
 return array(
22
-	'afrikaans' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
23
-	'albanian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
24
-	'alemannic' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
25
-	'amharic' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
26
-	'armenian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
27
-	'arabic' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
28
-	'asturian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
29
-	'bosnian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
30
-	'brazilian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
31
-	'breton' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
32
-	'bulgarian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
33
-	'catalan' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
34
-	'croatian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
35
-	'czech' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
36
-	'danish' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
37
-	'dari' =>             array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
38
-	'dutch' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
39
-	'english' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
40
-	'esperanto' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
41
-	'estonian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
42
-	'basque'  =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
43
-	'finnish' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
44
-	'french' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
45
-	'frisian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
46
-	'friulian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
47
-    'galician' =>         array('format' => 'title last_name first_name',  'sort_by' => 'last_name'),
48
-	'georgian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
49
-	'german' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
50
-	'greek' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
51
-	'hawaiian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
52
-	'hebrew' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
53
-	'hindi' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
54
-	'hungarian' =>        array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
55
-	'icelandic' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
56
-	'indonesian' =>       array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
57
-	'irish' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
58
-	'italian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
59
-	'japanese' =>         array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
60
-	'korean' =>           array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
61
-	'latin' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
62
-	'latvian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
63
-	'lithuanian' =>       array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
64
-	'macedonian' =>       array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
65
-	'malay' =>            array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
66
-	'manx' =>             array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
67
-	'marathi' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
68
-	'middle_frisian' =>   array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
69
-	'mingo' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
70
-	'nepali' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
71
-	'norwegian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
72
-	'occitan' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
73
-	'pashto' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
74
-	'persian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
75
-	'polish' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
76
-	'portuguese' =>       array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
77
-	'quechua_cusco' =>    array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
78
-	'romanian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
79
-	'rumantsch' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
80
-	'russian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
81
-	'sanskrit' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
82
-	'serbian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
83
-	'serbian_cyrillic' => array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
84
-	'simpl_chinese' =>    array('format' => 'title last_name first_name',  'sort_by' => 'last_name' ), // Eastern order
85
-	'slovak' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
86
-	'slovenian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
87
-	'spanish' =>          array('format' => 'title last_name, first_name',  'sort_by' => 'last_name'), // Library order
88
-	'swahili' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
89
-	'swedish' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
90
-	'tagalog' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
91
-	'tamil' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
92
-	'thai' =>             array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
93
-	'trad_chinese' =>     array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
94
-	'turkish' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
95
-	'ukrainian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
96
-	'vietnamese' =>       array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
97
-	'welsh' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
98
-	'yiddish' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
99
-	'yoruba' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name')
22
+	'afrikaans' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
23
+	'albanian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
24
+	'alemannic' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
25
+	'amharic' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
26
+	'armenian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
27
+	'arabic' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
28
+	'asturian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
29
+	'bosnian' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
30
+	'brazilian' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
31
+	'breton' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
32
+	'bulgarian' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
33
+	'catalan' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
34
+	'croatian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
35
+	'czech' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
36
+	'danish' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
37
+	'dari' =>             array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
38
+	'dutch' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
39
+	'english' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
40
+	'esperanto' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
41
+	'estonian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
42
+	'basque'  =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
43
+	'finnish' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
44
+	'french' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
45
+	'frisian' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
46
+	'friulian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
47
+    'galician' =>         array('format' => 'title last_name first_name', 'sort_by' => 'last_name'),
48
+	'georgian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
49
+	'german' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
50
+	'greek' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
51
+	'hawaiian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
52
+	'hebrew' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
53
+	'hindi' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
54
+	'hungarian' =>        array('format' => 'title last_name first_name', 'sort_by' => 'last_name'), // Eastern order
55
+	'icelandic' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
56
+	'indonesian' =>       array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
57
+	'irish' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
58
+	'italian' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
59
+	'japanese' =>         array('format' => 'title last_name first_name', 'sort_by' => 'last_name'), // Eastern order
60
+	'korean' =>           array('format' => 'title last_name first_name', 'sort_by' => 'last_name'), // Eastern order
61
+	'latin' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
62
+	'latvian' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
63
+	'lithuanian' =>       array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
64
+	'macedonian' =>       array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
65
+	'malay' =>            array('format' => 'title last_name first_name', 'sort_by' => 'last_name'), // Eastern order
66
+	'manx' =>             array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
67
+	'marathi' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
68
+	'middle_frisian' =>   array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
69
+	'mingo' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
70
+	'nepali' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
71
+	'norwegian' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
72
+	'occitan' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
73
+	'pashto' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
74
+	'persian' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
75
+	'polish' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
76
+	'portuguese' =>       array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
77
+	'quechua_cusco' =>    array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
78
+	'romanian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
79
+	'rumantsch' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
80
+	'russian' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
81
+	'sanskrit' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
82
+	'serbian' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
83
+	'serbian_cyrillic' => array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
84
+	'simpl_chinese' =>    array('format' => 'title last_name first_name', 'sort_by' => 'last_name'), // Eastern order
85
+	'slovak' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
86
+	'slovenian' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
87
+	'spanish' =>          array('format' => 'title last_name, first_name', 'sort_by' => 'last_name'), // Library order
88
+	'swahili' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
89
+	'swedish' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
90
+	'tagalog' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
91
+	'tamil' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
92
+	'thai' =>             array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
93
+	'trad_chinese' =>     array('format' => 'title last_name first_name', 'sort_by' => 'last_name'), // Eastern order
94
+	'turkish' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
95
+	'ukrainian' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
96
+	'vietnamese' =>       array('format' => 'title last_name first_name', 'sort_by' => 'last_name'), // Eastern order
97
+	'welsh' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
98
+	'yiddish' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
99
+	'yoruba' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name')
100 100
 );
Please login to merge, or discard this patch.