Permalink
Browse files

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

  • Loading branch information...
1 parent d2f51a8 commit c5d2c70bf6ed143c66393c2b4aab772bf47433f6 @elinw elinw committed with infograf768 Jan 20, 2013
Showing with 1,128 additions and 587 deletions.
  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
View
2 administrator/components/com_banners/controllers/banners.php
@@ -28,7 +28,7 @@ class BannersControllerBanners extends JControllerAdmin
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
2 administrator/components/com_banners/models/banners.php
@@ -22,7 +22,7 @@ class BannersModelBanners extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
2 administrator/components/com_banners/models/clients.php
@@ -22,7 +22,7 @@ class BannersModelClients extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
2 administrator/components/com_banners/models/tracks.php
@@ -22,7 +22,7 @@ class BannersModelTracks extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
2 administrator/components/com_banners/tables/banner.php
@@ -44,7 +44,7 @@ public function clicks()
* Overloaded check function
*
* @return boolean
- * @see JTable::check
+ * @see JTable::check
* @since 1.5
*/
public function check()
View
2 administrator/components/com_categories/controller.php
@@ -28,7 +28,7 @@ class CategoriesController extends JControllerLegacy
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
2 administrator/components/com_categories/models/categories.php
@@ -22,7 +22,7 @@ class CategoriesModelCategories extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
2 administrator/components/com_checkin/controller.php
@@ -77,7 +77,5 @@ protected function addSubmenu($vName)
'index.php?option=com_cache&view=purge',
$vName == 'purge'
);
-
}
-
}
View
11 administrator/components/com_checkin/models/checkin.php
@@ -25,7 +25,11 @@ class CheckinModelCheckin extends JModelList
/**
* Method to auto-populate the model state.
*
- * Note. Calling getState in this method will result in recursion.
+ * @Note. Calling getState in this method will result in recursion.
+ * @param string $ordering An optional ordering field.
+ * @param string $direction An optional direction (asc|desc).
+ *
+ * @return void
*
* @since 1.6
*/
@@ -41,8 +45,9 @@ protected function populateState($ordering = null, $direction = null)
/**
* Checks in requested tables
*
- * @param array An array of table names. Optional.
- * @return int Checked in item count
+ * @param array $ids An array of table names. Optional.
+ *
+ * @return integer Checked in item count
* @since 1.6
*/
public function checkin($ids = array())
View
2 administrator/components/com_contact/controllers/contacts.php
@@ -24,7 +24,7 @@ class ContactControllerContacts extends JControllerAdmin
* @param array $config An optional associative array of configuration settings.
*
* @return ContactControllerContacts
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
9 administrator/components/com_contact/models/contacts.php
@@ -20,8 +20,9 @@ class ContactModelContacts extends JModelList
/**
* Constructor.
*
- * @param array An optional associative array of configuration settings.
- * @see JController
+ * @param array $config An optional associative array of configuration settings.
+ *
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
@@ -64,7 +65,11 @@ public function __construct($config = array())
*
* Note. Calling getState in this method will result in recursion.
*
+ * @param string $ordering An optional ordering field.
+ * @param string $direction An optional direction (asc|desc).
+ *
* @return void
+ *
* @since 1.6
*/
protected function populateState($ordering = null, $direction = null)
View
3 administrator/components/com_contact/tables/contact.php
@@ -202,7 +202,8 @@ public function check()
$after_clean = JString::str_ireplace($bad_characters, "", $this->metakey); // remove bad characters
$keys = explode(',', $after_clean); // create array using commas as delimiter
$clean_keys = array();
- foreach ($keys as $key)
+
+ foreach($keys as $key)
{
if (trim($key)) { // ignore blank keywords
$clean_keys[] = trim($key);
View
2 administrator/components/com_content/controllers/articles.php
@@ -24,7 +24,7 @@ class ContentControllerArticles extends JControllerAdmin
* @param array $config An optional associative array of configuration settings.
* @return ContentControllerArticles
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
2 administrator/components/com_content/models/article.php
@@ -221,7 +221,7 @@ protected function prepareTable($table)
{
// Set the publish date to now
$db = $this->getDbo();
- if ($table->state == 1 && (int) $table->publish_up == 0)
+ if($table->state == 1 && (int) $table->publish_up == 0)
{
$table->publish_up = JFactory::getDate()->toSql();
}
View
9 administrator/components/com_content/models/articles.php
@@ -20,9 +20,10 @@ class ContentModelArticles extends JModelList
/**
* Constructor.
*
- * @param array An optional associative array of configuration settings.
- * @see JController
+ * @param array $config An optional associative array of configuration settings.
+ *
* @since 1.6
+ * @see JController
*/
public function __construct($config = array())
{
@@ -64,7 +65,11 @@ public function __construct($config = array())
*
* Note. Calling getState in this method will result in recursion.
*
+ * @param string $ordering An optional ordering field.
+ * @param string $direction An optional direction (asc|desc).
+ *
* @return void
+ *
* @since 1.6
*/
protected function populateState($ordering = null, $direction = null)
View
2 administrator/components/com_content/models/featured.php
@@ -23,7 +23,7 @@ class ContentModelFeatured extends ContentModelArticles
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
2 administrator/components/com_installer/controllers/manage.php
@@ -23,7 +23,7 @@ class InstallerControllerManage extends JControllerLegacy
*
* @param array $config An optional associative array of configuration settings.
*
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
2 administrator/components/com_installer/models/extension.php
@@ -24,7 +24,7 @@ class InstallerModel extends JModelList
*
* @param array $config An optional associative array of configuration settings.
*
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
2 administrator/components/com_installer/models/update.php
@@ -25,7 +25,7 @@ class InstallerModelUpdate extends JModelList
*
* @param array $config An optional associative array of configuration settings.
*
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
2 administrator/components/com_installer/models/warnings.php
@@ -29,7 +29,7 @@ class InstallerModelWarnings extends JModelList
*
* @param string $val String optionally with G, M or K suffix
*
- * @return int size in bytes
+ * @return integer size in bytes
*
* @since 1.6
*/
View
3 administrator/components/com_installer/views/warnings/tmpl/default.php
@@ -28,7 +28,8 @@
else
{
echo JHtml::_('sliders.start', 'warning-sliders', array('useCookie' => 1));
- foreach ($this->messages as $message)
+
+ foreach($this->messages as $message)
{
echo JHtml::_('sliders.panel', $message['message'], str_replace(' ', '', $message['message']));
echo '<div style="padding: 5px;" >'.$message['description'].'</div>';
View
3 administrator/components/com_joomlaupdate/models/default.php
@@ -405,6 +405,7 @@ public function createRestorationFile($basename = null)
// If we still have no writable directory, we'll try /tmp and the system's temp-directory
$writable = @is_writeable($tempdir);
+
if (!$writable)
{
if (@is_dir('/tmp') && @is_writable('/tmp'))
@@ -415,6 +416,7 @@ public function createRestorationFile($basename = null)
$tmpfile = @tempnam("dummy", "");
$systemp = @dirname($tmpfile);
@unlink($tmpfile);
+
if (!empty($systemp))
{
if (@is_dir($systemp) && @is_writable($systemp))
@@ -458,6 +460,7 @@ public function createRestorationFile($basename = null)
if($result !== false) $result = true;
} else {
$fp = @fopen($configpath, 'wt');
+
if ($fp !== false)
{
$result = @fwrite($fp, $data);
View
6 administrator/components/com_languages/models/languages.php
@@ -22,7 +22,7 @@ class LanguagesModelLanguages extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
@@ -51,7 +51,11 @@ public function __construct($config = array())
*
* Note. Calling getState in this method will result in recursion.
*
+ * @param string $ordering An optional ordering field.
+ * @param string $direction An optional direction (asc|desc).
+ *
* @return void
+ *
* @since 1.6
*/
protected function populateState($ordering = null, $direction = null)
View
2 administrator/components/com_languages/models/overrides.php
@@ -211,7 +211,7 @@ public function getLanguages()
*
* @param array Array of keys to delete
*
- * @return int Number of successfully deleted overrides, boolean false if an error occured
+ * @return integer Number of successfully deleted overrides, boolean false if an error occured
*
* @since 2.5
*/
View
1 administrator/components/com_media/helpers/media.php
@@ -132,6 +132,7 @@ public static function canUpload($file, &$err)
$xss_check = file_get_contents($file['tmp_name'], false, null, -1, 256);
$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', '!--');
+
foreach ($html_tags as $tag)
{
// A tag is '<tagname ', so we need to add < and a space or '<tagname>'
View
1 administrator/components/com_media/views/media/view.html.php
@@ -58,6 +58,7 @@ public function display($tpl = null)
$displayTypes = ''; // this is what the user sees
$filterTypes = ''; // this is what controls the logic
$firstType = true;
+
foreach ($types as $type)
{
if(!$firstType)
View
2 administrator/components/com_menus/models/items.php
@@ -22,7 +22,7 @@ class MenusModelItems extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
2 administrator/components/com_menus/models/menus.php
@@ -23,7 +23,7 @@ class MenusModelMenus extends JModelList
*
* @param array An optional associative array of configuration settings.
*
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
2 administrator/components/com_messages/models/messages.php
@@ -22,7 +22,7 @@ class MessagesModelMessages extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
3 administrator/components/com_modules/models/modules.php
@@ -22,7 +22,7 @@ class ModulesModelModules extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
@@ -180,6 +180,7 @@ protected function translate(&$items)
{
$lang = JFactory::getLanguage();
$client = $this->getState('filter.client_id') ? 'administrator' : 'site';
+
foreach ($items as $item)
{
$extension = $item->module;
View
2 administrator/components/com_modules/models/positions.php
@@ -22,7 +22,7 @@ class ModulesModelPositions extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
2 administrator/components/com_newsfeeds/models/newsfeed.php
@@ -461,7 +461,7 @@ protected function prepareTable($table)
/**
* Method to change the published state of one or more records.
*
- * @param array $pks A list of the primary keys to change.
+ * @param array $pks A list of the primary keys to change.
* @param integer $value The value of the published state.
*
* @return boolean True on success.
View
7 administrator/components/com_newsfeeds/models/newsfeeds.php
@@ -22,7 +22,7 @@ class NewsfeedsModelNewsfeeds extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
@@ -64,6 +64,11 @@ public function __construct($config = array())
*
* Note. Calling getState in this method will result in recursion.
*
+ * @param string $ordering An optional ordering field.
+ * @param string $direction An optional direction (asc|desc).
+ *
+ * @return void
+ *
* @since 1.6
*/
protected function populateState($ordering = null, $direction = null)
View
3 administrator/components/com_newsfeeds/tables/newsfeed.php
@@ -30,7 +30,7 @@ public function __construct(&$db)
*
* @param array Named array
* @return null|string null is operation was satisfactory, otherwise returns an error
- * @see JTable:bind
+ * @see JTable:bind
* @since 1.5
*/
public function bind($array, $ignore = '')
@@ -99,6 +99,7 @@ public function check()
$after_clean = JString::str_ireplace($bad_characters, "", $this->metakey); // remove bad characters
$keys = explode(',', $after_clean); // create array using commas as delimiter
$clean_keys = array();
+
foreach ($keys as $key)
{
if (trim($key)) { // ignore blank keywords
View
9 administrator/components/com_plugins/models/plugins.php
@@ -22,7 +22,7 @@ class PluginsModelPlugins extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
@@ -52,6 +52,11 @@ public function __construct($config = array())
*
* Note. Calling getState in this method will result in recursion.
*
+ * @param string $ordering An optional ordering field.
+ * @param string $direction An optional direction (asc|desc).
+ *
+ * @return void
+ *
* @since 1.6
*/
protected function populateState($ordering = null, $direction = null)
@@ -151,6 +156,7 @@ protected function _getList($query, $limitstart=0, $limit=0)
$ordering = 'a.ordering';
}
$query->order($this->_db->quoteName($ordering) . ' ' . $this->getState('list.direction'));
+
if ($ordering == 'folder')
{
$query->order('a.ordering ASC');
@@ -170,6 +176,7 @@ protected function _getList($query, $limitstart=0, $limit=0)
protected function translate(&$items)
{
$lang = JFactory::getLanguage();
+
foreach ($items as &$item)
{
$source = JPATH_PLUGINS . '/' . $item->folder . '/' . $item->element;
View
7 administrator/components/com_redirect/models/links.php
@@ -22,7 +22,7 @@ class RedirectModelLinks extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
@@ -48,6 +48,11 @@ public function __construct($config = array())
*
* Note. Calling getState in this method will result in recursion.
*
+ * @param string $ordering An optional ordering field.
+ * @param string $direction An optional direction (asc|desc).
+ *
+ * @return void
+ *
* @since 1.6
*/
protected function populateState($ordering = null, $direction = null)
View
2 administrator/components/com_redirect/tables/link.php
@@ -86,7 +86,7 @@ public function check()
* @param boolean True to update fields even if they are null.
*
* @return boolean True on success.
- * @see JTable::store
+ * @see JTable::store
* @since 1.6
*/
public function store($updateNulls = false)
View
4 administrator/components/com_search/helpers/search.php
@@ -77,6 +77,7 @@ public static function santiseSearchWord(&$searchword, $searchphrase)
// filter out search terms that are too small
$lower_limit = $lang->getLowerLimitSearchWord();
+
foreach ($aterms as $aterm)
{
if (JString::strlen($aterm) < $lower_limit)
@@ -181,17 +182,20 @@ public static function checkNoHtml($object, $searchTerm, $fields)
{
return false;
}
+
foreach ($fields as $field)
{
if (!isset($object->$field))
{
continue;
}
$text = $object->$field;
+
foreach ($searchRegex as $regex)
{
$text = preg_replace($regex, '', $text);
}
+
foreach ($terms as $term)
{
if (JString::stristr($text, $term) !== false)
View
11 administrator/components/com_search/models/searches.php
@@ -22,7 +22,7 @@ class SearchModelSearches extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
@@ -43,6 +43,11 @@ public function __construct($config = array())
*
* Note. Calling getState in this method will result in recursion.
*
+ * @param string $ordering An optional ordering field.
+ * @param string $direction An optional direction (asc|desc).
+ *
+ * @return void
+ *
* @since 1.6
*/
protected function populateState($ordering = null, $direction = null)
@@ -74,6 +79,7 @@ protected function populateState($ordering = null, $direction = null)
* @param string $id A prefix for the store id.
*
* @return string A store id.
+ * @since 1.6
*/
protected function getStoreId($id = '')
{
@@ -88,6 +94,7 @@ protected function getStoreId($id = '')
* Build an SQL query to load the list data.
*
* @return JDatabaseQuery
+ * @since 1.6
*/
protected function getListQuery()
{
@@ -129,6 +136,7 @@ protected function getListQuery()
* Override the parnet getItems to inject optional data.
*
* @return mixed An array of objects on success, false on failure.
+ * @since 1.6
*/
public function getItems()
{
@@ -165,6 +173,7 @@ public function getItems()
* Method to reset the seach log table.
*
* @return boolean
+ * @since 1.6
*/
public function reset()
{
View
2 administrator/components/com_templates/controllers/source.php
@@ -22,7 +22,7 @@ class TemplatesControllerSource extends JControllerLegacy
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
*/
public function __construct($config = array())
{
View
7 administrator/components/com_templates/models/styles.php
@@ -22,7 +22,7 @@ class TemplatesModelStyles extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
@@ -46,6 +46,11 @@ public function __construct($config = array())
*
* Note. Calling getState in this method will result in recursion.
*
+ * @param string $ordering An optional ordering field.
+ * @param string $direction An optional direction (asc|desc).
+ *
+ * @return void
+ *
* @since 1.6
*/
protected function populateState($ordering = null, $direction = null)
View
2 administrator/components/com_templates/models/templates.php
@@ -22,7 +22,7 @@ class TemplatesModelTemplates extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
2 administrator/components/com_users/models/groups.php
@@ -22,7 +22,7 @@ class UsersModelGroups extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
2 administrator/components/com_users/models/levels.php
@@ -22,7 +22,7 @@ class UsersModelLevels extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
2 administrator/components/com_weblinks/models/weblinks.php
@@ -22,7 +22,7 @@ class WeblinksModelWeblinks extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
3 administrator/components/com_weblinks/tables/weblink.php
@@ -33,7 +33,7 @@ public function __construct(&$db)
*
* @param array Named array
* @return null|string null is operation was satisfactory, otherwise returns an error
- * @see JTable:bind
+ * @see JTable:bind
* @since 1.5
*/
public function bind($array, $ignore = '')
@@ -173,6 +173,7 @@ public function check()
$after_clean = JString::str_ireplace($bad_characters, "", $this->metakey); // remove bad characters
$keys = explode(',', $after_clean); // create array using commas as delimiter
$clean_keys = array();
+
foreach ($keys as $key)
{
if (trim($key)) { // ignore blank keywords
View
6 administrator/includes/application.php
@@ -187,8 +187,8 @@ public function render()
// Safety check for when configuration.php root_user is in use.
$config = JFactory::getConfig();
$rootUser = $config->get('root_user');
- if (property_exists('JConfig', 'root_user') &&
- (JFactory::getUser()->get('username') == $rootUser || JFactory::getUser()->id === (string) $rootUser))
+ if (property_exists('JConfig', 'root_user')
+ && (JFactory::getUser()->get('username') == $rootUser || JFactory::getUser()->id === (string) $rootUser))
{
JError::raiseNotice(200, JText::sprintf('JWARNING_REMOVE_ROOT_USER', 'index.php?option=com_config&task=application.removeroot&'. JSession::getFormToken() .'=1'));
}
@@ -216,7 +216,7 @@ public function render()
* @param array Array('remember' => boolean)
*
* @return boolean True on success.
- * @see JApplication::login
+ * @see JApplication::login
* @since 1.5
*/
public function login($credentials, $options = array())
View
1 administrator/templates/hathor/html/com_banners/banner/edit.php
@@ -33,6 +33,7 @@
document.id('url').setStyle('display', 'none');
document.id('custom').setStyle('display', 'block');
});
+
if (document.id('jform_type0').checked==true)
{
document.id('jform_type0').fireEvent('click');
View
4 administrator/templates/isis/login.php
@@ -60,10 +60,10 @@
<style type="text/css">
/* Responsive Styles */
@media (max-width: 480px) {
- .view-login .container{
+ .view-login .container {
margin-top: -170px;
}
- .btn{
+ .btn {
font-size: 13px;
padding: 4px 10px 4px;
}
View
18 build/build.php
@@ -75,39 +75,25 @@
// Note: If we add new top-level directories or files, be sure to include them here.
$filesArray = array(
"administrator/index.php\n" => true,
-
"cache/index.html\n" => true,
-
"cli/index.html\n" => true,
-
"components/index.html\n" => true,
-
"images/index.html\n" => true,
-
"includes/index.html\n" => true,
-
"language/index.html\n" => true,
"layouts/index.html\n" => true,
"libraries/index.html\n" => true,
-
"logs/index.html\n" => true,
-
"media/index.html\n" => true,
-
"modules/index.html\n" => true,
-
"plugins/index.html\n" => true,
-
"templates/index.html\n" => true,
-
"tmp/index.html\n" => true,
-
"htaccess.txt\n" => true,
"index.php\n" => true,
"LICENSE.txt\n" => true,
"README.txt\n" => true,
"robots.txt\n" => true,
-
"web.config.txt\n" => true,
"joomla.xml\n" => true,
);
@@ -151,13 +137,11 @@
file_put_contents('diffconvert/'.$version.'.'.$num.'-deleted', $deletedFiles);
// Only create archives for 0 and most recent versions. Skip other update versions.
-
if ($num != 0 && ($num != $release - 1))
{
echo "Skipping create archive for version $version.$num\n";
continue;
-
}
// Create the diff archive packages using the file name list.
@@ -195,4 +179,4 @@
system('zip -r ../packages_full'.$full.'/Joomla_'.$full.'-Stable-Update_Package.zip * > /dev/null');
-echo "Build of version $full complete!\n";
+echo "Build of version $full complete!\n";
View
1,407 build/libraries/less/lessc.php
946 additions, 461 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
2 components/com_contact/models/category.php
@@ -51,7 +51,7 @@ class ContactModelCategory extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
2 components/com_contact/models/featured.php
@@ -50,7 +50,7 @@ class ContactModelFeatured extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
2 components/com_content/models/articles.php
@@ -22,7 +22,7 @@ class ContentModelArticles extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
2 components/com_content/models/category.php
@@ -61,7 +61,7 @@ class ContentModelCategory extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
2 components/com_finder/views/search/tmpl/default_result.php
@@ -34,4 +34,4 @@
<?php if ($this->params->get('show_url', 1)): ?>
<small class="small result-url<?php echo $this->pageclass_sfx; ?>"><?php echo $base . JRoute::_($this->result->route); ?></small>
<?php endif; ?>
-</li>
+</li>
View
2 components/com_newsfeeds/models/category.php
@@ -53,7 +53,7 @@ class NewsfeedsModelCategory extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
2 components/com_weblinks/models/category.php
@@ -37,7 +37,7 @@ class WeblinksModelCategory extends JModelList
* Constructor.
*
* @param array An optional associative array of configuration settings.
- * @see JController
+ * @see JController
* @since 1.6
*/
public function __construct($config = array())
View
4 components/com_weblinks/models/weblink.php
@@ -95,9 +95,9 @@ public function &getItem($id = null)
/**
* Method to increment the hit counter for the weblink
*
- * @param integer Optional ID of the weblink.
+ * @param integer $id Optional ID of the weblink.
+ *
* @return boolean True on success
- * @since 1.5
*/
public function hit($id = null)
{
View
3 includes/application.php
@@ -482,6 +482,7 @@ public function getTemplate($params = false)
$db->setQuery($query);
$templates = $db->loadObjectList('id');
+
foreach ($templates as &$template)
{
$registry = new JRegistry;
@@ -665,7 +666,7 @@ public function setDetectBrowser($state=false)
* @param boolean True if the enqueued messages are passed to the redirection, false else.
* @return none; calls exit().
* @since 1.5
- * @see JApplication::enqueueMessage()
+ * @see JApplication::enqueueMessage()
*/
public function redirect($url, $msg='', $msgType='message', $moved = false, $persistMsg = true)
{
View
3 installation/CHANGELOG
@@ -27,6 +27,9 @@ $ -> Language fix or change
! -> Note
19-Jan-2013 Jean-Marie Simonet
+ # [#29987] Code Style Part 2. Thanks Elin
+
+19-Jan-2013 Jean-Marie Simonet
# [#29989] *Media manager can't upload is memory_limit is set to -1
18-Jan-2013 Jean-Marie Simonet
View
1 installation/models/database.php
@@ -246,6 +246,7 @@ public function createDatabase($options)
$options = (array) $options;
// remove *_errors value
+
foreach ($options as $i => $option)
{
if (isset($i['1']) && $i['1'] == '*')
View
6 libraries/simplepie/simplepie.php
@@ -11338,7 +11338,8 @@ function embed_odeo(link) {
}
function embed_quicktime(type, bgcolor, width, height, link, placeholder, loop) {
- if (placeholder != '') {
+ if (placeholder != '')
+ {
document.writeln('<embed type="'+type+'" style="cursor:hand; cursor:pointer;" href="'+link+'" src="'+placeholder+'" width="'+width+'" height="'+height+'" autoplay="false" target="myself" controller="false" loop="'+loop+'" scale="aspect" bgcolor="'+bgcolor+'" pluginspage="http://www.apple.com/quicktime/download/"></embed>');
}
else {
@@ -14207,7 +14208,8 @@ function autodiscovery()
{
return array_values($feeds);
}
- else {
+ else
+ {
return null;
}
}
View
1 modules/mod_languages/helper.php
@@ -28,6 +28,7 @@ public static function getList(&$params)
// Get menu home items
$homes = array();
+
foreach ($menu->getMenu() as $item)
{
if ($item->home)
View
2 modules/mod_menu/tmpl/default_separator.php
@@ -20,4 +20,4 @@
else { $linktype = $item->title;
}
-?><span class="separator"<?php echo $title; ?>><?php echo $linktype; ?></span>
+?><span class="separator"<?php echo $title; ?>><?php echo $linktype; ?></span>
View
8 plugins/content/emailcloak/emailcloak.php
@@ -23,7 +23,7 @@ class plgContentEmailcloak extends JPlugin
*
* @param string The context of the content being passed to the plugin.
* @param mixed An object with a "text" property or the string to be cloaked.
- * @param array Additional parameters. See {@see plgEmailCloak()}.
+ * @param array Additional parameters. See {@see plgEmailCloak()}.
* @param integer Optional page number. Unused. Defaults to zero.
* @return boolean True on success.
*/
@@ -59,9 +59,9 @@ protected function _getPattern ($link, $text)
/**
* Cloak all emails in text from spambots via Javascript.
*
- * @param string The string to be cloaked.
- * @param array Additional parameters. Parameter "mode" (integer, default 1)
- * replaces addresses with "mailto:" links if nonzero.
+ * @param string The string to be cloaked.
+ * @param array Additional parameters. Parameter "mode" (integer, default 1)
+ * replaces addresses with "mailto:" links if nonzero.
* @return boolean True on success.
*/
protected function _cloak(&$text, &$params)
View
44 tests/plugins/content/example/example.php
@@ -34,12 +34,12 @@ public function onContentAfterDelete($context, $data)
*
* Method is called by the view and the results are imploded and displayed in a placeholder
*
- * @param string The context for the content passed to the plugin.
- * @param object The content object. Note $article->text is also available
- * @param object The content params
- * @param int The 'page' number
- * @return string
- * @since 1.6
+ * @param string The context for the content passed to the plugin.
+ * @param object The content object. Note $article->text is also available
+ * @param object The content params
+ * @param integer The 'page' number
+ * @return string
+ * @since 1.6
*/
public function onContentAfterDisplay($context, &$article, &$params, $limitstart)
{
@@ -102,12 +102,12 @@ public function onContentBeforeDelete($context, $data)
*
* Method is called by the view and the results are imploded and displayed in a placeholder
*
- * @param string The context for the content passed to the plugin.
- * @param object The content object. Note $article->text is also available
- * @param object The content params
- * @param int The 'page' number
- * @return string
- * @since 1.6
+ * @param string The context for the content passed to the plugin.
+ * @param object The content object. Note $article->text is also available
+ * @param object The content params
+ * @param integer The 'page' number
+ * @return string
+ * @since 1.6
*/
public function onContentBeforeDisplay($context, &$article, &$params, $limitstart)
{
@@ -140,11 +140,11 @@ public function onContentBeforeSave($context, &$article, $isNew)
/**
* Example after delete method.
*
- * @param string The context for the content passed to the plugin.
- * @param array A list of primary key ids of the content that has changed state.
- * @param int The value of the state that the content has been changed to.
- * @return boolean
- * @since 1.6
+ * @param string The context for the content passed to the plugin.
+ * @param array A list of primary key ids of the content that has changed state.
+ * @param integer The value of the state that the content has been changed to.
+ * @return boolean
+ * @since 1.6
*/
public function onContentChangeState($context, $pks, $value)
{
@@ -156,11 +156,11 @@ public function onContentChangeState($context, $pks, $value)
*
* Method is called by the view
*
- * @param string The context of the content being passed to the plugin.
- * @param object The content object. Note $article->text is also available
- * @param object The content params
- * @param int The 'page' number
- * @since 1.6
+ * @param string The context of the content being passed to the plugin.
+ * @param object The content object. Note $article->text is also available
+ * @param object The content params
+ * @param integer The 'page' number
+ * @since 1.6
*/
public function onContentPrepare($context, &$article, &$params, $limitstart)
{
View
22 tests/plugins/editors/example/example.php
@@ -109,17 +109,17 @@ function onGetInsertMethod($id)
/**
* Display the editor area.
*
- * @param string $name The control name.
- * @param string $html The contents of the text area.
- * @param string $width The width of the text area (px or %).
- * @param string $height The height of the text area (px or %).
- * @param int $col The number of columns for the textarea.
- * @param int $row The number of rows for the textarea.
- * @param boolean $buttons True and the editor buttons will be displayed.
- * @param string $id An optional ID for the textarea (note: since 1.6). If not supplied the name is used.
- * @param string $asset
- * @param object $author
- * @param array $params Associative array of editor parameters.
+ * @param string $name The control name.
+ * @param string $html The contents of the text area.
+ * @param string $width The width of the text area (px or %).
+ * @param string $height The height of the text area (px or %).
+ * @param integer $col The number of columns for the textarea.
+ * @param integer $row The number of rows for the textarea.
+ * @param boolean $buttons True and the editor buttons will be displayed.
+ * @param string $id An optional ID for the textarea (note: since 1.6). If not supplied the name is used.
+ * @param string $asset
+ * @param object $author
+ * @param array $params Associative array of editor parameters.
*
* @return string
*/
View
6 tests/plugins/extension/example/example.php
@@ -19,9 +19,9 @@ class plgExtensionExample extends JPlugin
/**
* Handle post extension install update sites
*
- * @param JInstaller Installer object
- * @param int Extension Identifier
- * @since 1.6
+ * @param JInstaller Installer object
+ * @param integer Extension Identifier
+ * @since 1.6
*/
function onExtensionAfterInstall($installer, $eid)
{
View
5 tests/plugins/search/example/example.php
@@ -173,7 +173,8 @@ function onContentSearch($text, $phrase='', $ordering='', $areas=null)
//If there's data...
if ($rows) {
//For each row of data...
- foreach($rows AS $key => $banner) {
+ foreach($rows AS $key => $banner)
+ {
//If the search text can be found even after stripping HTML
if (searchHelper::checkNoHTML($banner, $text, array('text'))) {
//Append to the return array:
@@ -183,4 +184,4 @@ function onContentSearch($text, $phrase='', $ordering='', $areas=null)
}
return $return;
}
-}
+}
View
2 tests/plugins/system/example/example.php
@@ -95,4 +95,4 @@ function LogIt ($status, $comment)
$log = JLog::getInstance('plugin_system_example_log.php');
$log->addEntry(array('status' => $status, 'comment' => $comment));
}
-}
+}
View
2 tests/system/webdriver/tests/JoomlaWebdriverTestCase.php
@@ -145,4 +145,4 @@ public function helpScreenshot($fileName, $folder = null)
return $fileName;
}
}
-}
+}

0 comments on commit c5d2c70

Please sign in to comment.