[TASK] TYPO3 code must not use the else if construct
authorStefano Kowalke <blueduck@gmx.net>
Tue, 26 Apr 2011 12:40:26 +0000 (14:40 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 26 Apr 2011 12:53:33 +0000 (14:53 +0200)
Change "else if" into "elseif"

Change-Id: I7db545131851b2bb99dfe25c80fef6b26f5504dd
Resolves: #26295
Releases: 4.6
Reviewed-on: http://review.typo3.org/1725
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
44 files changed:
t3lib/class.t3lib_extmgm.php
t3lib/class.t3lib_loadmodules.php
t3lib/class.t3lib_positionmap.php
t3lib/class.t3lib_tceforms.php
t3lib/class.t3lib_userauthgroup.php
t3lib/mail/class.t3lib_mail_swiftmaileradapter.php
typo3/ajax.php
typo3/backend.php
typo3/class.browse_links.php
typo3/class.db_list_extra.inc
typo3/classes/class.ajaxlogin.php
typo3/classes/class.modulemenu.php
typo3/sysext/cms/classes/class.tx_cms_backendlayout.php
typo3/sysext/cms/layout/class.tx_cms_layout.php
typo3/sysext/cms/tslib/class.tslib_content.php
typo3/sysext/cms/tslib/class.tslib_fe.php
typo3/sysext/cms/tslib/class.tslib_mediawizardcoreprovider.php
typo3/sysext/cms/tslib/content/class.tslib_content_imagetext.php
typo3/sysext/cms/tslib/content/class.tslib_content_loadregister.php
typo3/sysext/cms/tslib/content/class.tslib_content_searchresult.php
typo3/sysext/dbal/class.ux_t3lib_db.php
typo3/sysext/dbal/class.ux_t3lib_sqlparser.php
typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php
typo3/sysext/install/mod/class.tx_install_session.php
typo3/sysext/lowlevel/class.tx_lowlevel_cleaner.php
typo3/sysext/lowlevel/clmods/class.cleanflexform.php
typo3/sysext/rtehtmlarea/extensions/Acronym/class.tx_rtehtmlarea_acronym.php
typo3/sysext/rtehtmlarea/extensions/InlineElements/class.tx_rtehtmlarea_inlineelements.php
typo3/sysext/rtehtmlarea/extensions/TableOperations/class.tx_rtehtmlarea_tableoperations.php
typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php
typo3/sysext/rtehtmlarea/mod6/class.tx_rtehtmlarea_parse_html.php
typo3/sysext/rtehtmlarea/pi2/class.tx_rtehtmlarea_pi2.php
typo3/sysext/saltedpasswords/classes/class.tx_saltedpasswords_div.php
typo3/sysext/saltedpasswords/classes/eval/class.tx_saltedpasswords_eval.php
typo3/sysext/saltedpasswords/sv1/class.tx_saltedpasswords_sv1.php
typo3/sysext/scheduler/class.tx_scheduler_execution.php
typo3/sysext/scheduler/examples/class.tx_scheduler_sleeptask_additionalfieldprovider.php
typo3/sysext/setup/mod/index.php
typo3/sysext/t3editor/classes/ts_codecompletion/class.tx_t3editor_codecompletion.php
typo3/sysext/version/ws/index.php
typo3/sysext/workspaces/Classes/Service/GridData.php
typo3/sysext/workspaces/Classes/Service/Stages.php
typo3/sysext/workspaces/Classes/Service/Workspaces.php
typo3/template.php

index dbbb7ae..042d71a 100644 (file)
@@ -336,7 +336,7 @@ final class t3lib_extMgm {
                                        } else {
                                                if (strpos($typeDetails['showitem'], $str) !== FALSE) {
                                                        $fieldExists = TRUE;
-                                               } else if(is_array($GLOBALS['TCA'][$table]['palettes'])) {
+                                               } elseif (is_array($GLOBALS['TCA'][$table]['palettes'])) {
                                                        foreach ($GLOBALS['TCA'][$table]['palettes'] as $palette => $paletteDetails) {
                                                                if (preg_match('/\b' . $palette . '\b/', $typeDetails['showitem']) > 0
                                                                && strpos($paletteDetails['showitem'], $str) !== FALSE) {
index b96c406..f5f812c 100644 (file)
@@ -340,7 +340,7 @@ class t3lib_loadModules {
                                        $modconf['navigationComponentId'] = $this->navigationComponents[$name]['componentId'];
                                                // check if the parent has a navigation component that also
                                                // goes down to the submodules (if they haven't overwritten it yet)
-                               } else if ($mainModule && is_array($this->navigationComponents[$mainModule])) {
+                               } elseif ($mainModule && is_array($this->navigationComponents[$mainModule])) {
                                        $modconf['navigationComponentId'] = $this->navigationComponents[$mainModule]['componentId'];
                                }
                        } else {
index cae8637..8a8c1ba 100644 (file)
@@ -492,9 +492,9 @@ class t3lib_positionMap {
 
                                        if (isset($columnConfig['colPos']) && $head) {
                                                $table .= $this->wrapColumnHeader($head, '', '') . '</div>' . implode('<br />', $lines[$columnKey]);
-                                       } else if ($columnConfig['colPos']) {
+                                       } elseif ($columnConfig['colPos']) {
                                                $table .= $this->wrapColumnHeader($GLOBALS['LANG']->getLL('noAccess'), '', '') . '</div>';
-                                       } else if ($columnConfig['name']) {
+                                       } elseif ($columnConfig['name']) {
                                                $table .= $this->wrapColumnHeader($columnConfig['name'], '', '') . '</div>';
                                        } else {
                                                $table .= $this->wrapColumnHeader($GLOBALS['LANG']->getLL('notAssigned'), '', '') . '</div>';
index d1c3766..a1d5339 100644 (file)
@@ -6346,7 +6346,7 @@ class t3lib_TCEforms {
                if ($this->cachedLanguageFlag[$mainKey][$sys_language_uid]['flagIcon']) {
                        $out .= t3lib_iconWorks::getSpriteIcon($this->cachedLanguageFlag[$mainKey][$sys_language_uid]['flagIcon']);
                        $out .= '&nbsp;';
-               } else if ($this->cachedLanguageFlag[$mainKey][$sys_language_uid]['title']) {
+               } elseif ($this->cachedLanguageFlag[$mainKey][$sys_language_uid]['title']) {
                        $out .= '[' . $this->cachedLanguageFlag[$mainKey][$sys_language_uid]['title'] . ']';
                        $out .= '&nbsp;';
                }
index c368e90..65e8a54 100644 (file)
@@ -856,7 +856,7 @@ class t3lib_userAuthGroup extends t3lib_userAuth {
                        && !t3lib_BEfunc::getWorkspaceVersionOfRecord($this->workspace, $table, $id, 'uid') // There must be no existing version of this record in workspace.
                        && !t3lib_BEfunc::isPidInVersionizedBranch($recpid, $table)) { // PID must NOT be in a versionized branch either
                        return TRUE;
-               } else if ($this->workspaceRec['disable_autocreate']) {
+               } elseif ($this->workspaceRec['disable_autocreate']) {
                        t3lib_div::deprecationLog('Usage of disable_autocreate feature is deprecated since 4.5.');
                }
        }
index 46694ce..295603e 100644 (file)
@@ -240,9 +240,9 @@ class t3lib_mail_SwiftMailerAdapter implements t3lib_mail_MailerAdapter {
                                                if ($matches[2]) {
                                                        $charset = trim($matches[3]);
                                                }
-                                       } else if (preg_match('/^content-transfer-encoding:(.*)$/i', $line, $matches)) {
+                                       } elseif (preg_match('/^content-transfer-encoding:(.*)$/i', $line, $matches)) {
                                                $encoding = trim($matches[1]);
-                                       } else if (strlen(trim($line)) == 0) {
+                                       } elseif (strlen(trim($line)) == 0) {
                                                        // empty line before actual content of this part
                                                break;
                                        }
index 3aae10a..6ca13da 100644 (file)
@@ -67,7 +67,7 @@ $ajaxParams = array();
        // evaluating the arguments and calling the AJAX method/function
 if (empty($ajaxID)) {
        $ajaxObj->setError('No valid ajaxID parameter given.');
-} else if (empty($ajaxScript)) {
+} elseif (empty($ajaxScript)) {
        $ajaxObj->setError('No backend function registered for ajaxID "'.$ajaxID.'".');
 } else {
        $ret = t3lib_div::callUserFunction($ajaxScript, $ajaxParams, $ajaxObj, false, true);
index 69147e2..b75b41d 100644 (file)
@@ -697,7 +697,7 @@ class TYPO3backend {
                if(!$startModule)       {
                        if ($GLOBALS['BE_USER']->uc['startModule'])     {
                                $startModule = $GLOBALS['BE_USER']->uc['startModule'];
-                       } else if($GLOBALS['BE_USER']->uc['startInTaskCenter']) {
+                       } elseif ($GLOBALS['BE_USER']->uc['startInTaskCenter']) {
                                $startModule = 'user_task';
                        }
                }
index c975e1c..b302404 100644 (file)
@@ -526,7 +526,7 @@ class localFolderTree extends t3lib_folderTree {
                        // Preparing the current-path string (if found in the listing we will see a red blinking arrow).
                if (!$GLOBALS['SOBE']->browser->curUrlInfo['value'])    {
                        $cmpPath='';
-               } else if (substr(trim($GLOBALS['SOBE']->browser->curUrlInfo['info']),-1)!='/') {
+               } elseif (substr(trim($GLOBALS['SOBE']->browser->curUrlInfo['info']),-1)!='/')  {
                        $cmpPath=PATH_site.dirname($GLOBALS['SOBE']->browser->curUrlInfo['info']).'/';
                } else {
                        $cmpPath=PATH_site.$GLOBALS['SOBE']->browser->curUrlInfo['info'];
@@ -1104,7 +1104,7 @@ class browse_links {
                                                parent.close();
                                        }
                        ';
-               } else if ($pArr[0] && !$pArr[1] && !$pArr[2]) {
+               } elseif ($pArr[0] && !$pArr[1] && !$pArr[2]) {
                        $JScodeAction = '
                                        addElement(filename,table+"_"+uid,fp,close);
                        ';
index ca092eb..4a5c096 100644 (file)
@@ -1613,7 +1613,7 @@ class localRecordList extends recordList {
                        }
 
                        if ($lNew)      $out[1].= $lNew;
-               } else if ($row['l18n_parent']) {
+               } elseif ($row['l18n_parent']) {
                        $out[0] = '&nbsp;&nbsp;&nbsp;&nbsp;'.$out[0];
                }
 
index d56dd8c..001fe6b 100644 (file)
@@ -127,7 +127,7 @@ class AjaxLogin {
                        if (@is_file(PATH_typo3conf.'LOCK_BACKEND')) {
                                $ajaxObj->addContent('login', array('will_time_out' => FALSE, 'locked' => TRUE));
                                $ajaxObj->setContentFormat('json');
-                       } else if (!isset($GLOBALS['BE_USER']->user['uid'])) {
+                       } elseif (!isset($GLOBALS['BE_USER']->user['uid'])) {
                                $ajaxObj->addContent('login', array('timed_out' => TRUE));
                        } else {
                                $GLOBALS['BE_USER']->fetchUserSession(TRUE);
index 74cf7c6..5ecb18f 100644 (file)
@@ -222,7 +222,7 @@ class ModuleMenu {
                                        'navigationFrameScriptParam' => NULL,
                                        'navigationComponentId' => NULL,
                                );
-                       } else if (is_array($moduleData['sub'])) {
+                       } elseif (is_array($moduleData['sub'])) {
                                foreach($moduleData['sub'] as $submoduleName => $submoduleData) {
                                        $submoduleLink = t3lib_div::resolveBackPath($submoduleData['script']);
 
index 542cf42..36285e2 100644 (file)
@@ -118,10 +118,10 @@ class tx_cms_BackendLayout {
                                        $backendLayoutUid = $selectedBackendLayout;
                                }
                                break;
-                       } else if ($selectedBackendLayoutNextLevel == -1 && $page['uid'] != $id) {
+                       } elseif ($selectedBackendLayoutNextLevel == -1 && $page['uid'] != $id) {
                                        // Some previous page in our rootline sets layout_next to "None"
                                break;
-                       } else if ($selectedBackendLayoutNextLevel > 0 && $page['uid'] != $id) {
+                       } elseif ($selectedBackendLayoutNextLevel > 0 && $page['uid'] != $id) {
                                        // Some previous page in our rootline sets some backend_layout, use it
                                $backendLayoutUid = $selectedBackendLayoutNextLevel;
                                break;
index dbfd0a0..a751f0b 100755 (executable)
@@ -407,7 +407,7 @@ class tx_cms_layout extends recordList {
                if ($backendLayoutUid == -1) {
                                // if it is set to "none" - don't use any
                        $backendLayoutUid = NULL;
-               } else if ($backendLayoutUid == 0) {
+               } elseif ($backendLayoutUid == 0) {
                                // if it not set check the rootline for a layout on next level and use this
                        $rootline = t3lib_BEfunc::BEgetRootLine($id);
                        for ($i = count($rootline) - 2; $i > 0; $i--) {
@@ -415,7 +415,7 @@ class tx_cms_layout extends recordList {
                                if ($backendLayoutUid > 0) {
                                                // stop searching if a layout for "next level" is set
                                        break;
-                               } else if ($backendLayoutUid == -1){
+                               } elseif ($backendLayoutUid == -1){
                                                // if layout for "next level" is set to "none" - don't use any and stop searching
                                        $backendLayoutUid = NULL;
                                        break;
@@ -633,7 +633,7 @@ class tx_cms_layout extends recordList {
                                                        // If not, a new header without any buttons will be generated.
                                                        if (isset($columnConfig['colPos']) && $head[$columnKey]) {
                                                                $grid .= $head[$columnKey] . $content[$columnKey];
-                                                       } else if ($columnConfig['colPos']) {
+                                                       } elseif ($columnConfig['colPos']) {
                                                                $grid .= $this->tt_content_drawColHeader($GLOBALS['LANG']->getLL('noAccess'), '', '');
                                                        } else {
                                                                $grid .= $this->tt_content_drawColHeader($GLOBALS['LANG']->getLL('notAssigned'), '', '');
index 8a56859..406f37e 100644 (file)
@@ -4022,7 +4022,7 @@ class tslib_cObj {
                        if ($globalJumpUrlEnabled && isset($conf['jumpurl']) && $conf['jumpurl'] == 0) {
                                $GLOBALS['TSFE']->config['config']['jumpurl_enable'] = 0;
                                        // if the global jumpURL feature is deactivated, but is wanted for this link, then activate it for now
-                       } else if (!$globalJumpUrlEnabled && $conf['jumpurl']) {
+                       } elseif (!$globalJumpUrlEnabled && $conf['jumpurl']) {
                                $GLOBALS['TSFE']->config['config']['jumpurl_enable'] = 1;
                        }
                        $theLinkWrap = $this->typoLink('|', $typoLinkConf);
index 6566ae8..222d1fb 100644 (file)
@@ -4085,7 +4085,7 @@ if (version == "n3") {
                $n = $n + $offset;
                if ($offset > 0 && $n > $end)   {
                        $n = $start + ($n - $end - 1);
-               } else if ($offset < 0 && $n < $start)  {
+               } elseif ($offset < 0 && $n < $start)   {
                        $n = $end - ($start - $n - 1);
                }
                return chr($n);
@@ -4115,7 +4115,7 @@ if (version == "n3") {
                                        $out .= $this->encryptCharcode($charValue,0x2B,0x3A,$offset);
                                } elseif ($charValue >= 0x40 && $charValue <= 0x5A)     {       // A-Z @
                                        $out .= $this->encryptCharcode($charValue,0x40,0x5A,$offset);
-                               } else if ($charValue >= 0x61 && $charValue <= 0x7A)    {       // a-z
+                               } elseif ($charValue >= 0x61 && $charValue <= 0x7A)     {       // a-z
                                        $out .= $this->encryptCharcode($charValue,0x61,0x7A,$offset);
                                } else {
                                        $out .= $string{$i};
index 6161092..bdb173e 100644 (file)
@@ -119,7 +119,7 @@ class tslib_mediaWizardCoreProvider implements tslib_mediaWizardProvider {
                                // it's a channel
                        $parts = explode('/', $url);
                        $videoId = $parts[count($parts) - 1];
-               } else if (preg_match('/v=([^(\&|$)]*)/', $url, $matches)) {
+               } elseif (preg_match('/v=([^(\&|$)]*)/', $url, $matches)) {
                        $videoId = $matches[1];
                }
 
index a8823d0..0474b5f 100644 (file)
@@ -472,7 +472,7 @@ class tslib_content_ImageText extends tslib_content_Abstract {
                                                        }
                                                        if ($legacyCaptionSplit) {
                                                                $thisCaption = $captionArray[$imgIndex];
-                                                       } else if (($conf['captionSplit'] || $conf['imageTextSplit']) && isset($conf['caption.'])) {
+                                                       } elseif (($conf['captionSplit'] || $conf['imageTextSplit']) && isset($conf['caption.'])) {
                                                                $thisCaption = $this->cObj->cObjGet($conf['caption.'], 'caption.');
                                                                $thisCaption = $this->cObj->stdWrap($thisCaption, $conf['caption.']);
                                                        }
index 264a4d0..bebaf4e 100644 (file)
@@ -52,7 +52,7 @@ class tslib_content_LoadRegister extends tslib_content_Abstract {
                                        $registerProperties = $register . '.';
                                        if(isset($conf[$register]) && isset($conf[$registerProperties])) {
                                                $theValue = $this->cObj->stdWrap($conf[$register], $conf[$registerProperties]);
-                                       } else if(isset($conf[$registerProperties])) {
+                                       } elseif(isset($conf[$registerProperties])) {
                                                $theValue = $this->cObj->stdWrap('', $conf[$registerProperties]);
                                        }
                                        $GLOBALS['TSFE']->register[$register] = $theValue;
index c9cf9b5..1c88a63 100644 (file)
@@ -58,7 +58,7 @@ class tslib_content_SearchResult extends tslib_content_Abstract {
                                                $theStartId = $temp_theStartId;
                                        }
                                }
-                       } else if (t3lib_div::_GP('stype')) {
+                       } elseif (t3lib_div::_GP('stype')) {
                                if (substr(t3lib_div::_GP('stype'), 0, 1) == 'L') {
                                        $pointer = intval(substr(t3lib_div::_GP('stype'), 1));
                                        $theRootLine = $GLOBALS['TSFE']->tmpl->rootLine;
index 95d6060..fcb4e2d 100644 (file)
@@ -1000,7 +1000,7 @@ class ux_t3lib_DB extends t3lib_DB {
                                        $mt = $this->sql_field_metatype($table, $k);
                                        if ($mt{0} == 'I') {
                                                $v = (int) $v;
-                                       } else if ($mt{0} == 'F') {
+                                       } elseif ($mt{0} == 'F') {
                                                $v = (double) $v;
                                        }
 
@@ -1110,7 +1110,7 @@ class ux_t3lib_DB extends t3lib_DB {
                                                $mt = $this->sql_field_metatype($table, $k);
                                                if ($mt{0} == 'I') {
                                                        $v = (int) $v;
-                                               } else if ($mt{0} == 'F') {
+                                               } elseif ($mt{0} == 'F') {
                                                        $v = (double) $v;
                                                }
                                                $nArr[] = $this->quoteFieldNames($k) . '=' . ((!in_array($k, $no_quote_fields)) ? $this->fullQuoteStr($v, $table) : $v);
index 5c0ef62..7f5dc70 100644 (file)
@@ -662,13 +662,13 @@ class ux_t3lib_sqlparser extends t3lib_sqlparser {
                                                                                                }
                                                                                                $output .= ' (' . trim(implode(',', $valueBuffer)) . ')';
                                                                                        }
-                                                                               } else if (t3lib_div::inList('BETWEEN,NOT BETWEEN', $v['comparator'])) {
+                                                                               } elseif (t3lib_div::inList('BETWEEN,NOT BETWEEN', $v['comparator'])) {
                                                                                        $lbound = $v['values'][0];
                                                                                        $ubound = $v['values'][1];
                                                                                        $output .= ' ' . $lbound[1] . $this->compileAddslashes($lbound[0]) . $lbound[1];
                                                                                        $output .= ' AND ';
                                                                                        $output .= $ubound[1] . $this->compileAddslashes($ubound[0]) . $ubound[1];
-                                                                               } else if (isset($v['value']['operator'])) {
+                                                                               } elseif (isset($v['value']['operator'])) {
                                                                                        $values = array();
                                                                                        foreach ($v['value']['args'] as $fieldDef) {
                                                                                                $values[] = ($fieldDef['table'] ? $fieldDef['table'] . '.' : '') . $fieldDef['field'];
index e522a71..7ee5e3d 100644 (file)
@@ -616,7 +616,7 @@ class tx_felogin_pi1 extends tslib_pibase {
                                                        }
                                                break;
                                        }
-                               } else if ($this->logintype === 'login') { // after login-error
+                               } elseif ($this->logintype === 'login') { // after login-error
                                        switch ($redirMethod) {
                                                case 'loginError':
                                                        if ($this->conf['redirectPageLoginError']) {
index 193a69b..1a6b4d8 100644 (file)
@@ -123,7 +123,7 @@ class tx_install_session {
                        $sessionCreationError .= 'The PHP option session.auto-start is enabled. Disable this option in php.ini or .htaccess:<br />';
                        $sessionCreationError .= '<pre>php_value session.auto_start Off</pre>';
                        throw new RuntimeException($sessionCreationError, 1294587485);
-               } else if (defined('SID')) {
+               } elseif (defined('SID')) {
                        $sessionCreationError = 'Session already started by session_start().<br />';
                        $sessionCreationError .= 'Make sure no installed extension is starting a session in its ext_localconf.php or ext_tables.php.';
                        throw new RuntimeException($sessionCreationError, 1294587486);
index c892b29..78b73ff 100644 (file)
@@ -200,7 +200,7 @@ debug($contentTreeData);
                                                $GLOBALS['TYPO3_DB']->exec_UPDATEquery($table,'uid='.intval($uid),$incomingData[$table][$uid]);
                                                $output .= '<br />Updated ' . $table . ':' . $uid . '...';
                                                $this->updateRefIndex($table,$uid);
-                                       } else if (t3lib_div::_POST('_DELETE')) {
+                                       } elseif (t3lib_div::_POST('_DELETE'))  {
                                                $GLOBALS['TYPO3_DB']->exec_DELETEquery($table,'uid='.intval($uid));
                                                $output .= '<br />Deleted ' . $table . ':' . $uid . '...';
                                                $this->updateRefIndex($table,$uid);
index 4f55dc4..55628e2 100644 (file)
@@ -140,7 +140,7 @@ Cleaning XML for FlexForm fields.
                                        } else {
                                                if ($echoLevel>2)       echo ' was CLEAN';
                                        }
-                               } else if ($echoLevel>2)        echo ' was EMPTY';
+                               } elseif ($echoLevel>2) echo ' was EMPTY';
                        }
                }
        }
index fbb1020..de34a4c 100644 (file)
@@ -175,7 +175,7 @@ class tx_rtehtmlarea_acronym extends tx_rtehtmlarea_api {
                        $item = array('term' => $GLOBALS['LANG']->csConvObj->utf8_encode($acronymRow['term'], $charset), 'abbr' => $GLOBALS['LANG']->csConvObj->utf8_encode($acronymRow['acronym'], $charset), 'language' => $GLOBALS['LANG']->csConvObj->utf8_encode(strtolower($acronymRow['lg_iso_2']), $charset) . ($acronymRow['lg_country_iso_2'] ? ('-' . $acronymRow['lg_country_iso_2']) : ''));
                        if ($acronymRow['type'] == 1) {
                                $acronymArray[] = $item;
-                       } else if ($acronymRow['type'] == 2) {
+                       } elseif ($acronymRow['type'] == 2) {
                                $abbrArray[] = $item;
                        }
                }
index 2fa1000..9707698 100644 (file)
@@ -158,7 +158,7 @@ class tx_rtehtmlarea_inlineelements extends tx_rtehtmlarea_api {
                                        // Restriction clause
                                if ($this->thisConfig['buttons.']['formattext.']['restrictTo']) {
                                        $restrictTo = t3lib_div::trimExplode(',', $this->htmlAreaRTE->cleanList('none,'.$this->thisConfig['buttons.']['formattext.']['restrictTo']), 1);
-                               } else if ($this->thisConfig['buttons.']['formattext.']['restrictToItems']) {
+                               } elseif ($this->thisConfig['buttons.']['formattext.']['restrictToItems']) {
                                        $restrictTo = t3lib_div::trimExplode(',', $this->htmlAreaRTE->cleanList('none,'.$this->thisConfig['buttons.']['formattext.']['restrictToItems']), 1);
                                }
                                        // Elements order
index 17a21a0..7f032d6 100644 (file)
@@ -106,7 +106,7 @@ class tx_rtehtmlarea_tableoperations extends tx_rtehtmlarea_api {
                                                        $registerRTEinJavascriptString .= '
                                        RTEarea['.$RTEcounter.'].buttons.'.$dialogue.' = new Object();
                                        RTEarea['.$RTEcounter.'].buttons.'.$dialogue.'.removeFieldsets = "' . $disabledFieldsets . '";';
-                                               } else if ($this->thisConfig['buttons.'][$dialogue.'.']['removeFieldsets']) {
+                                               } elseif ($this->thisConfig['buttons.'][$dialogue.'.']['removeFieldsets']) {
                                                        $registerRTEinJavascriptString .= '
                                        RTEarea['.$RTEcounter.'].buttons.'.$dialogue.'.removeFieldsets += ",' . $disabledFieldsets . '";';
                                                } else {
index b09c990..eca675b 100644 (file)
@@ -145,7 +145,7 @@ class tx_rtehtmlarea_folderTree extends rteFolderTree {
                        // Preparing the current-path string (if found in the listing we will see a red blinking arrow).
                if (!$GLOBALS['SOBE']->browser->curUrlInfo['value'])    {
                        $cmpPath='';
-               } else if (substr(trim($GLOBALS['SOBE']->browser->curUrlInfo['info']),-1)!='/') {
+               } elseif (substr(trim($GLOBALS['SOBE']->browser->curUrlInfo['info']),-1)!='/')  {
                        $cmpPath=PATH_site.dirname($GLOBALS['SOBE']->browser->curUrlInfo['info']).'/';
                } else {
                        $cmpPath=PATH_site.$GLOBALS['SOBE']->browser->curUrlInfo['info'];
index 22e9a0b..82a0656 100644 (file)
@@ -174,7 +174,7 @@ class tx_rtehtmlarea_parse_html {
                                if (isset($HTMLparserConfig['tags.']['span.']['allowedAttribs'])) {
                                        if (!$HTMLparserConfig['tags.']['span.']['allowedAttribs']) {
                                                $HTMLparserConfig['tags.']['span.']['allowedAttribs'] = 'id';
-                                       } else if (!t3lib_div::inList($HTMLparserConfig['tags.']['span.']['allowedAttribs'], 'id')) {
+                                       } elseif (!t3lib_div::inList($HTMLparserConfig['tags.']['span.']['allowedAttribs'], 'id')) {
                                                $HTMLparserConfig['tags.']['span.']['allowedAttribs'] .= ',id';
                                        }
                                }
index 5ae5aa6..62860c0 100644 (file)
@@ -103,7 +103,7 @@ class tx_rtehtmlarea_pi2 extends tx_rtehtmlarea_base {
 
                if (is_array($thisConfig) && !empty($thisConfig)) {
                        $this->thisConfig = $thisConfig;
-               } else if (is_array($this->RTEsetup['default.']) && is_array($this->RTEsetup['default.']['FE.'])) {
+               } elseif (is_array($this->RTEsetup['default.']) && is_array($this->RTEsetup['default.']['FE.'])) {
                        $this->thisConfig = $this->RTEsetup['default.']['FE.'];
                }
 
index 6d1814f..3ad5fab 100644 (file)
@@ -136,7 +136,7 @@ class tx_saltedpasswords_div {
                        $securityLevel = $GLOBALS['TYPO3_CONF_VARS'][$mode]['loginSecurityLevel'];
                        if ($mode == 'BE' && $extConf['enabled']) {
                                return (($securityLevel =='normal' && $GLOBALS['TYPO3_CONF_VARS']['BE']['lockSSL'] > 0) || $securityLevel == 'rsa');
-                       } else if ($mode =='FE' && $extConf['enabled']) {
+                       } elseif ($mode =='FE' && $extConf['enabled']) {
                                return t3lib_div::inList('normal,rsa', $securityLevel);
                        }
 
index b360353..7b7c9d7 100644 (file)
@@ -77,7 +77,7 @@ class tx_saltedpasswords_eval {
                        if ($isMD5) {
                                $set = TRUE;
                                $value = 'M' . $this->objInstanceSaltedPW->getHashedPassword($value);
-                       } else if (!$isSaltedHash) {
+                       } elseif (!$isSaltedHash) {
                                $set = TRUE;
                                $value = $this->objInstanceSaltedPW->getHashedPassword($value);
                        }
index 41f3e98..c974c06 100644 (file)
@@ -119,7 +119,7 @@ class tx_saltedpasswords_sv1 extends tx_sv_authbase {
                        // could be merged; still here to clarify
                if (!strcmp(TYPO3_MODE, 'BE')) {
                        $password = $loginData['uident_text'];
-               } else if (!strcmp(TYPO3_MODE, 'FE')) {
+               } elseif (!strcmp(TYPO3_MODE, 'FE')) {
                        $password = $loginData['uident_text'];
                }
 
@@ -156,7 +156,7 @@ class tx_saltedpasswords_sv1 extends tx_sv_authbase {
                                );
                        }
                        // we process also clear-text, md5 and passwords updated by Portable PHP password hashing framework
-               } else if (!intval($this->extConf['forceSalted'])) {
+               } elseif (!intval($this->extConf['forceSalted'])) {
 
                                // stored password is in deprecated salted hashing method
                        if (t3lib_div::inList('C$,M$', substr($user['password'], 0, 2))) {
@@ -249,20 +249,20 @@ class tx_saltedpasswords_sv1 extends tx_sv_authbase {
                                        $this->login['uname']
                                );
                                $OK = 0;
-                       } else if(!$validPasswd) {
+                       } elseif(!$validPasswd) {
                                        // Failed login attempt (wrong password)
                                $this->writeLog(
                                        "Login-attempt from %s, username '%s', password not accepted!",
                                        $this->authInfo['REMOTE_ADDR'], $this->login['uname']
                                );
-                       } else if ($validPasswd && $user['lockToDomain'] && strcasecmp($user['lockToDomain'], $this->authInfo['HTTP_HOST'])) {
+                       } elseif ($validPasswd && $user['lockToDomain'] && strcasecmp($user['lockToDomain'], $this->authInfo['HTTP_HOST'])) {
                                        // Lock domain didn't match, so error:
                                $this->writeLog(
                                        "Login-attempt from %s, username '%s', locked domain '%s' did not match '%s'!",
                                        $this->authInfo['REMOTE_ADDR'], $this->login['uname'], $user['lockToDomain'], $this->authInfo['HTTP_HOST']
                                );
                                $OK = 0;
-                       } else if ($validPasswd) {
+                       } elseif ($validPasswd) {
                                $this->writeLog(
                                        TYPO3_MODE . ' Authentication successful for username \'%s\'',
                                        $this->login['uname']
index 092f024..7a680ed 100644 (file)
@@ -233,7 +233,7 @@ class tx_scheduler_Execution {
                                if ($this->cronCmd) {
                                                // If it uses cron-like syntax, calculate next date
                                        $date = $this->getNextCronExecution();
-                               } else if ($this->interval == 0) {
+                               } elseif ($this->interval == 0) {
                                                // If not and there's no interval either, it's a singe execution: use start date
                                        $date = $this->start;
                                } else {
index 46434ec..b7008f8 100644 (file)
@@ -53,7 +53,7 @@ class tx_scheduler_SleepTask_AdditionalFieldProvider implements tx_scheduler_Add
                        if ($parentObject->CMD == 'add') {
                                        // In case of new task and if field is empty, set default sleep time
                                $taskInfo['sleepTime'] = 30;
-                       } else if ($parentObject->CMD == 'edit') {
+                       } elseif ($parentObject->CMD == 'edit') {
                                        // In case of edit, set to internal value if no data was submitted already
                                $taskInfo['sleepTime'] = $task->sleepTime;
                        } else {
index ce40aaa..a692824 100755 (executable)
@@ -990,7 +990,7 @@ class SC_mod_user_setup_index {
                                // Setting comes from another extension
                        $context = $strParts[0];
                        $field = $strParts[1];
-               } else if (!t3lib_div::inList('language,simuser', $str)) {
+               } elseif (!t3lib_div::inList('language,simuser', $str)) {
                        $field = 'option_' . $str;
                }
                return t3lib_BEfunc::wrapInHelp($context, $field, $label);
index 9ec6f88..b36596f 100644 (file)
@@ -154,7 +154,7 @@ class tx_t3editor_codecompletion {
                                        }
                                        $cleanedTreeBranch[$key]['v'] = $value;
                                }
-                       } else if ($dotCount == 1) { // subtree (definition of properties)
+                       } elseif ($dotCount == 1) { // subtree (definition of properties)
                                $subBranch = $this->treeWalkCleanup($value);
                                if ($subBranch) {
                                        $key = str_replace('.', '', $key);
index 3801378..b58c312 100755 (executable)
@@ -712,7 +712,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                                '<tr><td class="ver-wl-details-label"><strong>' . $LANG->getLL('workspace_list_label_workspace_users') . '</strong></td>' .
                                '<td class="ver-wl-details">' . $this->workspaceList_getUserList($wksp) . '</td></tr>';
                }
-               else if ($GLOBALS['BE_USER']->isAdmin()) {
+               elseif ($GLOBALS['BE_USER']->isAdmin()) {
                        // show users for draft/live workspace only to admin users
                        $content .=     '<tr><td class="ver-wl-details-label"><strong>' . $LANG->getLL('workspace_list_label_workspace_users') . '</strong></td>' .
                                '<td class="ver-wl-details">' . $this->workspaceList_getUserList($wksp) . '</td></tr>';
@@ -736,7 +736,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                if ($wksp['uid'] == -1) {
                                // draft workspace
                        return $GLOBALS['LANG']->getLL('workspace_list_db_mount_point_draft');
-               } else if ($wksp['uid'] == 0) {
+               } elseif ($wksp['uid'] == 0) {
                                // live workspace
                        return $GLOBALS['LANG']->getLL('workspace_list_db_mount_point_live');
                }
@@ -790,7 +790,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                if ($wksp['uid'] == -1) {
                                // draft workspace - none!
                        return $GLOBALS['LANG']->getLL('workspace_list_file_mount_point_draft');
-               } else if ($wksp['uid'] == 0) {
+               } elseif ($wksp['uid'] == 0) {
                                // live workspace
                        return $GLOBALS['LANG']->getLL('workspace_list_file_mount_point_live');
                }
index 557de62..f6c23af 100644 (file)
@@ -137,7 +137,7 @@ class tx_Workspaces_Service_GridData {
 
                                        if ($swapAccess && $swapStage != 0 && $versionRecord['t3ver_stage'] == $swapStage) {
                                                $versionArray['allowedAction_swap'] = $stagesObj->isNextStageAllowedForUser($swapStage);
-                                       } else if ($swapAccess && $swapStage == 0) {
+                                       } elseif ($swapAccess && $swapStage == 0) {
                                                $versionArray['allowedAction_swap'] = TRUE;
                                        } else {
                                                $versionArray['allowedAction_swap'] = FALSE;
index 30ffe1d..dea8c42 100644 (file)
@@ -169,7 +169,7 @@ class Tx_Workspaces_Service_Stages {
                                foreach ($workspaceStageRecs as $workspaceStageRec) {
                                        if ($this->isStageAllowedForUser($workspaceStageRec['uid'])) {
                                                $stagesForWSUserData[$workspaceStageRec['uid']] = $workspaceStageRec;
-                                       } else if ($workspaceStageRec['uid'] == self::STAGE_PUBLISH_EXECUTE_ID && $GLOBALS['BE_USER']->workspacePublishAccess($this->getWorkspaceId())) {
+                                       } elseif ($workspaceStageRec['uid'] == self::STAGE_PUBLISH_EXECUTE_ID && $GLOBALS['BE_USER']->workspacePublishAccess($this->getWorkspaceId())) {
                                                $allowedStages[] = $workspaceStageRec;
                                                $stagesForWSUserData[$workspaceStageRec['uid']] = $workspaceStageRec;
                                        }
index a5831d1..5b97af3 100644 (file)
@@ -190,7 +190,7 @@ class tx_Workspaces_Service_Workspaces {
                        // Contains either nothing or a list with live-uids
                if ($pageId != -1 && $recursionLevel > 0) {
                        $pageList = $this->getTreeUids($pageId, $wsid, $recursionLevel);
-               } else if ($pageId != -1) {
+               } elseif ($pageId != -1) {
                        $pageList = $pageId;
                } else {
                        $pageList = '';
@@ -243,7 +243,7 @@ class tx_Workspaces_Service_Workspaces {
                 */
                if ($wsid > self::SELECT_ALL_WORKSPACES) {
                        $where .= ' AND A.t3ver_wsid=' . $wsid;
-               } else if ($wsid === self::SELECT_ALL_WORKSPACES) {
+               } elseif ($wsid === self::SELECT_ALL_WORKSPACES) {
                        $where .= ' AND A.t3ver_wsid!=0';
                }
 
@@ -298,7 +298,7 @@ class tx_Workspaces_Service_Workspaces {
 
                if ($wsid > self::SELECT_ALL_WORKSPACES) {
                        $where .= ' AND A.t3ver_wsid=' . $wsid . ' AND C.t3ver_wsid=' . $wsid;
-               } else if ($wsid === self::SELECT_ALL_WORKSPACES) {
+               } elseif ($wsid === self::SELECT_ALL_WORKSPACES) {
                        $where .= ' AND A.t3ver_wsid!=0 AND C.t3ver_wsid!=0 ';
                }
 
index 21ee7af..0e23177 100644 (file)
@@ -1908,9 +1908,9 @@ $str.=$this->docBodyTagBegin().
                }
                if (t3lib_div::isFirstPartOfStr($filename, 'EXT:')) {
                        $filename = t3lib_div::getFileAbsFileName($filename, TRUE, TRUE);
-               } else if (!t3lib_div::isAbsPath($filename)) {
+               } elseif (!t3lib_div::isAbsPath($filename)) {
                        $filename = t3lib_div::resolveBackPath($this->backPath . $filename);
-               } else if (!t3lib_div::isAllowedAbsPath($filename)) {
+               } elseif (!t3lib_div::isAllowedAbsPath($filename)) {
                        $filename = '';
                }
                $htmlTemplate = '';