Skip to content
This repository
Browse code

# [#29987] Code Style Part 2. Thanks Elin

  • Loading branch information...
commit c5d2c70bf6ed143c66393c2b4aab772bf47433f6 1 parent d2f51a8
elinw elinw authored infograf768 committed

Showing 72 changed files with 1,128 additions and 587 deletions. Show diff stats Hide diff stats

  1. +1 1  administrator/components/com_banners/controllers/banners.php
  2. +1 1  administrator/components/com_banners/models/banners.php
  3. +1 1  administrator/components/com_banners/models/clients.php
  4. +1 1  administrator/components/com_banners/models/tracks.php
  5. +1 1  administrator/components/com_banners/tables/banner.php
  6. +1 1  administrator/components/com_categories/controller.php
  7. +1 1  administrator/components/com_categories/models/categories.php
  8. +0 2  administrator/components/com_checkin/controller.php
  9. +8 3 administrator/components/com_checkin/models/checkin.php
  10. +1 1  administrator/components/com_contact/controllers/contacts.php
  11. +7 2 administrator/components/com_contact/models/contacts.php
  12. +2 1  administrator/components/com_contact/tables/contact.php
  13. +1 1  administrator/components/com_content/controllers/articles.php
  14. +1 1  administrator/components/com_content/models/article.php
  15. +7 2 administrator/components/com_content/models/articles.php
  16. +1 1  administrator/components/com_content/models/featured.php
  17. +1 1  administrator/components/com_installer/controllers/manage.php
  18. +1 1  administrator/components/com_installer/models/extension.php
  19. +1 1  administrator/components/com_installer/models/update.php
  20. +1 1  administrator/components/com_installer/models/warnings.php
  21. +2 1  administrator/components/com_installer/views/warnings/tmpl/default.php
  22. +3 0  administrator/components/com_joomlaupdate/models/default.php
  23. +5 1 administrator/components/com_languages/models/languages.php
  24. +1 1  administrator/components/com_languages/models/overrides.php
  25. +1 0  administrator/components/com_media/helpers/media.php
  26. +1 0  administrator/components/com_media/views/media/view.html.php
  27. +1 1  administrator/components/com_menus/models/items.php
  28. +1 1  administrator/components/com_menus/models/menus.php
  29. +1 1  administrator/components/com_messages/models/messages.php
  30. +2 1  administrator/components/com_modules/models/modules.php
  31. +1 1  administrator/components/com_modules/models/positions.php
  32. +1 1  administrator/components/com_newsfeeds/models/newsfeed.php
  33. +6 1 administrator/components/com_newsfeeds/models/newsfeeds.php
  34. +2 1  administrator/components/com_newsfeeds/tables/newsfeed.php
  35. +8 1 administrator/components/com_plugins/models/plugins.php
  36. +6 1 administrator/components/com_redirect/models/links.php
  37. +1 1  administrator/components/com_redirect/tables/link.php
  38. +4 0 administrator/components/com_search/helpers/search.php
  39. +10 1 administrator/components/com_search/models/searches.php
  40. +1 1  administrator/components/com_templates/controllers/source.php
  41. +6 1 administrator/components/com_templates/models/styles.php
  42. +1 1  administrator/components/com_templates/models/templates.php
  43. +1 1  administrator/components/com_users/models/groups.php
  44. +1 1  administrator/components/com_users/models/levels.php
  45. +1 1  administrator/components/com_weblinks/models/weblinks.php
  46. +2 1  administrator/components/com_weblinks/tables/weblink.php
  47. +3 3 administrator/includes/application.php
  48. +1 0  administrator/templates/hathor/html/com_banners/banner/edit.php
  49. +2 2 administrator/templates/isis/login.php
  50. +1 17 build/build.php
  51. +946 461 build/libraries/less/lessc.php
  52. +1 1  components/com_contact/models/category.php
  53. +1 1  components/com_contact/models/featured.php
  54. +1 1  components/com_content/models/articles.php
  55. +1 1  components/com_content/models/category.php
  56. +1 1  components/com_finder/views/search/tmpl/default_result.php
  57. +1 1  components/com_newsfeeds/models/category.php
  58. +1 1  components/com_weblinks/models/category.php
  59. +2 2 components/com_weblinks/models/weblink.php
  60. +2 1  includes/application.php
  61. +3 0  installation/CHANGELOG
  62. +1 0  installation/models/database.php
  63. +4 2 libraries/simplepie/simplepie.php
  64. +1 0  modules/mod_languages/helper.php
  65. +1 1  modules/mod_menu/tmpl/default_separator.php
  66. +4 4 plugins/content/emailcloak/emailcloak.php
  67. +22 22 tests/plugins/content/example/example.php
  68. +11 11 tests/plugins/editors/example/example.php
  69. +3 3 tests/plugins/extension/example/example.php
  70. +3 2 tests/plugins/search/example/example.php
  71. +1 1  tests/plugins/system/example/example.php
  72. +1 1  tests/system/webdriver/tests/JoomlaWebdriverTestCase.php
2  administrator/components/com_banners/controllers/banners.php
@@ -28,7 +28,7 @@ class BannersControllerBanners extends JControllerAdmin
28 28 * Constructor.
29 29 *
30 30 * @param array An optional associative array of configuration settings.
31   - * @see JController
  31 + * @see JController
