[TASK] CGL OpeningFunctionBraceKernighanRitchieSpaceBeforeBrace in version
authorRoland Waldner <most.wanted@gmx.at>
Thu, 21 Jun 2012 20:09:53 +0000 (22:09 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 21 Jun 2012 20:42:44 +0000 (22:42 +0200)
Change-Id: I1bf7f10a05b207c318b21550c68cb2690ba569b1
Resolves: #38268
Releases: 6.0
Reviewed-on: http://review.typo3.org/12272
Reviewed-by: Oliver Klee
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/version/class.tx_version_cm1.php
typo3/sysext/version/cm1/index.php
typo3/sysext/version/ws/class.wslib.php
typo3/sysext/version/ws/index.php

index bd364ad..2a9b210 100755 (executable)
@@ -107,7 +107,7 @@ class tx_version_cm1 {
         *
         * @return      array           Local lang array
         */
-       function includeLL()    {
+       function includeLL() {
                return $GLOBALS['LANG']->includeLLFile('EXT:version/locallang.xml', FALSE);
        }
 }
index e7951f0..17bea53 100755 (executable)
@@ -139,7 +139,7 @@ class tx_version_cm1 extends t3lib_SCbase {
         *
         * @return      void
         */
-       function menuConfig()   {
+       function menuConfig() {
 
                        // fetches the configuration of the version extension
                $versionExtconf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['version']);
@@ -171,7 +171,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                if (t3lib_extMgm::isLoaded('workspaces') && $GLOBALS['BE_USER']->workspace ===0 ) {
                        $workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title,adminusers,members,reviewers', 'sys_workspace', 'pid=0' . t3lib_BEfunc::deleteClause('sys_workspace'), '', 'title');
                        foreach($workspaces as $rec) {
-                               if ($GLOBALS['BE_USER']->checkWorkspace($rec))  {
+                               if ($GLOBALS['BE_USER']->checkWorkspace($rec)) {
                                        $this->MOD_MENU['display'][$rec['uid']] = '['.$rec['uid'].'] '.$rec['title'];
                                }
                        }
@@ -186,7 +186,7 @@ class tx_version_cm1 extends t3lib_SCbase {
         *
         * @return      void
         */
-       function main() {
+       function main() {
                        // Template markers
                $markers = array(
                        'CSH' => '',
@@ -216,7 +216,7 @@ class tx_version_cm1 extends t3lib_SCbase {
 
                        // Getting input data:
                $this->id = intval(t3lib_div::_GP('id'));               // Page id. If set, indicates activation from Web>Versioning module
-               if (!$this->id) {
+               if (!$this->id) {
                        $this->uid = intval(t3lib_div::_GP('uid'));             // Record uid. Goes with table name to indicate specific record
                        $this->table = t3lib_div::_GP('table');                 // Record table. Goes with uid to indicate specific record
                } else {
@@ -256,21 +256,21 @@ class tx_version_cm1 extends t3lib_SCbase {
                                $this->doc->JScode.= '
                                        <script language="javascript" type="text/javascript">
                                                script_ended = 0;
-                                               function jumpToUrl(URL) {
+                                               function jumpToUrl(URL) {
                                                        window.location.href = URL;
                                                }
 
                                                function hlSubelements(origId, verId, over, diffLayer)  {       //
-                                                       if (over)       {
+                                                       if (over) {
                                                                document.getElementById(\'orig_\'+origId).attributes.getNamedItem("class").nodeValue = \'typo3-ver-hl\';
                                                                document.getElementById(\'ver_\'+verId).attributes.getNamedItem("class").nodeValue = \'typo3-ver-hl\';
-                                                               if (diffLayer)  {
+                                                               if (diffLayer) {
                                                                        document.getElementById(\'diff_\'+verId).style.visibility = \'visible\';
                                                                }
                                                        } else {
                                                                document.getElementById(\'orig_\'+origId).attributes.getNamedItem("class").nodeValue = \'typo3-ver\';
                                                                document.getElementById(\'ver_\'+verId).attributes.getNamedItem("class").nodeValue = \'typo3-ver\';
-                                                               if (diffLayer)  {
+                                                               if (diffLayer) {
                                                                        document.getElementById(\'diff_\'+verId).style.visibility = \'hidden\';
                                                                }
                                                        }
@@ -286,7 +286,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                $this->publishAccess = $GLOBALS['BE_USER']->workspacePublishAccess($GLOBALS['BE_USER']->workspace);
 
                                        // Render content:
-                               if ($this->id)  {
+                               if ($this->id) {
                                        $this->workspaceMgm();
                                } else {
                                        $this->versioningMgm();
@@ -321,7 +321,7 @@ class tx_version_cm1 extends t3lib_SCbase {
         *
         * @return      void
         */
-       function printContent() {
+       function printContent() {
                echo $this->content;
        }
 
@@ -330,7 +330,7 @@ class tx_version_cm1 extends t3lib_SCbase {
         *
         * @return      array   all available buttons as an assoc. array
         */
-       protected function getButtons() {
+       protected function getButtons() {
                $buttons = array(
                        'csh' => '',
                        'view' => '',
@@ -382,19 +382,19 @@ class tx_version_cm1 extends t3lib_SCbase {
         *
         * @return      void
         */
-       function versioningMgm()        {
+       function versioningMgm() {
 
                        // Diffing:
                $diff_1 = t3lib_div::_POST('diff_1');
                $diff_2 = t3lib_div::_POST('diff_2');
-               if (t3lib_div::_POST('do_diff'))        {
+               if (t3lib_div::_POST('do_diff')) {
                        $content='';
                        $content.='<h3>' . $GLOBALS['LANG']->getLL('diffing') . ':</h3>';
-                       if ($diff_1 && $diff_2) {
+                       if ($diff_1 && $diff_2) {
                                $diff_1_record = t3lib_BEfunc::getRecord($this->table, $diff_1);
                                $diff_2_record = t3lib_BEfunc::getRecord($this->table, $diff_2);
 
-                               if (is_array($diff_1_record) && is_array($diff_2_record))       {
+                               if (is_array($diff_1_record) && is_array($diff_2_record)) {
                                        t3lib_div::loadTCA($this->table);
                                        $t3lib_diff_Obj = t3lib_div::makeInstance('t3lib_diff');
 
@@ -426,7 +426,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                }
                                        }
 
-                                       if (count($tRows)>1)    {
+                                       if (count($tRows)>1) {
                                                $content .= '<table border="0" cellpadding="1" cellspacing="1" width="100%">' . implode('', $tRows) . '</table><br /><br />';
                                        } else {
                                                $content .= $GLOBALS['LANG']->getLL('recordsMatchesCompletely');
@@ -498,10 +498,10 @@ class tx_version_cm1 extends t3lib_SCbase {
                                </tr>';
 
                                // Show sub-content if the table is pages AND it is not the online branch (because that will mostly render the WHOLE tree below - not smart;)
-                       if ($this->table == 'pages' && $row['uid']!=$this->uid) {
+                       if ($this->table == 'pages' && $row['uid']!=$this->uid) {
                                $sub = $this->pageSubContent($row['uid']);
 
-                               if ($sub)       {
+                               if ($sub) {
                                        $content.='
                                                <tr>
                                                        <td></td>
@@ -557,7 +557,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                ($GLOBALS['TCA'][$tN]['ctrl']['sortby'] ? $GLOBALS['TCA'][$tN]['ctrl']['sortby'] : '')
                        );
 
-                       if ($GLOBALS['TYPO3_DB']->sql_num_rows($mres))  {
+                       if ($GLOBALS['TYPO3_DB']->sql_num_rows($mres)) {
                                $content.='
                                        <tr>
                                                <td colspan="4" class="' . ($GLOBALS['TCA'][$tN]['ctrl']['versioning_followPages'] ? 'bgColor6' : ($tN == 'pages' ? 'bgColor5' : 'bgColor-10')) . '"' . (!$GLOBALS['TCA'][$tN]['ctrl']['versioning_followPages'] && $tN !== 'pages' ? ' style="color: #666666; font-style:italic;"' : '') . '>' . $tN . '</td>
@@ -600,7 +600,7 @@ class tx_version_cm1 extends t3lib_SCbase {
         */
        function lookForOwnVersions($table, $uid) {
                $versions = t3lib_BEfunc::selectVersionsOfRecord($table, $uid, 'uid');
-               if (is_array($versions))        {
+               if (is_array($versions)) {
                        return count($versions);
                }
                return FALSE;
@@ -627,7 +627,7 @@ class tx_version_cm1 extends t3lib_SCbase {
 
 
 
-               if ($table == 'pages')  {
+               if ($table == 'pages') {
 
                                // If another page module was specified, replace the default Page module with the new one
                        $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
@@ -649,7 +649,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                t3lib_iconWorks::getSpriteIcon('actions-document-view') .
                                '</a>';
                } else {
-                       if ($row['pid']==-1)    {
+                       if ($row['pid']==-1) {
                                $getVars = '&ADMCMD_vPrev['.rawurlencode($table.':'.$row['t3ver_oid']).']='.$row['uid'];
 
                                        // "View page" icon is added:
@@ -684,7 +684,7 @@ class tx_version_cm1 extends t3lib_SCbase {
         *
         * @return      void
         */
-       function workspaceMgm() {
+       function workspaceMgm() {
 
                        // Perform workspace publishing action if buttons are pressed:
                $errors = $this->publishAction();
@@ -694,10 +694,10 @@ class tx_version_cm1 extends t3lib_SCbase {
 
                        // Buttons for publish / swap:
                $actionLinks = '<br />';
-               if ($GLOBALS['BE_USER']->workspace!==0) {
-                       if ($this->publishAccess)       {
+               if ($GLOBALS['BE_USER']->workspace!==0) {
+                       if ($this->publishAccess) {
                                $actionLinks.= '<input type="submit" name="_publish" value="' . $GLOBALS['LANG']->getLL('publishPage') . '" onclick="return confirm(\'' . sprintf($GLOBALS['LANG']->getLL('publishPageQuestion'), $GLOBALS['BE_USER']->workspaceRec['publish_access'] & 1 ? $GLOBALS['LANG']->getLL('publishPageQuestionStage') : '') . '\');"/>';
-                               if ($GLOBALS['BE_USER']->workspaceSwapAccess()) {
+                               if ($GLOBALS['BE_USER']->workspaceSwapAccess()) {
                                        $actionLinks.= '<input type="submit" name="_swap" value="' . $GLOBALS['LANG']->getLL('swapPage') . '" onclick="return confirm(\'' . sprintf($GLOBALS['LANG']->getLL('swapPageQuestion'), $GLOBALS['BE_USER']->workspaceRec['publish_access'] & 1 ? $GLOBALS['LANG']->getLL('publishPageQuestionStage') : '') . '\');" />';
                                }
                        } else {
@@ -710,15 +710,15 @@ class tx_version_cm1 extends t3lib_SCbase {
                $actionLinks.= '<input type="checkbox" class="checkbox" name="_previewLink_wholeWorkspace" id="_previewLink_wholeWorkspace" value="1" /><label for="_previewLink_wholeWorkspace">' . $GLOBALS['LANG']->getLL('allowPreviewOfWholeWorkspace') . '</label>';
                $actionLinks.= $this->displayWorkspaceOverview_allStageCmd();
 
-               if ($actionLinks || count($errors))     {
+               if ($actionLinks || count($errors)) {
                        $this->content .= $this->doc->section('', $actionLinks . (count($errors) ? '<h3>' . $GLOBALS['LANG']->getLL('errors') . '</h3><br />' . implode('<br />', $errors) . '<hr />' : ''), 0, 1);
                }
 
-               if (t3lib_div::_POST('_previewLink'))   {
+               if (t3lib_div::_POST('_previewLink')) {
                        $ttlHours = intval($GLOBALS['BE_USER']->getTSConfigVal('options.workspaces.previewLinkTTLHours'));
                        $ttlHours = ($ttlHours ? $ttlHours : 24*2);
 
-                       if (t3lib_div::_POST('_previewLink_wholeWorkspace'))    {
+                       if (t3lib_div::_POST('_previewLink_wholeWorkspace')) {
                                $previewUrl = t3lib_BEfunc::getViewDomain($this->id) . '/index.php?ADMCMD_prev=' . t3lib_BEfunc::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'], 60*60*$ttlHours, $GLOBALS['BE_USER']->workspace) . '&id=' . intval($this->id);
                        } else {
                                $params = 'id='.$this->id.'&ADMCMD_previewWS='.$GLOBALS['BE_USER']->workspace;
@@ -736,15 +736,15 @@ class tx_version_cm1 extends t3lib_SCbase {
        function workspaceMenu() {
                if ($this->id) {
                        $menu = '';
-                       if ($GLOBALS['BE_USER']->workspace===0) {
+                       if ($GLOBALS['BE_USER']->workspace===0) {
                                $menu .= t3lib_BEfunc::getFuncMenu($this->id, 'SET[filter]' ,$this->MOD_SETTINGS['filter'], $this->MOD_MENU['filter']);
                                $menu .= t3lib_BEfunc::getFuncMenu($this->id, 'SET[display]' ,$this->MOD_SETTINGS['display'], $this->MOD_MENU['display']);
                        }
-                       if (!$this->details && $GLOBALS['BE_USER']->workspace && !$this->diffOnly)      {
+                       if (!$this->details && $GLOBALS['BE_USER']->workspace && !$this->diffOnly) {
                                $menu .= t3lib_BEfunc::getFuncCheck($this->id, 'SET[diff]', $this->MOD_SETTINGS['diff'], '', '', 'id="checkDiff"') . ' <label for="checkDiff">' . $GLOBALS['LANG']->getLL('showDiffView') . '</label>';
                        }
 
-                       if ($menu)      {
+                       if ($menu) {
                                return $menu;
                        }
                }
@@ -756,7 +756,7 @@ class tx_version_cm1 extends t3lib_SCbase {
         * @return      string          HTML (table)
         * @see ws/index.php for sister function!
         */
-       function displayWorkspaceOverview()     {
+       function displayWorkspaceOverview() {
 
                        // Initialize variables:
                $this->showWorkspaceCol = $GLOBALS['BE_USER']->workspace===0 && $this->MOD_SETTINGS['display']<=-98;
@@ -770,7 +770,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                }
 
                        // Initialize Workspace ID and filter-value:
-               if ($GLOBALS['BE_USER']->workspace===0) {
+               if ($GLOBALS['BE_USER']->workspace===0) {
                        $wsid = $this->details ? -99 : $this->MOD_SETTINGS['display'];          // Set wsid to the value from the menu (displaying content of other workspaces)
                        $filter = $this->details ? 0 : $this->MOD_SETTINGS['filter'];
                } else {
@@ -799,7 +799,7 @@ class tx_version_cm1 extends t3lib_SCbase {
 
                        // Make header of overview:
                $tableRows = array();
-               if (count($pArray))     {
+               if (count($pArray)) {
                        $tableRows[] = '
                                <tr class="bgColor5 tableheader">
                                        '.($this->diffOnly?'':'<td nowrap="nowrap" colspan="2">' . $GLOBALS['LANG']->getLL('liveVersion') . '</td>').'
@@ -831,12 +831,12 @@ class tx_version_cm1 extends t3lib_SCbase {
         * @param       array           Storage of the elements to display (see displayWorkspaceOverview() / displayWorkspaceOverview_setInPageArray())
         * @return      array           Table rows, see displayWorkspaceOverview()
         */
-       function displayWorkspaceOverview_list($pArray) {
+       function displayWorkspaceOverview_list($pArray) {
 
                        // If there ARE elements on this level, print them:
                $warnAboutVersions_nonPages = FALSE;
                $warnAboutVersions_page = FALSE;
-               if (is_array($pArray))  {
+               if (is_array($pArray)) {
                        foreach ($pArray as $table => $oidArray) {
                                foreach ($oidArray as $oid => $recs) {
 
@@ -870,8 +870,8 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                $rec_off = t3lib_BEfunc::getRecord($table, $rec['uid']);
 
                                                // Prepare swap-mode values:
-                                               if ($table==='pages' && $rec_off['t3ver_swapmode']!=-1) {
-                                                       if ($rec_off['t3ver_swapmode']>0)       {
+                                               if ($table==='pages' && $rec_off['t3ver_swapmode']!=-1) {
+                                                       if ($rec_off['t3ver_swapmode']>0) {
                                                                $vType = 'branch';
                                                        } else {
                                                                $vType = 'page';
@@ -886,17 +886,17 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                $icon = $this->doc->wrapClickMenuOnIcon($icon, $table, $tempUid, 1, '', '+edit,' . ($table == 'pages' ? 'view,info,' : '') . 'delete');
 
                                                        // Prepare diff-code:
-                                               if ($this->MOD_SETTINGS['diff'] || $this->diffOnly)     {
+                                               if ($this->MOD_SETTINGS['diff'] || $this->diffOnly) {
                                                        $diffCode = '';
                                                        list($diffHTML, $diffPct) = $this->createDiffView($table, $rec_off, $rec_on);
                                                        if ($rec_on['t3ver_state']==1)  {       // New record:
                                                                $diffCode.= $this->doc->icons(1) . $GLOBALS['LANG']->getLL('newElement') . '<br />';
                                                                $diffCode.= $diffHTML;
-                                                       } elseif ($rec_off['t3ver_state']==2)   {
+                                                       } elseif ($rec_off['t3ver_state']==2) {
                                                                $diffCode.= $this->doc->icons(2) . $GLOBALS['LANG']->getLL('deletedElement') . '<br />';
-                                                       } elseif ($rec_on['t3ver_state']==3)    {
+                                                       } elseif ($rec_on['t3ver_state']==3) {
                                                                $diffCode.= $this->doc->icons(1) . $GLOBALS['LANG']->getLL('moveToPlaceholder') . '<br />';
-                                                       } elseif ($rec_off['t3ver_state']==4)   {
+                                                       } elseif ($rec_off['t3ver_state']==4) {
                                                                $diffCode.= $this->doc->icons(1) . $GLOBALS['LANG']->getLL('moveToPointer') . '<br />';
                                                        } else {
                                                                $diffCode.= ($diffPct<0 ? $GLOBALS['LANG']->getLL('notAvailable') : ($diffPct ? $diffPct . '% ' . $GLOBALS['LANG']->getLL('change') : ''));
@@ -952,7 +952,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                                        ($this->showWorkspaceCol ? '
                                                                <td nowrap="nowrap">&nbsp;&nbsp;<strong>' . $GLOBALS['LANG']->getLL('workspace')  . ':</strong> '.htmlspecialchars($this->formatWorkspace($rec_off['t3ver_wsid'])).'</td>' : ''):'');
 
-                                               if ($diffCode)  {
+                                               if ($diffCode) {
                                                        $verElement = $verElement.'
                                                        <br /><strong>' . $GLOBALS['LANG']->getLL('diffToLiveElement') . '</strong>
                                                        <table border="0" cellpadding="0" cellspacing="0" class="ver-verElement">
@@ -1015,18 +1015,18 @@ class tx_version_cm1 extends t3lib_SCbase {
         * @param       array           Offline record (version)
         * @return      string          HTML content, mainly link tags and images.
         */
-       function displayWorkspaceOverview_allStageCmd() {
+       function displayWorkspaceOverview_allStageCmd() {
 
                $table = t3lib_div::_GP('table');
-               if ($table && $table!='pages')  {
+               if ($table && $table!='pages') {
                        $uid = t3lib_div::_GP('uid');
                        if ($rec_off = t3lib_BEfunc::getRecordWSOL($table, $uid)) {
                                $uid = $rec_off['_ORIG_uid'];
                        }
                } else $table = '';
 
-               if ($table)     {
-                       if ($uid && $this->recIndex[$table][$uid])      {
+               if ($table) {
+                       if ($uid && $this->recIndex[$table][$uid]) {
                                $sId = $this->recIndex[$table][$uid];
                                switch ($sId) {
                                        case 1:
@@ -1054,15 +1054,15 @@ class tx_version_cm1 extends t3lib_SCbase {
                        }
                }
 
-               if ($sId>0)     {
+               if ($sId>0) {
                        $issueCmd = '';
                        $itemCount = 0;
 
-                       if ($table && $uid && $this->recIndex[$table][$uid])    {
+                       if ($table && $uid && $this->recIndex[$table][$uid]) {
                                $issueCmd.='&cmd['.$table.']['.$uid.'][version][action]=setStage';
                                $issueCmd.='&cmd['.$table.']['.$uid.'][version][stageId]='.$this->recIndex[$table][$uid];
                        } else {
-                               foreach($this->stageIndex[$sId] as $table => $uidArray) {
+                               foreach($this->stageIndex[$sId] as $table => $uidArray) {
                                        $issueCmd .= '&cmd[' . $table . '][' . implode(',', $uidArray) . '][version][action]=setStage';
                                        $issueCmd .= '&cmd[' . $table . '][' . implode(',', $uidArray) . '][version][stageId]=' . $sId;
                                        $itemCount += count($uidArray);
@@ -1072,7 +1072,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                        $onClick = 'var commentTxt=window.prompt("' . sprintf($label, $itemCount) . '","");
                                if (commentTxt!=null) {window.location.href="' . $this->doc->issueCommand($issueCmd, $this->REQUEST_URI) . '&generalComment="+escape(commentTxt);}';
 
-                       if (t3lib_div::_GP('sendToReview'))     {
+                       if (t3lib_div::_GP('sendToReview')) {
                                $onClick.= ' else {window.location.href = "'.$this->REQUEST_URI.'"}';
                                $actionLinks.=
                                        $this->doc->wrapScriptTags($onClick);
@@ -1081,7 +1081,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                $actionLinks.=
                                        '<input type="submit" name="_" value="'.htmlspecialchars($titleAttrib).'" onclick="'.htmlspecialchars($onClick).'" />';
                        }
-               } elseif (t3lib_div::_GP('sendToReview'))       {
+               } elseif (t3lib_div::_GP('sendToReview')) {
                        $onClick = 'window.location.href = "'.$this->REQUEST_URI.'";';
                        $actionLinks.=
                                $this->doc->wrapScriptTags($onClick);
@@ -1107,7 +1107,7 @@ class tx_version_cm1 extends t3lib_SCbase {
         * @param       integer         Version number
         * @return      string          Version number for output
         */
-       function formatVerId($verId)    {
+       function formatVerId($verId) {
                return '1.'.$verId;
        }
 
@@ -1117,10 +1117,10 @@ class tx_version_cm1 extends t3lib_SCbase {
         * @param       integer         Workspace ID
         * @return      string          Workspace title
         */
-       function formatWorkspace($wsid) {
+       function formatWorkspace($wsid) {
 
                        // Render, if not cached:
-               if (!isset($this->formatWorkspace_cache[$wsid]))        {
+               if (!isset($this->formatWorkspace_cache[$wsid])) {
                        switch ($wsid) {
                                case -1:
                                        $this->formatWorkspace_cache[$wsid] = $GLOBALS['LANG']->getLL('offline');
@@ -1144,10 +1144,10 @@ class tx_version_cm1 extends t3lib_SCbase {
         * @param       integer         t3ver_count value (number of times it has been online)
         * @return      string          String translation of count.
         */
-       function formatCount($count)    {
+       function formatCount($count) {
 
                        // Render, if not cached:
-               if (!isset($this->formatCount_cache[$count]))   {
+               if (!isset($this->formatCount_cache[$count])) {
                        switch ($count) {
                                case 0:
                                        $this->formatCount_cache[$count] = $GLOBALS['LANG']->getLL('draft');
@@ -1188,7 +1188,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                        '',
                        't3ver_wsid'
                );
-               if (count($rows))       {
+               if (count($rows)) {
                        return implode(',', array_keys($rows));
                }
        }
@@ -1316,7 +1316,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                // Find all records from page and collect in $recList:
                                        $recList = array();
                                        foreach ($GLOBALS['TCA'] as $tN => $tCfg) {
-                                               if ($tN!=='pages')      {
+                                               if ($tN!=='pages') {
                                                        $this->subElements_getNonPageRecords($tN, $data['row']['uid'], $recList);
                                                }
                                        }
@@ -1355,7 +1355,7 @@ class tx_version_cm1 extends t3lib_SCbase {
         * @param       array           Array where records are accumulated, passed by reference
         * @return      void
         */
-       function subElements_getNonPageRecords($tN, $uid, &$recList)    {
+       function subElements_getNonPageRecords($tN, $uid, &$recList) {
                $records = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
                        '*',
                        $tN,
@@ -1402,10 +1402,10 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                                ' id="ver_'.$uid.'_'.$tN.'_'.$rec[$origUidFields].'" class="typo3-ver"';
 
                                                // Create diff view:
-                                       if ($this->MOD_SETTINGS['diff'])        {
+                                       if ($this->MOD_SETTINGS['diff']) {
                                                list($diffHTML, $diffPct) = $this->createDiffView($tN, $rec, $this->targets['orig_'.$origId.'_'.$tN.'_'.$rec[$origUidFields]]);
 
-                                               if ($this->MOD_SETTINGS['diff']==2)     {
+                                               if ($this->MOD_SETTINGS['diff']==2) {
                                                        $diffCode =
                                                                ($diffPct ? '<span class="nobr">'.$diffPct.'% change</span>' : '-').
                                                                '<div style="visibility: hidden; position: absolute;" id="diff_'.$uid.'_'.$tN.'_'.$rec[$origUidFields].'" class="diffLayer">'.
@@ -1451,9 +1451,9 @@ class tx_version_cm1 extends t3lib_SCbase {
         *
         * @return      string          HTML javascript section
         */
-       function markupNewOriginals()   {
+       function markupNewOriginals() {
 
-               if (count($this->targets))      {
+               if (count($this->targets)) {
                        $scriptCode = '';
                        foreach ($this->targets as $key => $rec) {
                                $scriptCode.='
@@ -1473,13 +1473,13 @@ class tx_version_cm1 extends t3lib_SCbase {
         * @param       array           Old version record (red)
         * @return      array           Array with two keys (0/1) with HTML content / percentage integer (if -1, then it means N/A) indicating amount of change
         */
-       function createDiffView($table, $diff_1_record, $diff_2_record) {
+       function createDiffView($table, $diff_1_record, $diff_2_record) {
 
                        // Initialize:
                $pctChange = 'N/A';
 
                        // Check that records are arrays:
-               if (is_array($diff_1_record) && is_array($diff_2_record))       {
+               if (is_array($diff_1_record) && is_array($diff_2_record)) {
 
                                // Load full table description and initialize diff-object:
                        t3lib_div::loadTCA($table);
@@ -1529,7 +1529,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                        }
 
                                                // If there is a change of value:
-                                       if (strcmp(trim($diff_1_record[$fN]), trim($diff_2_record[$fN])))       {
+                                       if (strcmp(trim($diff_1_record[$fN]), trim($diff_2_record[$fN]))) {
 
 
                                                        // Get the best visual presentation of the value and present that:
@@ -1542,7 +1542,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                $allStrLen+= strlen($val1.$val2);
 
                                                        // If the compared values were files, substituted MD5 hashes:
-                                               if ($isFiles)   {
+                                               if ($isFiles) {
                                                        $allFiles = array_merge($files1, $files2);
                                                        foreach ($allFiles as $filename => $token) {
                                                                if (strlen($token) == 32 && strstr($diffres,$token)) {
@@ -1572,7 +1572,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                        $pctChange = $allStrLen ? ceil($diffStrLen*100/$allStrLen) : -1;
 
                                // Create visual representation of result:
-                       if (count($tRows)>1)    {
+                       if (count($tRows)>1) {
                                $content .= '<table border="0" cellpadding="1" cellspacing="1" class="diffTable">' . implode('', $tRows) . '</table>';
                        } else {
                                $content.= '<span class="nobr">'.$this->doc->icons(1) . $GLOBALS['LANG']->getLL('completeMatch') . '</span>';
@@ -1626,7 +1626,7 @@ class tx_version_cm1 extends t3lib_SCbase {
 
                $raiseOk = !$GLOBALS['BE_USER']->workspaceCannotEditOfflineVersion($table, $rec_off);
 
-               if ($raiseOk && $rec_off['t3ver_stage']!=-1)    {
+               if ($raiseOk && $rec_off['t3ver_stage']!=-1) {
                        $onClick = 'var commentTxt=window.prompt("' . $GLOBALS['LANG']->getLL('rejectExplain') . '","");
                                                        if (commentTxt!=null) {window.location.href="'.$this->doc->issueCommand(
                                                        '&cmd['.$table.']['.$rec_off['uid'].'][version][action]=setStage'.
@@ -1647,14 +1647,14 @@ class tx_version_cm1 extends t3lib_SCbase {
                $actionLinks.= '<span style="background-color: '.$color.'; color: white;">'.$sLabel.'</span>';
 
                        // Raise
-               if ($raiseOk)   {
+               if ($raiseOk) {
                        $onClick = 'var commentTxt=window.prompt("'.$label.'","");
                                                        if (commentTxt!=null) {window.location.href="'.$this->doc->issueCommand(
                                                        '&cmd['.$table.']['.$rec_off['uid'].'][version][action]=setStage'.
                                                        '&cmd['.$table.']['.$rec_off['uid'].'][version][stageId]='.$sId
                                                        ).'&cmd['.$table.']['.$rec_off['uid'].'][version][comment]="+escape(commentTxt);}'.
                                                        ' return false;';
-                       if ($rec_off['t3ver_stage']!=10)        {
+                       if ($rec_off['t3ver_stage']!=10) {
                                $actionLinks.=
                                        '<a href="#" onclick="'.htmlspecialchars($onClick).'" title="' . htmlspecialchars($titleAttrib) . '">' .
                                                t3lib_iconWorks::getSpriteIcon('actions-move-up') .
@@ -1685,7 +1685,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                )).'" title="' . $GLOBALS['LANG']->getLL('publish', TRUE) . '">'.
                                        t3lib_iconWorks::getSpriteIcon('actions-version-swap-version') .
                                '</a>';
-                       if ($GLOBALS['BE_USER']->workspaceSwapAccess()) {
+                       if ($GLOBALS['BE_USER']->workspaceSwapAccess()) {
                                $actionLinks.=
                                        '<a href="'.htmlspecialchars($this->doc->issueCommand(
                                                        '&cmd['.$table.']['.$rec_on['uid'].'][version][action]=swap'.
@@ -1705,7 +1705,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                '</a>';
 
                                // Edit
-                       if ($table==='pages' && $vType!=='element')     {
+                       if ($table==='pages' && $vType!=='element') {
                                $tempUid = ($vType==='branch' || $GLOBALS['BE_USER']->workspace===0 ? $rec_off['uid'] : $rec_on['uid']);
                                $actionLinks.=
                                        '<a href="#" onclick="top.loadEditId('.$tempUid.');top.goToModule(\''.$this->pageModule.'\'); return false;" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_page', TRUE) . '">'.
@@ -1727,7 +1727,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                        '</a>';
 
                        // View
-               if ($table==='pages')   {
+               if ($table==='pages') {
                        $tempUid = ($vType==='branch' || $GLOBALS['BE_USER']->workspace===0 ? $rec_off['uid'] : $rec_on['uid']);
                        $actionLinks.=
                                '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($tempUid, $this->doc->backPath, t3lib_BEfunc::BEgetRootLine($tempUid))) . '">' .
@@ -1748,10 +1748,10 @@ class tx_version_cm1 extends t3lib_SCbase {
         */
        function displayWorkspaceOverview_commandLinksSub($table, $rec, $origId) {
                $uid = $rec['uid'];
-               if ($origId || $GLOBALS['BE_USER']->workspace===0)      {
+               if ($origId || $GLOBALS['BE_USER']->workspace===0) {
                        if (!$GLOBALS['BE_USER']->workspaceCannotEditRecord($table, $rec)) {
                                        // Edit
-                               if ($table==='pages')   {
+                               if ($table==='pages') {
                                        $actionLinks.=
                                                '<a href="#" onclick="top.loadEditId('.$uid.');top.goToModule(\''.$this->pageModule.'\'); return false;" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_page', TRUE) . '">'.
                                                        t3lib_iconWorks::getSpriteIcon('apps-version-page-open') .
@@ -1773,7 +1773,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                }
 
                        // View
-               if ($table==='pages')   {
+               if ($table==='pages') {
                        $actionLinks.=
                                '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($uid, $this->doc->backPath, t3lib_BEfunc::BEgetRootLine($uid))) . '">' .
                                        t3lib_iconWorks::getSpriteIcon('actions-document-view') .
@@ -1802,10 +1802,10 @@ class tx_version_cm1 extends t3lib_SCbase {
         *
         * @return      void
         */
-       function publishAction()        {
+       function publishAction() {
 
                        // If "Publish" or "Swap" buttons are pressed:
-               if (t3lib_div::_POST('_publish') || t3lib_div::_POST('_swap'))  {
+               if (t3lib_div::_POST('_publish') || t3lib_div::_POST('_swap')) {
 
                        if ($this->table==='pages')     {       // Making sure ->uid is a page ID!
                                        // Initialize workspace object and request all pending versions:
index 58a1704..6b392d9 100755 (executable)
@@ -66,13 +66,13 @@ class wslib {
                $wsid = intval($wsid);
                $cmd = array();
 
-               if ($wsid>=-1 && $wsid!==0)     {
+               if ($wsid>=-1 && $wsid!==0) {
 
                                // Define stage to select:
                        $stage = -99;
-                       if ($wsid>0)    {
+                       if ($wsid>0) {
                                $workspaceRec = t3lib_BEfunc::getRecord('sys_workspace', $wsid);
-                               if ($workspaceRec['publish_access']&1)  {
+                               if ($workspaceRec['publish_access']&1) {
                                        $stage = 10;
                                }
                        }
@@ -167,7 +167,7 @@ class wslib {
         *
         * @return      void
         */
-       function autoPublishWorkspaces()        {
+       function autoPublishWorkspaces() {
                        // Temporarily set admin rights
                        // FIXME: once workspaces are cleaned up a better solution should be implemented
                $currentAdminStatus = $GLOBALS['BE_USER']->user['admin'];
index e1ed1cb..76284f6 100755 (executable)
@@ -127,7 +127,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
         *
         * @return      void
         */
-       function menuConfig()   {
+       function menuConfig() {
                        // fetches the configuration of the version extension
                $versionExtconf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['version']);
                        // show draft workspace only if enabled in the version extensions config
@@ -168,7 +168,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                if ($GLOBALS['BE_USER']->workspace===0) {       // Spend time on this only in online workspace because it might take time:
                        $workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title,adminusers,members,reviewers', 'sys_workspace', 'pid = 0' . t3lib_BEfunc::deleteClause('sys_workspace'), '', 'title');
                        foreach($workspaces as $rec) {
-                               if ($GLOBALS['BE_USER']->checkWorkspace($rec))  {
+                               if ($GLOBALS['BE_USER']->checkWorkspace($rec)) {
                                        $this->MOD_MENU['display'][$rec['uid']] = '[' . $rec['uid'] . '] ' . htmlspecialchars($rec['title']);
                                }
                        }
@@ -181,11 +181,11 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
        /**
         * Executes action for selected elements, if any is sent:
         */
-       function execute()      {
+       function execute() {
                $post = t3lib_div::_POST();
 
-               if ($post['_with_selected_do']) {
-                       if (is_array($post['items']) && count($post['items']))  {
+               if ($post['_with_selected_do']) {
+                       if (is_array($post['items']) && count($post['items'])) {
                                $cmdArray = array();
 
                                foreach ($post['items'] as $item => $v) {
@@ -247,7 +247,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
         *
         * @return      void
         */
-       function init() {
+       function init() {
 
                        // Setting module configuration:
                $this->MCONF = $GLOBALS['MCONF'];
@@ -268,8 +268,8 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                                elementId = "wl_" + rowNumber;
                                element = document.getElementById(elementId);
                                image = document.getElementById("spanw1_" + rowNumber);
-                               if (element.style)      {
-                                       if (element.style.display == "none")    {
+                               if (element.style) {
+                                       if (element.style.display == "none") {
                                                element.style.display = "table-row";
                                                image.className = "t3-icon t3-icon-actions t3-icon-actions-view t3-icon-view-table-collapse";
                                        } else {
@@ -296,7 +296,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
         *
         * @return      void
         */
-       function main() {
+       function main() {
                // See if we need to switch workspace
                $changeWorkspace = t3lib_div::_GET('changeWorkspace');
                if ($changeWorkspace != '') {
@@ -351,7 +351,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
         *
         * @return      void
         */
-       function printContent() {
+       function printContent() {
                echo $this->content;
        }
 
@@ -360,7 +360,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
         *
         * @return      array   all available buttons as an assoc. array
         */
-       protected function getButtons() {
+       protected function getButtons() {
                $buttons = array(
                        'new_record' => '',
                );
@@ -368,7 +368,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                $newWkspUrl = 'workspaceforms.php?action=new';
 
                        // workspace creation link
-               if ($GLOBALS['BE_USER']->isAdmin() || 0 != ($GLOBALS['BE_USER']->groupData['workspace_perms'] & 4))     {
+               if ($GLOBALS['BE_USER']->isAdmin() || 0 != ($GLOBALS['BE_USER']->groupData['workspace_perms'] & 4)) {
                        $buttons['new_record'] = '<a href="' . $newWkspUrl . '">' .
                                                '<img ' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/add_workspaces.gif') . ' alt="' . $GLOBALS['LANG']->getLL('img_title_create_new_workspace') . '" id="ver-wl-new-workspace-icon" />' .
                                                '</a>';
@@ -397,19 +397,19 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
         *
         * @return      string          HTML content
         */
-       function moduleContent_publish()        {
+       function moduleContent_publish() {
                        // Initialize:
                $content = '';
                $details = t3lib_div::_GP('details');
 
                        // Create additional menus:
                $menu = '';
-               if ($GLOBALS['BE_USER']->workspace===0) {
+               if ($GLOBALS['BE_USER']->workspace===0) {
                        $menu.= t3lib_BEfunc::getFuncMenu(0, 'SET[filter]', $this->MOD_SETTINGS['filter'], $this->MOD_MENU['filter']);
                        $menu.= t3lib_BEfunc::getFuncMenu(0, 'SET[display]', $this->MOD_SETTINGS['display'], $this->MOD_MENU['display']);
                }
                $menu.= t3lib_BEfunc::getFuncMenu(0, 'SET[diff]', $this->MOD_SETTINGS['diff'], $this->MOD_MENU['diff']);
-               if ($GLOBALS['BE_USER']->workspace!==0) {
+               if ($GLOBALS['BE_USER']->workspace!==0) {
                        $menu .= t3lib_BEfunc::getFuncCheck(0, 'SET[expandSubElements]', $this->MOD_SETTINGS['expandSubElements'], '', '', 'id="checkExpandSubElements"') . ' <label for="checkExpandSubElements">' . $GLOBALS['LANG']->getLL('label_showsubelements') . '</label> ';
                }
 
@@ -438,11 +438,11 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
 
                        // Buttons for publish / swap:
                $actionLinks = '';
-               if ($GLOBALS['BE_USER']->workspace!==0) {
-                       if ($this->publishAccess)       {
+               if ($GLOBALS['BE_USER']->workspace!==0) {
+                       if ($this->publishAccess) {
                                $confirmation = $GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->getLL(($GLOBALS['BE_USER']->workspaceRec['publish_access'] & 1) ? 'submit_publish_workspace_confirmation_1' : 'submit_publish_workspace_confirmation_2'));
                                $actionLinks.= '<input type="submit" name="_publish" value="' . $GLOBALS['LANG']->getLL('submit_publish_workspace') . '" onclick="if (confirm(' . $confirmation . ')) window.location.href=\'publish.php?swap=0\';return false"/>';
-                               if ($GLOBALS['BE_USER']->workspaceSwapAccess()) {
+                               if ($GLOBALS['BE_USER']->workspaceSwapAccess()) {
                                        $confirmation = $GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->getLL(($GLOBALS['BE_USER']->workspaceRec['publish_access'] & 1) ? 'submit_swap_workspace_confirmation_1' :  'submit_swap_workspace_confirmation_2'));
                                        $actionLinks.= '<input type="submit" name="_swap" value="' . $GLOBALS['LANG']->getLL('submit_swap_workspace') . '" onclick="if (confirm(' . $confirmation . ')) window.location.href=\'publish.php?swap=1\';return false ;" />';
                                }
@@ -451,7 +451,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                        }
 
                                // Preview of workspace link
-                       if (t3lib_div::_POST('_previewLink'))   {
+                       if (t3lib_div::_POST('_previewLink')) {
                                $ttlHours = intval($GLOBALS['BE_USER']->getTSConfigVal('options.workspaces.previewLinkTTLHours'));
                                $ttlHours = ($ttlHours ? $ttlHours : 24*2);
                                $previewUrl = t3lib_BEfunc::getViewDomain($this->id) . '/index.php?ADMCMD_prev=' . t3lib_BEfunc::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'], 60*60*$ttlHours, $GLOBALS['BE_USER']->workspace) . '&id=' . intval($GLOBALS['BE_USER']->workspaceRec['db_mountpoints']);
@@ -487,8 +487,8 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                ';
 
                        // Add publishing and review overview:
-               if ($GLOBALS['BE_USER']->workspace!=-99)        {
-                       if ($details)   {
+               if ($GLOBALS['BE_USER']->workspace!=-99) {
+                       if ($details) {
                                $content.= $this->displayVersionDetails($details);
                        } else {
                                $content.= $this->displayWorkspaceOverview();
@@ -506,7 +506,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
         * @param       string          Version identification, made of table and uid
         * @return      string          HTML string
         */
-       function displayVersionDetails($details)        {
+       function displayVersionDetails($details) {
                return 'TODO: Show details for version "'.$details.'"<hr/><a href="index.php">BACK</a>';
        }
 
@@ -515,10 +515,10 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
         *
         * @return      string          HTML (table)
         */
-       function displayWorkspaceOverview()     {
+       function displayWorkspaceOverview() {
 
                        // Initialize Workspace ID and filter-value:
-               if ($GLOBALS['BE_USER']->workspace===0) {
+               if ($GLOBALS['BE_USER']->workspace===0) {
                        $wsid = $this->MOD_SETTINGS['display'];         // Set wsid to the value from the menu (displaying content of other workspaces)
                        $filter = $this->MOD_SETTINGS['filter'];
                } else {
@@ -557,7 +557,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
         *
         * @return      string          HTML
         */
-       function moduleContent_workspaceList()  {
+       function moduleContent_workspaceList() {
                // Original Kasper's TODO: Workspace listing
                //
                //      - LISTING: Shows list of available workspaces for user. Used can see title, description, publication time, freeze-state, db-mount, member users/groups etc. Current workspace is indicated.
@@ -572,14 +572,14 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
         *
         * @return      string          Generated HTML code
         */
-       function workspaceList_displayUserWorkspaceList()       {
+       function workspaceList_displayUserWorkspaceList() {
                        // table header
                $content = $this->workspaceList_displayUserWorkspaceListHeader();
 
                        // get & walk workspace list generating content
                $wkspList = $this->workspaceList_getUserWorkspaceList();
                $rowNum = 1;
-               foreach ($wkspList as $wksp)    {
+               foreach ($wkspList as $wksp) {
                        $currentWksp = ($GLOBALS['BE_USER']->workspace == $wksp['uid']);
 
                        // Each workspace data occupies two rows:
@@ -640,7 +640,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
         *
         * @return      array           A list of workspaces available to the current BE user
         */
-       function workspaceList_getUserWorkspaceList()   {
+       function workspaceList_getUserWorkspaceList() {
 
                        // Get list of all workspaces. Note: system workspaces will be always displayed before custom ones!
                $workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_workspace', 'pid=0' . t3lib_BEfunc::deleteClause('sys_workspace'), '', 'title');
@@ -663,7 +663,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                        // Custom
                foreach ($workspaces as $rec) {
                                // see if user can access this workspace in any way
-                       if (FALSE !== ($result = $GLOBALS['BE_USER']->checkWorkspace($rec)))    {
+                       if (FALSE !== ($result = $GLOBALS['BE_USER']->checkWorkspace($rec))) {
                                $availableWorkspaces[] = $result;       // `$result` contains `$rec` plus access type through '_ACCESS' key
                        }
                }
@@ -679,7 +679,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
         * @param       array           Workspace information
         * @return      string          Formatted workspace information
         */
-       function workspaceList_formatWorkspaceData(&$wksp)      {
+       function workspaceList_formatWorkspaceData(&$wksp) {
                $content = '<table cellspacing="0" cellpadding="0" width="100%" class="ver-wl-details-table">' .
                                '<tr><td class="ver-wl-details-label"><strong>' . $GLOBALS['LANG']->getLL('workspace_list_label_file_mountpoints') . '</strong></td>' .
                                '<td class="ver-wl-details">' . $this->workspaceList_getFileMountPoints($wksp) . '</td></tr>' .
@@ -719,7 +719,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
         * @param       array           &$wksp  Workspace record
         * @return      string          Generated HTML
         */
-       function workspaceList_getWebMountPoints(&$wksp)        {
+       function workspaceList_getWebMountPoints(&$wksp) {
                if ($wksp['uid'] == -1) {
                                // draft workspace
                        return $GLOBALS['LANG']->getLL('workspace_list_db_mount_point_draft');
@@ -773,7 +773,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
         * @param       array           &$wksp  Workspace record
         * @return      string          Generated HTML
         */
-       function workspaceList_getFileMountPoints(&$wksp)       {
+       function workspaceList_getFileMountPoints(&$wksp) {
                if ($wksp['uid'] == -1) {
                                // draft workspace - none!
                        return $GLOBALS['LANG']->getLL('workspace_list_file_mount_point_draft');
@@ -826,7 +826,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
         *
         * @return      string          Generated content
         */
-       function workspaceList_displayUserWorkspaceListHeader() {
+       function workspaceList_displayUserWorkspaceListHeader() {
                // TODO CSH lables?
                return '<table border="0" cellpadding="0" cellspacing="0" class="workspace-overview">
                        <tr class="t3-row-header">
@@ -851,7 +851,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                        $content = $this->workspaceList_getUserListWithAccess($wksp['adminusers'], $GLOBALS['LANG']->getLL('workspace_list_label_owners')); // owners
                        $content .= $this->workspaceList_getUserListWithAccess($wksp['members'], $GLOBALS['LANG']->getLL('workspace_list_label_members')); // members
                        $content .= $this->workspaceList_getUserListWithAccess($wksp['reviewers'], $GLOBALS['LANG']->getLL('workspace_list_label_reviewers')); // reviewers
-                       if ($content != '')     {
+                       if ($content != '') {
                                $content = '<table cellpadding="0" cellspacing="1" width="100%" class="lrPadding workspace-overview">' . $content . '</table>';
                        } else {
                                $content = $GLOBALS['LANG']->getLL($wksp['uid'] > 0 ? 'workspace_list_access_admins_only' : 'workspace_list_access_anyone');
@@ -897,15 +897,15 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
         * @param       string          Access string
         * @return      string          Generated content
         */
-       function workspaceList_getUserListWithAccess(&$list, $access)   {
+       function workspaceList_getUserListWithAccess(&$list, $access) {
                $content_array = array();
-               if ($list != '')        {
+               if ($list != '') {
                        $userIDs = explode(',', $list);
 
                                // get user names and sort
                        $regExp = '/^(be_[^_]+)_(\d+)$/';
                        $groups = FALSE;
-                       foreach ($userIDs as $userUID)  {
+                       foreach ($userIDs as $userUID) {
                                $id = $userUID;
 
                                if (preg_match($regExp, $userUID)) {
@@ -970,10 +970,10 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
         * @param       array           Workspace record
         * @return      string          Generated content
         */
-       function workspaceList_displayIcons($currentWorkspace, &$wksp)  {
+       function workspaceList_displayIcons($currentWorkspace, &$wksp) {
                $content = '';
                        // `edit workspace` button
-               if ($this->workspaceList_hasEditAccess($wksp))  {
+               if ($this->workspaceList_hasEditAccess($wksp)) {
                                // User can modify workspace parameters, display corresponding link and icon
                        $editUrl = 'workspaceforms.php?action=edit&amp;wkspId=' . $wksp['uid'];
 
@@ -988,7 +988,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                                        ' border="0" alt="" hspace="1" align="middle" />';
                }
                        // `switch workspace` button
-               if (!$currentWorkspace) {
+               if (!$currentWorkspace) {
                                // Workspace switching button
                        $content .= '<a href="' .
                                        t3lib_div::getIndpEnv('SCRIPT_NAME') .
@@ -1016,7 +1016,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
         * @param       array           Workspace record
         * @return      boolean         <code>TRUE</code> if user can modify workspace parameters
         */
-       function workspaceList_hasEditAccess(&$wksp)    {
+       function workspaceList_hasEditAccess(&$wksp) {
                $access = &$wksp['_ACCESS'];
                return ($wksp['uid'] > 0 && ($access == 'admin' || $access == 'owner'));
        }
@@ -1028,7 +1028,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
         * @param       integer         System workspace ID. Currently <code>0</code> and <code>-1</code> are accepted.
         * @return      array           Generated record (see <code>sys_workspaces</code> for structure)
         */
-       function workspaceList_createFakeWorkspaceRecord($uid)  {
+       function workspaceList_createFakeWorkspaceRecord($uid) {
                $record = array(
                        'uid' => $uid,
                        'pid' => 0,                             // always 0!