Skip to content

Commit

Permalink
Revert "Deal with a number of alignment issues"
Browse files Browse the repository at this point in the history
This reverts commit 732d772.
  • Loading branch information
elinw committed Aug 23, 2011
1 parent 732d772 commit 7ecf532
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 90 deletions.
2 changes: 1 addition & 1 deletion libraries/joomla/application/application.php
Expand Up @@ -1051,7 +1051,7 @@ protected function _createSession($name)

// Check to see the the session already exists.
if (($this->getCfg('session_handler') != 'database' && ($time % 2 || $session->isNew())) ||
($this->getCfg('session_handler') == 'database' && $session->isNew())
($this->getCfg('session_handler') == 'database' && $session->isNew())
)
{
$this->checkSession();
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/database/table/category.php
Expand Up @@ -221,7 +221,7 @@ public function store($updateNulls = false)
// Verify that the alias is unique
$table = JTable::getInstance('Category', 'JTable');
if ($table->load(array('alias' => $this->alias, 'parent_id' => $this->parent_id, 'extension' => $this->extension))
&& ($table->id != $this->id || $this->id == 0))
&& ($table->id != $this->id || $this->id == 0))
{

$this->setError(JText::_('JLIB_DATABASE_ERROR_CATEGORY_UNIQUE_ALIAS'));
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/database/table/menu.php
Expand Up @@ -148,7 +148,7 @@ public function store($updateNulls = false)
// Verify that the alias is unique
$table = JTable::getInstance('Menu', 'JTable');
if ($table->load(array('alias' => $this->alias, 'parent_id' => $this->parent_id, 'client_id' => $this->client_id))
&& ($table->id != $this->id || $this->id == 0)
&& ($table->id != $this->id || $this->id == 0)
)
{
if ($this->menutype == $table->menutype)
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/database/table/user.php
Expand Up @@ -239,7 +239,7 @@ function check()
$this->_db->setQuery($query);
$xid = intval($this->_db->loadResult());
if ($rootUser == $this->username && (!$xid || $xid && $xid != intval($this->id))
|| $xid && $xid == intval($this->id) && $rootUser != $this->username
|| $xid && $xid == intval($this->id) && $rootUser != $this->username
)
{
$this->setError(JText::_('JLIB_DATABASE_ERROR_USERNAME_CANNOT_CHANGE'));
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/filesystem/folder.php
Expand Up @@ -577,7 +577,7 @@ protected static function _items($path, $filter, $recurse, $full, $exclude, $exc
while (($file = readdir($handle)) !== false)
{
if ($file != '.' && $file != '..' && !in_array($file, $exclude)
&& (empty($excludefilter_string) || !preg_match($excludefilter_string, $file)))
&& (empty($excludefilter_string) || !preg_match($excludefilter_string, $file)))
{
// Compute the fullpath
$fullpath = $path . '/' . $file;
Expand Down
72 changes: 0 additions & 72 deletions libraries/joomla/form/formrule.php
Expand Up @@ -61,24 +61,6 @@ public function test(&$element, $value, $group = null, &$input = null, &$form =
// Initialize variables.
$name = (string) $element['name'];


//Is there a misconfiguration? If so, log it and skip these checks.
if (!empty($element['min']) && !empty($element['max']) && $element['min'] >= $element['max'])
{
// Form settings warning.
JLog::add('Field setting minimum is greater than maximum.', JLog::WARNING, 'Form');

// Keep
continue;
}

// If a specific regex is given in the element attributes use that rather than the default regex
// for the field.
if ( $element['regex'] )
{
$this->regex = $element['regex'] ;
}

// Check for a valid regex.
if (empty($this->regex))
{
Expand All @@ -99,58 +81,4 @@ public function test(&$element, $value, $group = null, &$input = null, &$form =

return false;
}
public function checkMax (&$element, $value)
{
if (empty($element['max']) || $value < (float) $element['max'])
{
return true;
}
return false;

}
public function checkMin (&$element, $value)
{

if (empty($element['min']) || $value > (float) $element['min'])
{
return true;
}
return false;

}
public function checkDataType (&$element, $value, $type)
{
return;
}
public function checkDataValue (&$element, $value, $type)
{

// If the field is empty and not required, the field is valid.
$required = ((string) $element['required'] == 'true' || (string) $element['required'] == 'required');
if (!$required && strlen($value) == 0)
{

return true;
}

// Is this a valid value for the data type if specified?
if (checkDataType (&$element, $value) == false)
{

return false;
}

// Check against the maximum and minimum values if present.
if (checkMax (&$element, $value) == false)
{

return false;
}
if (checkMin (&$element, $value) == false)
{

return false;
}

}
}
2 changes: 1 addition & 1 deletion libraries/joomla/installer/adapters/component.php
Expand Up @@ -211,7 +211,7 @@ public function install()
// Update tag detected

if ($this->parent->getUpgrade() || ($this->parent->manifestClass && method_exists($this->parent->manifestClass, 'update'))
|| $updateElement)
|| $updateElement)
{
return $this->update(); // transfer control to the update function
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/installer/adapters/language.php
Expand Up @@ -183,7 +183,7 @@ protected function _install($cname, $basePath, $clientId, &$element)
// Update function available or
// Update tag detected
if ($this->parent->getUpgrade() || ($this->parent->manifestClass && method_exists($this->parent->manifestClass, 'update'))
|| is_a($updateElement, 'JXMLElement'))
|| is_a($updateElement, 'JXMLElement'))
{
return $this->update(); // transfer control to the update function
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/installer/adapters/module.php
Expand Up @@ -254,7 +254,7 @@ public function install()
// Update function available or
// Update tag detected
if ($this->parent->getUpgrade() || ($this->parent->manifestClass && method_exists($this->parent->manifestClass, 'update'))
|| is_a($updateElement, 'JXMLElement'))
|| is_a($updateElement, 'JXMLElement'))
{
// Force this one
$this->parent->setOverwrite(true);
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/installer/adapters/plugin.php
Expand Up @@ -211,7 +211,7 @@ public function install()
// Update function available or
// Update tag detected
if ($this->parent->getUpgrade() || ($this->parent->manifestClass && method_exists($this->parent->manifestClass, 'update'))
|| is_a($updateElement, 'JXMLElement'))
|| is_a($updateElement, 'JXMLElement'))
{
// Force this one
$this->parent->setOverwrite(true);
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/installer/adapters/template.php
Expand Up @@ -125,7 +125,7 @@ public function install()
// Update function available or
// Update tag detected
if ($this->parent->getUpgrade() || ($this->parent->manifestClass && method_exists($this->parent->manifestClass, 'update'))
|| is_a($updateElement, 'JXMLElement'))
|| is_a($updateElement, 'JXMLElement'))
{
// Force this one
$this->parent->setOverwrite(true);
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/mail/mail.php
Expand Up @@ -369,7 +369,7 @@ public function useSMTP($auth = null, $host = null, $user = null, $pass = null,
}

if (($this->SMTPAuth !== null && $this->Host !== null && $this->Username !== null && $this->Password !== null)
|| ($this->SMTPAuth === null && $this->Host !== null))
|| ($this->SMTPAuth === null && $this->Host !== null))
{
$this->IsSMTP();

Expand Down
10 changes: 5 additions & 5 deletions libraries/joomla/string/string.php
Expand Up @@ -740,11 +740,11 @@ public static function valid($str)
*/
// From Unicode 3.1, non-shortest form is illegal
if (((2 == $mBytes) && ($mUcs4 < 0x0080)) || ((3 == $mBytes) && ($mUcs4 < 0x0800)) || ((4 == $mBytes) && ($mUcs4 < 0x10000))
|| (4 < $mBytes)
// From Unicode 3.2, surrogate characters are illegal
|| (($mUcs4 & 0xFFFFF800) == 0xD800)
// Codepoints outside the Unicode range are illegal
|| ($mUcs4 > 0x10FFFF)
|| (4 < $mBytes)
// From Unicode 3.2, surrogate characters are illegal
|| (($mUcs4 & 0xFFFFF800) == 0xD800)
// Codepoints outside the Unicode range are illegal
|| ($mUcs4 > 0x10FFFF)
)
{
return false;
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/updater/adapters/extension.php
Expand Up @@ -82,7 +82,7 @@ protected function _endElement($parser, $name)
$product = strtolower(JFilterInput::getInstance()->clean($ver->PRODUCT, 'cmd')); // lower case and remove the exclamation mark
// Check that the product matches and that the version matches (optionally a regexp)
if ($product == $this->current_update->targetplatform['NAME']
&& preg_match('/' . $this->current_update->targetplatform['VERSION'] . '/', $ver->RELEASE))
&& preg_match('/' . $this->current_update->targetplatform['VERSION'] . '/', $ver->RELEASE))
{
// Target platform isn't a valid field in the update table so unset it to prevent J! from trying to store it
unset($this->current_update->targetplatform);
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/updater/update.php
Expand Up @@ -212,7 +212,7 @@ public function _endElement($parser, $name)
$ver = new JVersion;
$product = strtolower(JFilterInput::getInstance()->clean($ver->PRODUCT, 'cmd'));
if ($product == $this->_current_update->targetplatform->name
&& preg_match('/' . $this->_current_update->targetplatform->version . '/', $ver->RELEASE))
&& preg_match('/' . $this->_current_update->targetplatform->version . '/', $ver->RELEASE))
{
if (isset($this->_latest))
{
Expand Down

0 comments on commit 7ecf532

Please sign in to comment.