32 32 * @since 1.6
33 33 */
34 34 public function __construct($config = array())
2  administrator/components/com_banners/models/banners.php
@@ -22,7 +22,7 @@ class BannersModelBanners extends JModelList
22 22 * Constructor.
23 23 *
24 24 * @param array An optional associative array of configuration settings.
25   - * @see JController
  25 + * @see JController
26 26 * @since 1.6
27 27 */
28 28 public function __construct($config = array())
2  administrator/components/com_banners/models/clients.php
@@ -22,7 +22,7 @@ class BannersModelClients extends JModelList
22 22 * Constructor.
23 23 *
24 24 * @param array An optional associative array of configuration settings.
25   - * @see JController
  25 + * @see JController
26 26 * @since 1.6
27 27 */
28 28 public function __construct($config = array())
2  administrator/components/com_banners/models/tracks.php
@@ -22,7 +22,7 @@ class BannersModelTracks extends JModelList
22 22 * Constructor.
23 23 *
24 24 * @param array An optional associative array of configuration settings.
25   - * @see JController
  25 + * @see JController
26 26 * @since 1.6
27 27 */
28 28 public function __construct($config = array())
2  administrator/components/com_banners/tables/banner.php
@@ -44,7 +44,7 @@ public function clicks()
44 44 * Overloaded check function
45 45 *
46 46 * @return boolean
47   - * @see JTable::check
  47 + * @see JTable::check
48 48 * @since 1.5
49 49 */
50 50 public function check()
2  administrator/components/com_categories/controller.php
@@ -28,7 +28,7 @@ class CategoriesController extends JControllerLegacy
28 28 * Constructor.
29 29 *
30 30 * @param array An optional associative array of configuration settings.
31   - * @see JController
  31 + * @see JController
32 32 * @since 1.6
33 33 */
34 34 public function __construct($config = array())
2  administrator/components/com_categories/models/categories.php
@@ -22,7 +22,7 @@ class CategoriesModelCategories extends JModelList
22 22 * Constructor.
23 23 *
24 24 * @param array An optional associative array of configuration settings.
25   - * @see JController
  25 + * @see JController
26 26 * @since 1.6
27 27 */
28 28 public function __construct($config = array())
2  administrator/components/com_checkin/controller.php
@@ -77,7 +77,5 @@ protected function addSubmenu($vName)
77 77 'index.php?option=com_cache&view=purge',
78 78 $vName == 'purge'
79 79 );
80   -
81 80 }
82   -
83 81 }
11 administrator/components/com_checkin/models/checkin.php
@@ -25,7 +25,11 @@ class CheckinModelCheckin extends JModelList
25 25 /**
26 26 * Method to auto-populate the model state.
27 27 *
28   - * Note. Calling getState in this method will result in recursion.
  28 + * @Note. Calling getState in this method will result in recursion.
  29 + * @param string $ordering An optional ordering field.
  30 + * @param string $direction An optional direction (asc|desc).
  31 + *
  32 + * @return void
29 33 *
30 34 * @since 1.6
31 35 */
@@ -41,8 +45,9 @@ protected function populateState($ordering = null, $direction = null)
41 45 /**
42 46 * Checks in requested tables
43 47 *
44   - * @param array An array of table names. Optional.
45   - * @return int Checked in item count
  48 + * @param array $ids An array of table names. Optional.
  49 + *
  50 + * @return integer Checked in item count
46 51 * @since 1.6
47 52 */
48 53 public function checkin($ids = array())
2  administrator/components/com_contact/controllers/contacts.php
@@ -24,7 +24,7 @@ class ContactControllerContacts extends JControllerAdmin
24 24 * @param array $config An optional associative array of configuration settings.
25 25 *
26 26 * @return ContactControllerContacts
27   - * @see JController
  27 + * @see JController
28 28 * @since 1.6
29 29 */
30 30 public function __construct($config = array())
9 administrator/components/com_contact/models/contacts.php
@@ -20,8 +20,9 @@ class ContactModelContacts extends JModelList
20 20 /**
21 21 * Constructor.
22 22 *
23   - * @param array An optional associative array of configuration settings.
24   - * @see JController
  23 + * @param array $config An optional associative array of configuration settings.
  24 + *
  25 + * @see JController
25 26 * @since 1.6
26 27 */
27 28 public function __construct($config = array())
@@ -64,7 +65,11 @@ public function __construct($config = array())
64 65 *
65 66 * Note. Calling getState in this method will result in recursion.
66 67 *
  68 + * @param string $ordering An optional ordering field.
  69 + * @param string $direction An optional direction (asc|desc).
  70 + *
67 71 * @return void
  72 + *
68 73 * @since 1.6
69 74 */
70 75 protected function populateState($ordering = null, $direction = null)
3  administrator/components/com_contact/tables/contact.php
@@ -202,7 +202,8 @@ public function check()
202 202 $after_clean = JString::str_ireplace($bad_characters, "", $this->metakey); // remove bad characters
203 203 $keys = explode(',', $after_clean); // create array using commas as delimiter
204 204 $clean_keys = array();
205   - foreach ($keys as $key)
  205 +
  206 + foreach($keys as $key)
