Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 6e5f86b

Browse files
committed
ENH: refs #252. Trailing whitespace stylecheck tests
1 parent 8562450 commit 6e5f86b

File tree

147 files changed

+2841
-2766
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+2841
-2766
lines changed

core/AppController.php

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ public function preDispatch()
2525
{
2626
parent::preDispatch();
2727
$this->view->setEncoding('iso-8859-1');
28-
29-
$this->view->setScriptPath(BASE_PATH."/core/views");
30-
28+
29+
$this->view->setScriptPath(BASE_PATH."/core/views");
30+
3131
$fc = Zend_Controller_Front::getInstance();
3232
$module = $fc->getRequest()->getModuleName();
3333
if($module == 'default')
@@ -38,34 +38,34 @@ public function preDispatch()
3838
$this->view->webroot = $fc->getBaseUrl();
3939
$this->coreWebroot = $this->view->webroot.'/core';
4040
$this->view->coreWebroot = $this->coreWebroot;
41-
41+
4242
$this->view->demoMode = $this->isDemoMode();
4343

4444
$this->view->title = Zend_Registry::get('configGlobal')->application->name;
4545
$this->view->metaDescription = Zend_Registry::get('configGlobal')->application->description;
4646
$this->view->metaKeywords = Zend_Registry::get('configGlobal')->application->keywords;
4747

4848
// init notifier
49-
Zend_Registry::set('notifier', new MIDAS_Notifier());
50-
49+
Zend_Registry::set('notifier', new MIDAS_Notifier());
50+
5151
// Set the version
5252
$this->view->version = '3.0.0';
5353
if(isset(Zend_Registry::get('configDatabase')->version))
5454
{
5555
$this->view->version = Zend_Registry::get('configDatabase')->version;
5656
}
57-
57+
5858
require_once BASE_PATH . '/core/models/dao/UserDao.php';
5959
require_once BASE_PATH . '/core/models/dao/ItemDao.php';
6060
//Init Session
6161
if($fc->getRequest()->getActionName() != 'login' || $fc->getRequest()->getControllerName() != 'user')
6262
{
63-
if(isset($_POST['sid']))
64-
{
65-
Zend_Session::setId($_POST['sid']);
63+
if(isset($_POST['sid']))
64+
{
65+
Zend_Session::setId($_POST['sid']);
6666
}
67-
Zend_Session::start();
68-
67+
Zend_Session::start();
68+
6969
// log in when testing
7070
$testingUserId = $this->_getParam('testingUserId');
7171
$modelLoad = new MIDAS_ModelLoader();
@@ -77,15 +77,15 @@ public function preDispatch()
7777
if($user->Dao == false)
7878
{
7979
throw new Zend_Exception('Unable to find user');
80-
}
80+
}
8181
}
8282
else
8383
{
8484
$user = new Zend_Session_Namespace('Auth_User');
8585
}
86-
86+
8787
if($user->Dao == null)
88-
{
88+
{
8989
$userModel = $modelLoad->loadModel('User');
9090
$cookieData = $this->getRequest()->getCookie('midasUtil');
9191
if(!empty($cookieData))
@@ -101,7 +101,7 @@ public function preDispatch()
101101
}
102102
}
103103
}
104-
104+
105105
$controllerName = $fc->getRequest()->getControllerName();
106106
$actionName = $fc->getRequest()->getActionName();
107107
if($fc->getRequest()->getControllerName() == 'browse' || $fc->getRequest()->getControllerName() == 'download')
@@ -120,11 +120,11 @@ public function preDispatch()
120120
if($user->Dao != null && $user->Dao instanceof UserDao)
121121
{
122122
if($fc->getRequest()->getControllerName() != 'install' && $fc->getRequest()->getControllerName() != 'error' && $user->Dao->isAdmin())
123-
{
123+
{
124124
if($this->isUpgradeNeeded())
125125
{
126126
$this->view->needUpgrade = true;
127-
}
127+
}
128128
$errorlogModel = $modelLoad->loadModel('Errorlog');
129129
$logs = $errorlogModel->getLog(date('c', strtotime("-24 hour")), date('c'), 'all', 'all');
130130
foreach($logs as $key => $l)
@@ -140,19 +140,19 @@ public function preDispatch()
140140
}
141141
}
142142

