Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libraries/cms/editor/editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public function initialise()

$document = JFactory::getDocument();

if (method_exists($document, "addCustomTag") && !empty($return))
if (method_exists($document, 'addCustomTag') && !empty($return))
{
$document->addCustomTag($return);
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/form/field/limitbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ protected function getOptions()
asort($limits);

// Add an option to show all?
$showAll = isset($this->element['showall']) ? ($this->element['showall'] == "true") : true;
$showAll = isset($this->element['showall']) ? ($this->element['showall'] == 'true') : true;

if ($showAll)
{
Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/form/rule/password.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function test(SimpleXMLElement $element, $value, $group = null, Registry
// Minimum number of upper case ASCII characters required
if (!empty($minimumUppercase))
{
$nUppercase = preg_match_all("/[A-Z]/", $value, $umatch);
$nUppercase = preg_match_all('/[A-Z]/', $value, $umatch);

if ($nUppercase < $minimumUppercase)
{
Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/helper/tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ public function getTagItemsQuery($tagId, $typesr = null, $includeChildren = fals

// Join over the users for the author and email
->select("CASE WHEN c.core_created_by_alias > ' ' THEN c.core_created_by_alias ELSE ua.name END AS author")
->select("ua.email AS author_email")
->select('ua.email AS author_email')

->join('LEFT', '#__users AS ua ON ua.id = c.core_created_user_id')

Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/html/jgrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static function action($i, $task, $prefix = '', $text = '', $active_title
$html[] = $tip ? ' title="' . $title . '"' : '';
$html[] = '>';

if ($active_class == "protected")
if ($active_class == 'protected')
{
$html[] = '<span class="icon-lock"></span>';
}
Expand Down
4 changes: 2 additions & 2 deletions libraries/cms/html/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ abstract class JHtmlList
*
* @since 1.5
*/
public static function images($name, $active = null, $javascript = null, $directory = null, $extensions = "bmp|gif|jpg|png")
public static function images($name, $active = null, $javascript = null, $directory = null, $extensions = 'bmp|gif|jpg|png')
{
if (!$directory)
{
Expand Down Expand Up @@ -109,7 +109,7 @@ public static function genericordering($query, $chop = 30)

if (StringHelper::strlen($items[$i]->text) > $chop)
{
$text = StringHelper::substr($items[$i]->text, 0, $chop) . "...";
$text = StringHelper::substr($items[$i]->text, 0, $chop) . '...';
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/html/select.php
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ public static function options($arr, $optKey = 'value', $optText = 'text', $sele
$splitText = explode(' - ', $text, 2);
$text = $splitText[0];

if (isset($splitText[1]) && $splitText[1] != "" && !preg_match('/^[\s]+$/', $splitText[1]))
if (isset($splitText[1]) && $splitText[1] != '' && !preg_match('/^[\s]+$/', $splitText[1]))
{
$text .= ' - ' . $splitText[1];
}
Expand Down
4 changes: 2 additions & 2 deletions libraries/cms/html/string.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public static function truncate($text, $length = 0, $noSplit = true, $allowHtml
$openedTags = $result[1];

// Some tags self close so they do not need a separate close tag.
$openedTags = array_diff($openedTags, array("img", "hr", "br"));
$openedTags = array_diff($openedTags, array('img', 'hr', 'br'));
$openedTags = array_values($openedTags);

// Put all closed tags into an array
Expand All @@ -118,7 +118,7 @@ public static function truncate($text, $length = 0, $noSplit = true, $allowHtml
{
if (!in_array($openedTags[$i], $closedTags))
{
$tmp .= "</" . $openedTags[$i] . ">";
$tmp .= '</' . $openedTags[$i] . '>';
}
else
{
Expand Down
4 changes: 2 additions & 2 deletions libraries/cms/html/tabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ protected static function loadBehavior($group, $params = array())
$opt['onActive'] = (isset($params['onActive'])) ? '\\' . $params['onActive'] : null;
$opt['onBackground'] = (isset($params['onBackground'])) ? '\\' . $params['onBackground'] : null;
$opt['display'] = (isset($params['startOffset'])) ? (int) $params['startOffset'] : null;
$opt['titleSelector'] = "dt.tabs";
$opt['descriptionSelector'] = "dd.tabs";
$opt['titleSelector'] = 'dt.tabs';
$opt['descriptionSelector'] = 'dd.tabs';

// When use storage is set and value is false - By default we allow to use storage
$opt['useStorage'] = (isset($params['useCookie']) && !$params['useCookie']) ? false : true;
Expand Down
4 changes: 2 additions & 2 deletions libraries/cms/html/tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ public static function tags($config = array('filter.published' => array(0, 1)))
public static function ajaxfield($selector = '#jform_tags', $allowCustom = true)
{
// Get the component parameters
$params = JComponentHelper::getParams("com_tags");
$minTermLength = (int) $params->get("min_term_length", 3);
$params = JComponentHelper::getParams('com_tags');
$minTermLength = (int) $params->get('min_term_length', 3);

$displayData = array(
'minTermLength' => $minTermLength,
Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/installer/adapter/component.php
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ protected function _updateSiteMenus($component_id = null)
$query = $db->getQuery(true)
->update('#__menu')
->set('component_id = ' . $db->quote($component_id))
->where("type = " . $db->quote('component'))
->where('type = ' . $db->quote('component'))
->where('client_id = 0')
->where('link LIKE ' . $db->quote('index.php?option=' . $option)
. " OR link LIKE '" . $db->escape('index.php?option=' . $option . '&') . "%'");
Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/installer/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function preflight($type, $parent)
}

// Extension manifest file version
$this->release = $parent->get("manifest")->version;
$this->release = $parent->get('manifest')->version;
$extensionType = substr($this->extension, 0, 3);

// Modules parameters are located in the module table - else in the extension table
Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/layout/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function render($displayData = array())

if ($this->isDebugEnabled())
{
echo "<pre>" . $this->renderDebugMessages() . "</pre>";
echo '<pre>' . $this->renderDebugMessages() . '</pre>';
}

// Nothing to show
Expand Down
4 changes: 2 additions & 2 deletions libraries/cms/less/formatter/joomla.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class JLessFormatterJoomla extends lessc_formatter_classic

public $breakSelectors = true;

public $assignSeparator = ": ";
public $assignSeparator = ': ';

public $selectorSeparator = ",";
public $selectorSeparator = ',';

public $indentChar = "\t";
}
2 changes: 1 addition & 1 deletion libraries/cms/router/router.php
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ protected function createUri($url)

foreach ($vars as $key => $var)
{
if ($var == "")
if ($var == '')
{
unset($vars[$key]);
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/router/site.php
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ protected function buildSefRoute(&$uri)
$crouter = $this->getComponentRouter($component);
$parts = $crouter->build($query);
$result = implode('/', $parts);
$tmp = ($result != "") ? $result : '';
$tmp = ($result != '') ? $result : '';

// Build the application route
$built = false;
Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/schema/changeitem/mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ private function fixInteger($type1, $type2)
{
$result = $type1;

if (strtolower($type1) == "integer" && strtolower(substr($type2, 0, 8)) == 'unsigned')
if (strtolower($type1) == 'integer' && strtolower(substr($type2, 0, 8)) == 'unsigned')
{
$result = 'int(10) unsigned';
}
Expand Down
6 changes: 3 additions & 3 deletions libraries/cms/table/corecontent.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ public function check()
// Only process if not empty

// Array of characters to remove
$bad_characters = array("\n", "\r", "\"", "<", ">");
$bad_characters = array("\n", "\r", "\"", '<', '>');

// Remove bad characters
$after_clean = StringHelper::str_ireplace($bad_characters, "", $this->core_metakey);
$after_clean = StringHelper::str_ireplace($bad_characters, '', $this->core_metakey);

// Create array using commas as delimiter
$keys = explode(',', $after_clean);
Expand All @@ -151,7 +151,7 @@ public function check()
}
}
// Put array back together delimited by ", "
$this->core_metakey = implode(", ", $clean_keys);
$this->core_metakey = implode(', ', $clean_keys);
}

return true;
Expand Down