206 207 {
207 208 if (trim($key)) { // ignore blank keywords
208 209 $clean_keys[] = trim($key);
2  administrator/components/com_content/controllers/articles.php
@@ -24,7 +24,7 @@ class ContentControllerArticles extends JControllerAdmin
24 24 * @param array $config An optional associative array of configuration settings.
25 25
26 26 * @return ContentControllerArticles
27   - * @see JController
  27 + * @see JController
28 28 * @since 1.6
29 29 */
30 30 public function __construct($config = array())
2  administrator/components/com_content/models/article.php
@@ -221,7 +221,7 @@ protected function prepareTable($table)
221 221 {
222 222 // Set the publish date to now
223 223 $db = $this->getDbo();
224   - if ($table->state == 1 && (int) $table->publish_up == 0)
  224 + if($table->state == 1 && (int) $table->publish_up == 0)
225 225 {
226 226 $table->publish_up = JFactory::getDate()->toSql();
227 227 }
9 administrator/components/com_content/models/articles.php
@@ -20,9 +20,10 @@ class ContentModelArticles extends JModelList
20 20 /**
21 21 * Constructor.
22 22 *
23   - * @param array An optional associative array of configuration settings.
24   - * @see JController
  23 + * @param array $config An optional associative array of configuration settings.
  24 + *
25 25 * @since 1.6
  26 + * @see JController
26 27 */
27 28 public function __construct($config = array())
28 29 {
@@ -64,7 +65,11 @@ public function __construct($config = array())
64 65 *
65 66 * Note. Calling getState in this method will result in recursion.
66 67 *
  68 + * @param string $ordering An optional ordering field.
  69 + * @param string $direction An optional direction (asc|desc).
  70 + *
67 71 * @return void
  72 + *
68 73 * @since 1.6
69 74 */
70 75 protected function populateState($ordering = null, $direction = null)
2  administrator/components/com_content/models/featured.php
@@ -23,7 +23,7 @@ class ContentModelFeatured extends ContentModelArticles
2  administrator/components/com_installer/controllers/manage.php
@@ -23,7 +23,7 @@ class InstallerControllerManage extends JControllerLegacy
23 23 *
24 24 * @param array $config An optional associative array of configuration settings.
25 25 *
26   - * @see JController
  26 + * @see JController
27 27 * @since 1.6
28 28 */
29 29 public function __construct($config = array())
2  administrator/components/com_installer/models/extension.php
@@ -24,7 +24,7 @@ class InstallerModel extends JModelList
24 24 *
25 25 * @param array $config An optional associative array of configuration settings.
26 26 *
27   - * @see JController
  27 + * @see JController
28 28 * @since 1.6
29 29 */
30 30 public function __construct($config = array())
2  administrator/components/com_installer/models/update.php
@@ -25,7 +25,7 @@ class InstallerModelUpdate extends JModelList
25 25 *
26 26 * @param array $config An optional associative array of configuration settings.
27 27 *
28   - * @see JController
  28 + * @see JController
29 29 * @since 1.6
30 30 */
31 31 public function __construct($config = array())
2  administrator/components/com_installer/models/warnings.php
@@ -29,7 +29,7 @@ class InstallerModelWarnings extends JModelList
29 29 *
30 30 * @param string $val String optionally with G, M or K suffix
31 31 *
32   - * @return int size in bytes
  32 + * @return integer size in bytes
33 33 *
34 34 * @since 1.6
35 35 */
3  administrator/components/com_installer/views/warnings/tmpl/default.php
@@ -28,7 +28,8 @@
28 28 else
29 29 {
30 30 echo JHtml::_('sliders.start', 'warning-sliders', array('useCookie' => 1));
31   - foreach ($this->messages as $message)
  31 +
  32 + foreach($this->messages as $message)
32 33 {
33 34 echo JHtml::_('sliders.panel', $message['message'], str_replace(' ', '', $message['message']));
34 35 echo '<div style="padding: 5px;" >'.$message['description'].'</div>';
3  administrator/components/com_joomlaupdate/models/default.php
@@ -405,6 +405,7 @@ public function createRestorationFile($basename = null)
405 405
406 406 // If we still have no writable directory, we'll try /tmp and the system's temp-directory
407 407 $writable = @is_writeable($tempdir);
  408 +
408 409 if (!$writable)
409 410 {
410 411 if (@is_dir('/tmp') && @is_writable('/tmp'))
@@ -415,6 +416,7 @@ public function createRestorationFile($basename = null)
415 416 $tmpfile = @tempnam("dummy", "");
416 417 $systemp = @dirname($tmpfile);
417 418 @unlink($tmpfile);
  419 +
418 420 if (!empty($systemp))
419 421 {
420 422 if (@is_dir($systemp) && @is_writable($systemp))
@@ -458,6 +460,7 @@ public function createRestorationFile($basename = null)
458 460 if($result !== false) $result = true;
459 461 } else {
460 462 $fp = @fopen($configpath, 'wt');
  463 +
461 464 if ($fp !== false)
462 465 {
463 466 $result = @fwrite($fp, $data);
6 administrator/components/com_languages/models/languages.php
@@ -22,7 +22,7 @@ class LanguagesModelLanguages extends JModelList
22 22 * Constructor.
23 23 *
24 24 * @param array An optional associative array of configuration settings.
25   - * @see JController
  25 + * @see JController
26 26 * @since 1.6
27 27 */
28 28 public function __construct($config = array())
@@ -51,7 +51,11 @@ public function __construct($config = array())
51 51 *
52 52 * Note. Calling getState in this method will result in recursion.
53 53 *
  54 + * @param string $ordering An optional ordering field.
  55 + * @param string $direction An optional direction (asc|desc).
  56 + *
54 57 * @return void
  58 + *
55 59 * @since 1.6
56 60 */
57 61 protected function populateState($ordering = null, $direction = null)
2  administrator/components/com_languages/models/overrides.php
@@ -211,7 +211,7 @@ public function getLanguages()
211 211 *
212 212 * @param array Array of keys to delete
213 213 *
214   - * @return int Number of successfully deleted overrides, boolean false if an error occured
  214 + * @return integer Number of successfully deleted overrides, boolean false if an error occured
215 215 *
216 216 * @since 2.5
217 217 */
1  administrator/components/com_media/helpers/media.php
@@ -132,6 +132,7 @@ public static function canUpload($file, &$err)
132 132
133 133 $xss_check = file_get_contents($file['tmp_name'], false, null, -1, 256);
134 134 $html_tags = array('abbr', 'acronym', 'address', 'applet', 'area', 'audioscope', 'base', 'basefont', 'bdo', 'bgsound', 'big', 'blackface', 'blink', 'blockquote', 'body', 'bq', 'br', 'button', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'comment', 'custom', 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'fn', 'font', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html', 'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'keygen', 'kbd', 'label', 'layer', 'legend', 'li', 'limittext', 'link', 'listing', 'map', 'marquee', 'menu', 'meta', 'multicol', 'nobr', 'noembed', 'noframes', 'noscript', 'nosmartquotes', 'object', 'ol', 'optgroup', 'option', 'param', 'plaintext', 'pre', 'rt', 'ruby', 's', 'samp', 'script', 'select', 'server', 'shadow', 'sidebar', 'small', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'tt', 'ul', 'var', 'wbr', 'xml', 'xmp', '!DOCTYPE', '!--');
  135 +
135 136 foreach ($html_tags as $tag)
136 137 {
137 138 // A tag is '<tagname ', so we need to add < and a space or '<tagname>'
1  administrator/components/com_media/views/media/view.html.php
@@ -58,6 +58,7 @@ public function display($tpl = null)
58 58 $displayTypes = ''; // this is what the user sees
59 59 $filterTypes = ''; // this is what controls the logic
60 60 $firstType = true;
  61 +
61 62 foreach ($types as $type)
62 63 {
63 64 if(!$firstType)
2  administrator/components/com_menus/models/items.php
@@ -22,7 +22,7 @@ class MenusModelItems extends JModelList
22 22 * Constructor.
23 23 *
24 24 * @param array An optional associative array of configuration settings.
25   - * @see JController
  25 + * @see JController
26 26 * @since 1.6
27 27 */
28 28 public function __construct($config = array())
2  administrator/components/com_menus/models/menus.php
@@ -23,7 +23,7 @@ class MenusModelMenus extends JModelList
23 23 *
24 24 * @param array An optional associative array of configuration settings.
25 25 *
26   - * @see JController
  26 + * @see JController
27 27 * @since 1.6
28 28 */
29 29 public function __construct($config = array())
2  administrator/components/com_messages/models/messages.php
@@ -22,7 +22,7 @@ class MessagesModelMessages extends JModelList
22 22 * Constructor.
23 23 *
24 24 * @param array An optional associative array of configuration settings.
25   - * @see JController
  25 + * @see JController
26 26 * @since 1.6
27 27 */
28 28 public function __construct($config = array())
3  administrator/components/com_modules/models/modules.php
@@ -22,7 +22,7 @@ class ModulesModelModules extends JModelList
22 22 * Constructor.
23 23 *
24 24 * @param array An optional associative array of configuration settings.
25   - * @see JController
  25 + * @see JController
26 26 * @since 1.6
27 27 */
28 28 public function __construct($config = array())
@@ -180,6 +180,7 @@ protected function translate(&$items)
180 180 {
181 181 $lang = JFactory::getLanguage();
182 182 $client = $this->getState('filter.client_id') ? 'administrator' : 'site';
  183 +
183 184 foreach ($items as $item)
184 185 {
185 186 $extension = $item->module;
2  administrator/components/com_modules/models/positions.php
@@ -22,7 +22,7 @@ class ModulesModelPositions extends JModelList
22 22 * Constructor.
23 23 *
24 24 * @param array An optional associative array of configuration settings.
25   - * @see JController
  25 + * @see JController
26 26 * @since 1.6
27 27 */
28 28 public function __construct($config = array())
2  administrator/components/com_newsfeeds/models/newsfeed.php
@@ -461,7 +461,7 @@ protected function prepareTable($table)
461 461 /**
462 462 * Method to change the published state of one or more records.
463 463 *
464   - * @param array $pks A list of the primary keys to change.
  464 + * @param array $pks A list of the primary keys to change.
465 465 * @param integer $value The value of the published state.
466 466 *
467 467 * @return boolean True on success.
7 administrator/components/com_newsfeeds/models/newsfeeds.php
@@ -22,7 +22,7 @@ class NewsfeedsModelNewsfeeds extends JModelList
22 22 * Constructor.
23 23 *
24 24 * @param array An optional associative array of configuration settings.
25   - * @see JController
  25 + * @see JController
26 26 * @since 1.6
27 27 */
28 28 public function __construct($config = array())
@@ -64,6 +64,11 @@ public function __construct($config = array())
64 64 *
65 65 * Note. Calling getState in this method will result in recursion.
66 66 *
  67 + * @param string $ordering An optional ordering field.
  68 + * @param string $direction An optional direction (asc|desc).
  69 + *
  70 + * @return void
  71 + *
67 72 * @since 1.6
68 73 */
69 74 protected function populateState($ordering = null, $direction = null)
3  administrator/components/com_newsfeeds/tables/newsfeed.php
@@ -30,7 +30,7 @@ public function __construct(&$db)
30 30 *
31 31 * @param array Named array
32 32 * @return null|string null is operation was satisfactory, otherwise returns an error
33   - * @see JTable:bind
  33 + * @see JTable:bind
34 34 * @since 1.5
35 35 */
36 36 public function bind($array, $ignore = '')
@@ -99,6 +99,7 @@ public function check()
99 99 $after_clean = JString::str_ireplace($bad_characters, "", $this->metakey); // remove bad characters
100 100 $keys = explode(',', $after_clean); // create array using commas as delimiter
101 101 $clean_keys = array();
  102 +
102 103 foreach ($keys as $key)
103 104 {
104 105 if (trim($key)) { // ignore blank keywords
9 administrator/components/com_plugins/models/plugins.php
@@ -22,7 +22,7 @@ class PluginsModelPlugins extends JModelList
22 22 * Constructor.
23 23 *
24 24 * @param array An optional associative array of configuration settings.
25   - * @see JController
  25 + * @see JController
26 26 * @since 1.6
27 27 */
28 28 public function __construct($config = array())
@@ -52,6 +52,11 @@ public function __construct($config = array())
52 52 *
53 53 * Note. Calling getState in this method will result in recursion.
54 54 *
  55 + * @param string $ordering An optional ordering field.
  56 + * @param string $direction An optional direction (asc|desc).
  57 + *
  58 + * @return void
  59 + *
55 60 * @since 1.6
56 61 */
57 62 protected function populateState($ordering = null, $direction = null)
@@ -151,6 +156,7 @@ protected function _getList($query, $limitstart=0, $limit=0)
151 156 $ordering = 'a.ordering';
152 157 }
153 158 $query->order($this->_db->quoteName($ordering) . ' ' . $this->getState('list.direction'));
  159 +
154 160 if ($ordering == 'folder')
155 161 {
156 162 $query->order('a.ordering ASC');
@@ -170,6 +176,7 @@ protected function _getList($query, $limitstart=0, $limit=0)
170 176 protected function translate(&$items)
171 177 {
172 178 $lang = JFactory::getLanguage();
  179 +
173 180 foreach ($items as &$item)
174 181 {
175 182 $source = JPATH_PLUGINS . '/' . $item->folder . '/' . $item->element;
7 administrator/components/com_redirect/models/links.php
@@ -22,7 +22,7 @@ class RedirectModelLinks extends JModelList
@@ -48,6 +48,11 @@ public function __construct($config = array())
2  administrator/components/com_redirect/tables/link.php
@@ -86,7 +86,7 @@ public function check()
4 administrator/components/com_search/helpers/search.php
@@ -77,6 +77,7 @@ public static function santiseSearchWord(&$searchword, $searchphrase)
77 77
78 78 // filter out search terms that are too small
79 79 $lower_limit = $lang->getLowerLimitSearchWord();
  80 +
80 81 foreach ($aterms as $aterm)
81 82 {
82 83 if (JString::strlen($aterm) < $lower_limit)
@@ -181,6 +182,7 @@ public static function checkNoHtml($object, $searchTerm, $fields)
181 182 {
182 183 return false;
183 184 }
  185 +
184 186 foreach ($fields as $field)
185 187 {
186 188 if (!isset($object->$field))
@@ -188,10 +190,12 @@ public static function checkNoHtml($object, $searchTerm, $fields)
188 190 continue;
189 191 }
190 192 $text = $object->$field;
  193 +
191 194 foreach ($searchRegex as $regex)
192 195 {
193 196 $text = preg_replace($regex, '', $text);
194 197 }
  198 +
195 199 foreach ($terms as $term)
196 200 {
197 201 if (JString::stristr($text, $term) !== false)
11 administrator/components/com_search/models/searches.php
@@ -22,7 +22,7 @@ class SearchModelSearches extends JModelList
22 22 * Constructor.
23 23 *
24 24 * @param array An optional associative array of configuration settings.
25   - * @see JController
  25 + * @see JController
26 26 * @since 1.6
27 27 */
28 28 public function __construct($config = array())
@@ -43,6 +43,11 @@ public function __construct($config = array())
43 43 *
44 44 * Note. Calling getState in this method will result in recursion.
45 45 *
  46 + * @param string $ordering An optional ordering field.
  47 + * @param string $direction An optional direction (asc|desc).
  48 + *
  49 + * @return void
  50 + *
46 51 * @since 1.6
47 52 */
48 53 protected function populateState($ordering = null, $direction = null)
@@ -74,6 +79,7 @@ protected function populateState($ordering = null, $direction = null)
74 79 * @param string $id A prefix for the store id.
75 80 *
76 81 * @return string A store id.
  82 + * @since 1.6
77 83 */
78 84 protected function getStoreId($id = '')
79 85 {
@@ -88,6 +94,7 @@ protected function getStoreId($id = '')
88 94 * Build an SQL query to load the list data.
89 95 *
90 96 * @return JDatabaseQuery
  97 + * @since 1.6
91 98 */
92 99 protected function getListQuery()
93 100 {
@@ -129,6 +136,7 @@ protected function getListQuery()
129 136 * Override the parnet getItems to inject optional data.
130 137 *
131 138 * @return mixed An array of objects on success, false on failure.
  139 + * @since 1.6
132 140 */
133 141 public function getItems()
134 142 {
@@ -165,6 +173,7 @@ public function getItems()
165 173 * Method to reset the seach log table.
166 174 *
167 175 * @return boolean
  176 + * @since 1.6
168 177 */
169 178 public function reset()
170 179 {
2  administrator/components/com_templates/controllers/source.php
@@ -22,7 +22,7 @@ class TemplatesControllerSource extends JControllerLegacy
22 22 * Constructor.
23 23 *
24 24 * @param array An optional associative array of configuration settings.
25   - * @see JController
  25 + * @see JController
26 26 */
27 27 public function __construct($config = array())
28 28 {
7 administrator/components/com_templates/models/styles.php
@@ -22,7 +22,7 @@ class TemplatesModelStyles extends JModelList
22 22 * Constructor.
23 23 *
24 24 * @param array An optional associative array of configuration settings.
25   - * @see JController
  25 + * @see JController
26 26 * @since 1.6
27 27 */
28 28 public function __construct($config = array())
@@ -46,6 +46,11 @@ public function __construct($config = array())
46 46 *
47 47 * Note. Calling getState in this method will result in recursion.
48 48 *
  49 + * @param string $ordering An optional ordering field.
  50 + * @param string $direction An optional direction (asc|desc).
  51 + *
  52 + * @return void
  53 + *
49 54 * @since 1.6
50 55 */
51 56 protected function populateState($ordering = null, $direction = null)
2  administrator/components/com_templates/models/templates.php
@@ -22,7 +22,7 @@ class TemplatesModelTemplates extends JModelList
22 22 * Constructor.
23 23 *
24 24 * @param array An optional associative array of configuration settings.
25   - * @see JController
  25 + * @see JController
26 26 * @since 1.6
27 27 */
28 28 public function __construct($config = array())
2  administrator/components/com_users/models/groups.php
@@ -22,7 +22,7 @@ class UsersModelGroups extends JModelList
22 22 * Constructor.
23 23 *
24 24 * @param array An optional associative array of configuration settings.
25   - * @see JController
  25 + * @see JController
26 26 * @since 1.6
27 27 */
28 28 public function __construct($config = array())
2  administrator/components/com_users/models/levels.php
@@ -22,7 +22,7 @@ class UsersModelLevels extends JModelList
22 22 * Constructor.
23 23 *
24 24 * @param array An optional associative array of configuration settings.
25   - * @see JController
  25 + * @see JController
26 26 * @since 1.6
27 27 */
28 28 public function __construct($config = array())
2  administrator/components/com_weblinks/models/weblinks.php
@@ -22,7 +22,7 @@ class WeblinksModelWeblinks extends JModelList
3  administrator/components/com_weblinks/tables/weblink.php
@@ -33,7 +33,7 @@ public function __construct(&$db)
@@ -173,6 +173,7 @@ public function check()
6 administrator/includes/application.php
@@ -187,8 +187,8 @@ public function render()
187 187 // Safety check for when configuration.php root_user is in use.
188 188 $config = JFactory::getConfig();
189 189 $rootUser = $config->get('root_user');
190   - if (property_exists('JConfig', 'root_user') &&
191   - (JFactory::getUser()->get('username') == $rootUser || JFactory::getUser()->id === (string) $rootUser))
  190 + if (property_exists('JConfig', 'root_user')
  191 + && (JFactory::getUser()->get('username') == $rootUser || JFactory::getUser()->id === (string) $rootUser))
192 192 {
193 193 JError::raiseNotice(200, JText::sprintf('JWARNING_REMOVE_ROOT_USER', 'index.php?option=com_config&task=application.removeroot&'. JSession::getFormToken() .'=1'));
194 194 }
@@ -216,7 +216,7 @@ public function render()
216 216 * @param array Array('remember' => boolean)
217 217 *
218 218 * @return boolean True on success.
219   - * @see JApplication::login
  219 + * @see JApplication::login
220 220 * @since 1.5
221 221 */
222 222 public function login($credentials, $options = array())
1  administrator/templates/hathor/html/com_banners/banner/edit.php
@@ -33,6 +33,7 @@
33 33 document.id('url').setStyle('display', 'none');
34 34 document.id('custom').setStyle('display', 'block');
35 35 });
  36 +
36 37 if (document.id('jform_type0').checked==true)
37 38 {
38 39 document.id('jform_type0').fireEvent('click');
4 administrator/templates/isis/login.php
@@ -60,10 +60,10 @@
60 60 <style type="text/css">
61 61 /* Responsive Styles */
62 62 @media (max-width: 480px) {
63   - .view-login .container{
  63 + .view-login .container {
64 64 margin-top: -170px;
65 65 }
66   - .btn{
  66 + .btn {
67 67 font-size: 13px;
68 68 padding: 4px 10px 4px;
69 69 }
18 build/build.php
@@ -75,39 +75,25 @@
75 75 // Note: If we add new top-level directories or files, be sure to include them here.
76 76 $filesArray = array(
77 77 "administrator/index.php\n" => true,
78   -
79 78 "cache/index.html\n" => true,
80   -
81 79 "cli/index.html\n" => true,
82   -
83 80 "components/index.html\n" => true,
84   -
85 81 "images/index.html\n" => true,
86   -
87 82 "includes/index.html\n" => true,
88   -
89 83 "language/index.html\n" => true,
90 84 "layouts/index.html\n" => true,
91 85 "libraries/index.html\n" => true,
92   -
93 86 "logs/index.html\n" => true,
94   -
95 87 "media/index.html\n" => true,
96   -
97 88 "modules/index.html\n" => true,
98   -
99 89 "plugins/index.html\n" => true,
100   -
101 90 "templates/index.html\n" => true,
102   -
103 91 "tmp/index.html\n" => true,
104   -
105 92 "htaccess.txt\n" => true,
106 93 "index.php\n" => true,
107 94 "LICENSE.txt\n" => true,
108 95 "README.txt\n" => true,
109 96 "robots.txt\n" => true,
110   -
111 97 "web.config.txt\n" => true,
112 98 "joomla.xml\n" => true,
113 99 );
@@ -151,13 +137,11 @@
151 137 file_put_contents('diffconvert/'.$version.'.'.$num.'-deleted', $deletedFiles);
152 138
153 139 // Only create archives for 0 and most recent versions. Skip other update versions.
154   -
155 140 if ($num != 0 && ($num != $release - 1))
156 141 {
157 142 echo "Skipping create archive for version $version.$num\n";
158 143
159 144 continue;
160   -
161 145 }
162 146
163 147 // Create the diff archive packages using the file name list.
@@ -195,4 +179,4 @@
195 179
196 180 system('zip -r ../packages_full'.$full.'/Joomla_'.$full.'-Stable-Update_Package.zip * > /dev/null');
197 181
198   -echo "Build of version $full complete!\n";
  182 +echo "Build of version $full complete!\n";
1,407 build/libraries/less/lessc.php
@@ -65,10 +65,13 @@ class lessc {
65 65 static protected $nextImportId = 0; // uniquely identify imports
66 66
67 67 // attempts to find the path of an import url, returns null for css files
68   - protected function findImport($url) {
69   - foreach ((array)$this->importDir as $dir) {
  68 + protected function findImport($url)
  69 + {
  70 + foreach ((array)$this->importDir as $dir)
  71 + {
70 72 $full = $dir.(substr($dir, -1) != '/' ? '/' : '').$url;
71   - if ($this->fileExists($file = $full.'.less') || $this->fileExists($file = $full)) {
  73 + if ($this->fileExists($file = $full.'.less') || $this->fileExists($file = $full))
  74 + {
72 75 return $file;
73 76 }
74 77 }
@@ -76,21 +79,26 @@ protected function findImport($url) {
76 79 return null;
77 80 }
78 81
79   - protected function fileExists($name) {
  82 + protected function fileExists($name)
  83 + {
80 84 return is_file($name);
81 85 }
82 86
83   - static public function compressList($items, $delim) {
  87 + static public function compressList($items, $delim)
  88 + {
84 89 if (!isset($items[1]) && isset($items[0])) return $items[0];
85 90 else return array('list', $delim, $items);
86 91 }
87 92
88   - static public function preg_quote($what) {
  93 + static public function preg_quote($what)
  94 + {
89 95 return preg_quote($what, '/');
90 96 }
91 97
92   - protected function tryImport($importPath, $parentBlock, $out) {
93   - if ($importPath[0] == "function" && $importPath[1] == "url") {
  98 + protected function tryImport($importPath, $parentBlock, $out)
  99 + {
  100 + if ($importPath[0] == "function" && $importPath[1] == "url")
  101 + {
94 102 $importPath = $this->flattenList($importPath[2]);
95 103 }
96 104
@@ -105,7 +113,8 @@ protected function tryImport($importPath, $parentBlock, $out) {
105 113 $realPath = $this->findImport($url);
106 114 if ($realPath === null) return false;
107 115
108   - if ($this->importDisabled) {
  116 + if ($this->importDisabled)
  117 + {
109 118 return array(false, "/* import disabled */");
110 119 }
111 120
@@ -114,8 +123,10 @@ protected function tryImport($importPath, $parentBlock, $out) {
114 123 $root = $parser->parse(file_get_contents($realPath));
115 124
116 125 // set the parents of all the block props
117   - foreach ($root->props as $prop) {
118   - if ($prop[0] == "block") {
  126 + foreach ($root->props as $prop)
  127 + {
  128 + if ($prop[0] == "block")
  129 + {
119 130 $prop[1]->parent = $parentBlock;
120 131 }
121 132 }
@@ -123,8 +134,10 @@ protected function tryImport($importPath, $parentBlock, $out) {
123 134 // copy mixins into scope, set their parents
124 135 // bring blocks from import into current block
125 136 // TODO: need to mark the source parser these came from this file
126   - foreach ($root->children as $childName => $child) {
127   - if (isset($parentBlock->children[$childName])) {
  137 + foreach ($root->children as $childName => $child)
  138 + {
  139 + if (isset($parentBlock->children[$childName]))
  140 + {
128 141 $parentBlock->children[$childName] = array_merge(
129 142 $parentBlock->children[$childName],
130 143 $child);
@@ -142,7 +155,8 @@ protected function tryImport($importPath, $parentBlock, $out) {
142 155 return array(true, $bottom, $parser, $dir);
143 156 }
144 157
145   - protected function compileImportedProps($props, $block, $out, $sourceParser, $importDir) {
  158 + protected function compileImportedProps($props, $block, $out, $sourceParser, $importDir)
  159 + {
146 160 $oldSourceParser = $this->sourceParser;
147 161
148 162 $oldImport = $this->importDir;
@@ -151,7 +165,8 @@ protected function compileImportedProps($props, $block, $out, $sourceParser, $im
151 165 $this->importDir = (array)$this->importDir;
152 166 array_unshift($this->importDir, $importDir);
153 167
154   - foreach ($props as $prop) {
  168 + foreach ($props as $prop)
  169 + {
155 170 $this->compileProp($prop, $block, $out);
156 171 }
157 172
@@ -180,8 +195,10 @@ protected function compileImportedProps($props, $block, $out, $sourceParser, $im
180 195 * See lessc::compileProp()
181 196 *
182 197 */
183   - protected function compileBlock($block) {
184   - switch ($block->type) {
  198 + protected function compileBlock($block)
  199 + {
  200 + switch ($block->type)
  201 + {
185 202 case "root":
186 203 $this->compileRoot($block);
187 204 break;
@@ -193,7 +210,8 @@ protected function compileBlock($block) {
193 210 break;
194 211 case "directive":
195 212 $name = "@" . $block->name;
196   - if (!empty($block->value)) {
  213 + if (!empty($block->value))
  214 + {
197 215 $name .= " " . $this->compileValue($this->reduce($block->value));
198 216 }
199 217
@@ -204,7 +222,8 @@ protected function compileBlock($block) {
204 222 }
205 223 }
206 224
207   - protected function compileCSSBlock($block) {
  225 + protected function compileCSSBlock($block)
  226 + {
208 227 $env = $this->pushEnv();
209 228
210 229 $selectors = $this->compileSelectors($block->tags);
@@ -218,7 +237,8 @@ protected function compileCSSBlock($block) {
218 237 $this->popEnv();
219 238 }
220 239
221   - protected function compileMedia($media) {
  240 + protected function compileMedia($media)
  241 + {
222 242 $env = $this->pushEnv($media);
223 243 $parentScope = $this->mediaParent($this->scope);
224 244
@@ -229,9 +249,11 @@ protected function compileMedia($media) {
229 249
230 250 $this->compileProps($media, $this->scope);
231 251
232   - if (count($this->scope->lines) > 0) {
  252 + if (count($this->scope->lines) > 0)
  253 + {
233 254 $orphanSelelectors = $this->findClosestSelectors();
234   - if (!is_null($orphanSelelectors)) {
  255 + if (!is_null($orphanSelelectors))
  256 + {
235 257 $orphan = $this->makeOutputBlock(null, $orphanSelelectors);
236 258 $orphan->lines = $this->scope->lines;
237 259 array_unshift($this->scope->children, $orphan);
@@ -243,9 +265,12 @@ protected function compileMedia($media) {
243 265 $this->popEnv();
244 266 }
245 267
246   - protected function mediaParent($scope) {
247   - while (!empty($scope->parent)) {
248   - if (!empty($scope->type) && $scope->type != "media") {
  268 + protected function mediaParent($scope)
  269 + {
  270 + while (!empty($scope->parent))
  271 + {
  272 + if (!empty($scope->type) && $scope->type != "media")
  273 + {
249 274 break;
250 275 }
251 276 $scope = $scope->parent;
@@ -254,7 +279,8 @@ protected function mediaParent($scope) {
254 279 return $scope;
255 280 }
256 281
257   - protected function compileNestedBlock($block, $selectors) {
  282 + protected function compileNestedBlock($block, $selectors)
  283 + {
258 284 $this->pushEnv($block);
259 285 $this->scope = $this->makeOutputBlock($block->type, $selectors);
260 286 $this->scope->parent->children[] = $this->scope;
@@ -265,28 +291,35 @@ protected function compileNestedBlock($block, $selectors) {
265 291 $this->popEnv();
266 292 }
267 293
268   - protected function compileRoot($root) {
  294 + protected function compileRoot($root)
  295 + {
269 296 $this->pushEnv();
270 297 $this->scope = $this->makeOutputBlock($root->type);
271 298 $this->compileProps($root, $this->scope);
272 299 $this->popEnv();
273 300 }
274 301
275   - protected function compileProps($block, $out) {
276   - foreach ($this->sortProps($block->props) as $prop) {
  302 + protected function compileProps($block, $out)
  303 + {
  304 + foreach ($this->sortProps($block->props) as $prop)
  305 + {
277 306 $this->compileProp($prop, $block, $out);
278 307