143-
143+
144144
if(!empty($user->uploaded))
145145
{
146146
$this->view->showUploadedLink = true;
147147
}
148148
$this->logged = true;
149149
$this->view->logged = true;
150-
150+
151151
$this->view->userDao = $user->Dao;
152152
$cookieData = $this->getRequest()->getCookie('recentItems'.$this->userSession->Dao->user_id);
153153
$this->view->recentItems = array();
154154
if(isset($cookieData) && file_exists(BASE_PATH.'/core/configs/database.local.ini')) //check if midas installed
155-
{
155+
{
156156
$modelLoad = new MIDAS_ModelLoader();
157157
$itemModel = $modelLoad->loadModel('Item');
158158
$tmpRecentItems = unserialize($cookieData);
@@ -172,9 +172,9 @@ public function preDispatch()
172172
}
173173
}
174174

175-
$this->view->recentItems = $recentItems;
175+
$this->view->recentItems = $recentItems;
176176
$check = $this->_getParam('checkRecentItem');
177-
}
177+
}
178178
$user->Dao->lastAction = date('c');
179179
}
180180
else
@@ -189,7 +189,7 @@ public function preDispatch()
189189
$this->view->logged = false;
190190
$this->logged = false;
191191
}
192-
192+
193193
if(isset($user))
194194
{
195195
Zend_Registry::set('userSession', $user);
@@ -198,7 +198,7 @@ public function preDispatch()
198198
{
199199
Zend_Registry::set('userSession', null);
200200
}
201-
201+
202202
$this->view->lang = Zend_Registry::get('configGlobal')->application->lang;
203203
//create a global javascript json array
204204
$jsonGlobal = array(
@@ -210,12 +210,12 @@ public function preDispatch()
210210
"lang" => Zend_Registry::get('configGlobal')->application->lang,
211211
"Yes" => $this->t('Yes'),
212212
"No" => $this->t('No'));
213-
214-
213+
214+
215215
$login = array(
216216
"titleUploadLogin" => $this->t('Please log in'),
217217
"contentUploadLogin" => $this->t('You need to be logged in to be able to upload files.'));
218-
218+
219219
$browse = array(
220220
'view' => $this->t('View'),
221221
'uploadIn' => $this->t('Upload here'),
@@ -238,10 +238,10 @@ public function preDispatch()
238238
'copy' => $this->t('Copy'),
239239
'element' => $this->t('element'),
240240
'community' => array(
241-
241+
242242
'invit' => $this->t('Invite collaborators'),
243243
'advanced' => $this->t('Advanced properties')));
244-
244+
245245
$feed = array(
246246
"deleteFeed" => $this->t('Do you really want to delete the feed'));
247247

@@ -276,13 +276,13 @@ public function isTestingEnv()
276276
{
277277
return Zend_Registry::get('configGlobal')->environment == 'testing';
278278
}
279-
279+
280280
/** check if demo mode is set */
281281
public function isDemoMode()
282282
{
283283
return Zend_Registry::get('configGlobal')->demomode == 1;
284284
}
285-
285+
286286
/** disable layout */
287287
public function disableLayout()
288288
{
@@ -296,15 +296,15 @@ public function disableView()
296296
{
297297
$this->_helper->viewRenderer->setNoRender();
298298
}
299-
299+
300300
/** check if midas needs to be upgraded */
301301
public function isUpgradeNeeded()
302302
{
303303
require_once BASE_PATH.'/core/controllers/components/UpgradeComponent.php';
304304
$upgradeComponent = new UpgradeComponent();
305305
$db = Zend_Registry::get('dbAdapter');
306306
$dbtype = Zend_Registry::get('configDatabase')->database->adapter;
307-
307+
308308
$upgradeComponent->initUpgrade('core', $db, $dbtype);
309309
if($upgradeComponent->getNewestVersion() != $upgradeComponent->transformVersionToNumeric(Zend_Registry::get('configDatabase')->version))
310310
{
@@ -319,7 +319,7 @@ public function isUpgradeNeeded()
319319
{
320320
return true;
321321
}
322-
}
322+
}
323323
return false;
324324
}
325325

@@ -430,6 +430,6 @@ protected function t($text)
430430
* @var UserModelBase
431431
*/
432432
var $User;
433-
433+
434434
/**end completion eclipse */
435435
}//end class

0 commit comments

Comments
 (0)