Skip to content

Commit

Permalink
Use elseif instead else if.
Browse files Browse the repository at this point in the history
  • Loading branch information
realityking committed Oct 2, 2011
1 parent 8dda965 commit e972e1b
Show file tree
Hide file tree
Showing 58 changed files with 103 additions and 103 deletions.
4 changes: 2 additions & 2 deletions libraries/joomla/access/rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function __construct($input = '')
{
$input = json_decode($input, true);
}
else if (is_object($input))
elseif (is_object($input))
{
$input = (array) $input;
}
Expand Down Expand Up @@ -118,7 +118,7 @@ public function merge($actions)
$this->mergeAction($action, $identities);
}
}
else if ($actions instanceof JRules)
elseif ($actions instanceof JRules)
{
$data = $actions->getData();

Expand Down
4 changes: 2 additions & 2 deletions libraries/joomla/application/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public function get($id = 'root', $forceload = false)
return $this->_nodes[$id];
}
// If we processed this $id already and it was not valid, then return null.
else if (isset($this->_checkedCategories[$id]))
elseif (isset($this->_checkedCategories[$id]))
{
return null;
}
Expand Down Expand Up @@ -327,7 +327,7 @@ protected function _load($id)
$childrenLoaded = true;
}
}
else if ($result->id == $id || $childrenLoaded)
elseif ($result->id == $id || $childrenLoaded)
{
// Create the JCategoryNode
$this->_nodes[$result->id] = new JCategoryNode($result, $this);
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/application/component/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ public function __construct($config = array())
{
$this->default_view = $config['default_view'];
}
else if (empty($this->default_view))
elseif (empty($this->default_view))
{
$this->default_view = $this->getName();
}
Expand Down
4 changes: 2 additions & 2 deletions libraries/joomla/application/component/controlleradmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,11 @@ function publish()
{
$ntext = $this->text_prefix . '_N_ITEMS_PUBLISHED';
}
else if ($value == 0)
elseif ($value == 0)
{
$ntext = $this->text_prefix . '_N_ITEMS_UNPUBLISHED';
}
else if ($value == 2)
elseif ($value == 2)
{
$ntext = $this->text_prefix . '_N_ITEMS_ARCHIVED';
}
Expand Down
4 changes: 2 additions & 2 deletions libraries/joomla/application/component/model.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public function __construct($config = array())
{
$this->addTablePath($config['table_path']);
}
else if (defined('JPATH_COMPONENT_ADMINISTRATOR'))
elseif (defined('JPATH_COMPONENT_ADMINISTRATOR'))
{
$this->addTablePath(JPATH_COMPONENT_ADMINISTRATOR . '/tables');
}
Expand All @@ -279,7 +279,7 @@ public function __construct($config = array())
{
$this->event_clean_cache = $config['event_clean_cache'];
}
else if (empty($this->event_clean_cache))
elseif (empty($this->event_clean_cache))
{
$this->event_clean_cache = 'onContentCleanCache';
}
Expand Down
16 changes: 8 additions & 8 deletions libraries/joomla/application/component/modeladmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function __construct($config = array())
{
$this->event_after_delete = $config['event_after_delete'];
}
else if (empty($this->event_after_delete))
elseif (empty($this->event_after_delete))
{
$this->event_after_delete = 'onContentAfterDelete';
}
Expand All @@ -95,7 +95,7 @@ public function __construct($config = array())
{
$this->event_after_save = $config['event_after_save'];
}
else if (empty($this->event_after_save))
elseif (empty($this->event_after_save))
{
$this->event_after_save = 'onContentAfterSave';
}
Expand All @@ -104,7 +104,7 @@ public function __construct($config = array())
{
$this->event_before_delete = $config['event_before_delete'];
}
else if (empty($this->event_before_delete))
elseif (empty($this->event_before_delete))
{
$this->event_before_delete = 'onContentBeforeDelete';
}
Expand All @@ -113,7 +113,7 @@ public function __construct($config = array())
{
$this->event_before_save = $config['event_before_save'];
}
else if (empty($this->event_before_save))
elseif (empty($this->event_before_save))
{
$this->event_before_save = 'onContentBeforeSave';
}
Expand All @@ -122,7 +122,7 @@ public function __construct($config = array())
{
$this->event_change_state = $config['event_change_state'];
}
else if (empty($this->event_change_state))
elseif (empty($this->event_change_state))
{
$this->event_change_state = 'onContentChangeState';
}
Expand All @@ -132,7 +132,7 @@ public function __construct($config = array())
{
$this->text_prefix = strtoupper($config['text_prefix']);
}
else if (empty($this->text_prefix))
elseif (empty($this->text_prefix))
{
$this->text_prefix = strtoupper($this->option);
}
Expand Down Expand Up @@ -184,7 +184,7 @@ public function batch($commands, $pks)
return false;
}
}
else if ($cmd == 'm' && !$this->batchMove($commands['category_id'], $pks))
elseif ($cmd == 'm' && !$this->batchMove($commands['category_id'], $pks))
{
return false;
}
Expand Down Expand Up @@ -1028,7 +1028,7 @@ function saveorder($pks = null, $order = null)
unset($pks[$i]);
JError::raiseWarning(403, JText::_('JLIB_APPLICATION_ERROR_EDITSTATE_NOT_PERMITTED'));
}
else if ($table->ordering != $order[$i])
elseif ($table->ordering != $order[$i])
{
$table->ordering = $order[$i];

Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/application/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ protected static function _checkPath($path, $checkAdmin = 1)
{
return $file;
}
else if ($checkAdmin != 0)
elseif ($checkAdmin != 0)
{
$file = JPATH_ADMINISTRATOR . $path;
if (file_exists($file))
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/application/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ function getDefault($language = '*')
{
return $this->_items[$this->_default[$language]];
}
else if (array_key_exists('*', $this->_default))
elseif (array_key_exists('*', $this->_default))
{
return $this->_items[$this->_default['*']];
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/base/object.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function getError($i = null, $toString = true)
// Default, return the last message
$error = end($this->_errors);
}
else if (!array_key_exists($i, $this->_errors))
elseif (!array_key_exists($i, $this->_errors))
{
// If $i has been specified but does not exist, return false
return false;
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/cache/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ public static function getWorkarounds($data, $options = array())
{
$document->mergeHeadData($data['head']);
}
else if (isset($data['head']))
elseif (isset($data['head']))
{
$document->setHeadData($data['head']);
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/cache/storage/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ protected function _deleteFolder($path)
return false;
}
}
else if (!empty($files) && is_array($files))
elseif (!empty($files) && is_array($files))
{

foreach ($files as $file)
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/client/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public static function hasCredentials($client)
// The client is disabled in global config, so let's pretend we are OK
$return = true;
}
else if ($options['user'] != '' && $options['pass'] != '')
elseif ($options['user'] != '' && $options['pass'] != '')
{
// Login credentials are available in global config
$return = true;
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/database/database/mysqlexporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public function from($from)
{
$this->from = array($from);
}
else if (is_array($from))
elseif (is_array($from))
{
$this->from = $from;
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/database/database/mysqlimporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ protected function getKeySQL($columns)
{
$prefix = 'PRIMARY ';
}
else if ($kNonUnique == 0)
elseif ($kNonUnique == 0)
{
$prefix = 'UNIQUE ';
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/database/database/sqlazurequery.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function __toString()
$query .= (string) $this->set;
}
// Columns-Values method
else if ($this->values)
elseif ($this->values)
{
if ($this->columns)
{
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/database/database/sqlsrvquery.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function __toString()
$query .= (string) $this->set;
}
// Columns-Values method
else if ($this->values)
elseif ($this->values)
{
if ($this->columns)
{
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/database/databasequery.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ public function __toString()
$query .= (string) $this->set;
}
// Columns-Values method
else if ($this->values)
elseif ($this->values)
{
if ($this->columns)
{
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/database/table.php
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ public function load($keys = null, $reset = true)

$keys = array($keyName => $keyValue);
}
else if (!is_array($keys))
elseif (!is_array($keys))
{
// Load by primary key.
$keys = array($this->_tbl_key => $keys);
Expand Down
4 changes: 2 additions & 2 deletions libraries/joomla/document/document.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ public function getMetaData($name, $httpEquiv = false)
{
$result = $this->getGenerator();
}
else if ($name == 'description')
elseif ($name == 'description')
{
$result = $this->getDescription();
}
Expand Down Expand Up @@ -423,7 +423,7 @@ public function setMetaData($name, $content, $http_equiv = false, $sync = true)
{
$this->setGenerator($content);
}
else if ($name == 'description')
elseif ($name == 'description')
{
$this->setDescription($content);
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/document/html/renderer/head.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function fetchHead(&$document)
$content .= '; charset=' . $document->getCharset();
$buffer .= $tab . '<meta http-equiv="' . $name . '" content="' . htmlspecialchars($content) . '"' . $tagEnd . $lnEnd;
}
else if ($type == 'standard' && !empty($content))
elseif ($type == 'standard' && !empty($content))
{
$buffer .= $tab . '<meta name="' . $name . '" content="' . htmlspecialchars($content) . '"' . $tagEnd . $lnEnd;
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/environment/uri.php
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ protected function _cleanPath($path)
$i--;
$n--;
}
else if ($path[$i] == '..' and ($i > 1 or ($i == 1 and $path[0] != '')))
elseif ($path[$i] == '..' and ($i > 1 or ($i == 1 and $path[0] != '')))
{
unset($path[$i]);
unset($path[$i - 1]);
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/error/exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public function getError($i = null, $toString = true)
// Default, return the last message
$error = end($this->_errors);
}
else if (!array_key_exists($i, $this->_errors))
elseif (!array_key_exists($i, $this->_errors))
{
// If $i has been specified but does not exist, return false
return false;
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ public static function getStream($use_prefix = true, $use_network = true, $ua =
$prefix .= $FTPOptions['port'] ? ':' . $FTPOptions['port'] : '';
$prefix .= $FTPOptions['root'];
}
else if ($SCPOptions['enabled'] == 1 && $use_network)
elseif ($SCPOptions['enabled'] == 1 && $use_network)
{
$prefix = 'ssh2.sftp://' . $SCPOptions['user'] . ':' . $SCPOptions['pass'] . '@' . $SCPOptions['host'];
$prefix .= $SCPOptions['port'] ? ':' . $SCPOptions['port'] : '';
Expand Down
12 changes: 6 additions & 6 deletions libraries/joomla/filesystem/stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ function open($filename, $mode = 'r', $use_include_path = false, $context = null
// We have a scheme! force the method to be f
$this->processingmethod = 'f';
}
else if ($detectprocessingmode)
elseif ($detectprocessingmode)
{
$ext = strtolower(JFile::getExt($this->filename));

Expand Down Expand Up @@ -260,7 +260,7 @@ function open($filename, $mode = 'r', $use_include_path = false, $context = null
$this->_fh = fopen($filename, $mode, $use_include_path, $context);
}
// One provided at initialisation
else if ($this->_context)
elseif ($this->_context)
{
$this->_fh = fopen($filename, $mode, $use_include_path, $this->_context);
}
Expand Down Expand Up @@ -787,7 +787,7 @@ function write(&$string, $length = 0, $chunk = 0)
$retval = false;
$remaining = 0;
}
else if ($res === 0)
elseif ($res === 0)
{
// Wrote nothing?
$remaining = 0;
Expand Down Expand Up @@ -1217,7 +1217,7 @@ function copy($src, $dest, $context = null, $use_prefix = true, $relative = fals
// Use the provided context
$res = @copy($src, $dest, $context);
}
else if ($context_support && $this->_context)
elseif ($context_support && $this->_context)
{
// Use the objects context
$res = @copy($src, $dest, $this->_context);
Expand Down Expand Up @@ -1274,7 +1274,7 @@ function move($src, $dest, $context = null, $use_prefix = true, $relative = fals
// Use the provided context
$res = @rename($src, $dest, $context);
}
else if ($this->_context)
elseif ($this->_context)
{
// Use the object's context
$res = @rename($src, $dest, $this->_context);
Expand Down Expand Up @@ -1326,7 +1326,7 @@ function delete($filename, $context = null, $use_prefix = true, $relative = fals
// Use the provided context
$res = @unlink($filename, $context);
}
else if ($this->_context)
elseif ($this->_context)
{
// Use the object's context
$res = @unlink($filename, $this->_context);
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/filter/filterinput.php
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ protected function _cleanAttributes($attrSet)
{
$newSet[] = $attrSubSet[0] . '="' . $attrSubSet[1] . '"';
}
else if ($attrSubSet[1] === "0")
elseif ($attrSubSet[1] === "0")
{
// Special Case
// Is the value 0?
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/filter/filteroutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static function objectHTMLSafe(&$mixed, $quote_style = ENT_QUOTES, $exclu
{
continue;
}
else if (is_array($exclude_keys) && in_array($k, $exclude_keys))
elseif (is_array($exclude_keys) && in_array($k, $exclude_keys))
{
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/form/fields/editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ protected function getInput()
{
$buttons = true;
}
else if ($buttons == 'false' || $buttons == 'no' || $buttons == '0')
elseif ($buttons == 'false' || $buttons == 'no' || $buttons == '0')
{
$buttons = false;
}
Expand Down
Loading

0 comments on commit e972e1b

Please sign in to comment.