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

Commit 65866f7

Browse files
author
Charles Marion
committed
STYLE: Fixed BrowseController.php and AssetstoreController.php
1 parent d9d4c4b commit 65866f7

File tree

11 files changed

+411
-404
lines changed

11 files changed

+411
-404
lines changed

core/AppController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function preDispatch()
7070
}
7171
$this->userSession = $user;
7272
$this->view->recentItems = array();
73-
if($user->Dao != null)
73+
if($user->Dao != null && $user->Dao instanceof UserDao)
7474
{
7575
if($fc->getRequest()->getControllerName() != 'install' && $fc->getRequest()->getControllerName() != 'error' && $user->Dao->isAdmin() && $this->isUpgradeNeeded())
7676
{

core/configs/database.local.mysql.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ database.params.port=3306
1919
database.params.username=root
2020
database.params.password=
2121
database.params.dbname=midas
22-
version=3.0.4
22+
version=3.0.7
2323

2424

2525
[testing]

core/controllers/AdminController.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ function indexAction()
9393
}
9494
break;
9595
case 'PDO_PGSQL':
96-
if(file_exists(BASE_PATH.'/modules/'.$key.'/database/pgsql/'.$allModules[$moduleName]->version.'.sql'))
97-
{
98-
$this->Component->Utility->run_pgsql_from_file(BASE_PATH.'/modules/'.$key.'/database/pgsql/'.$allModules[$moduleName]->version.'.sql',
96+
if(file_exists(BASE_PATH.'/modules/'.$key.'/database/pgsql/'.$allModules[$moduleName]->version.'.sql'))
97+
{
98+
$this->Component->Utility->run_pgsql_from_file(BASE_PATH.'/modules/'.$key.'/database/pgsql/'.$allModules[$moduleName]->version.'.sql',
9999
Zend_Registry::get('configDatabase')->database->params->host,
100100
Zend_Registry::get('configDatabase')->database->params->username,
101101
Zend_Registry::get('configDatabase')->database->params->password,
102102
Zend_Registry::get('configDatabase')->database->params->dbname,
103103
Zend_Registry::get('configDatabase')->database->params->port);
104-
}
104+
}
105105
break;
106106
default:
107107
break;
@@ -164,9 +164,9 @@ function showlogAction()
164164
throw new Zend_Exception("You should be an administrator");
165165
}
166166
if(!$this->getRequest()->isXmlHttpRequest())
167-
{
168-
throw new Zend_Exception("Why are you here ? Should be ajax.");
169-
}
167+
{
168+
throw new Zend_Exception("Why are you here ? Should be ajax.");
169+
}
170170
$this->_helper->layout->disableLayout();
171171

172172
$start = $this->_getParam("startlog");
@@ -244,9 +244,9 @@ function upgradeAction()
244244
throw new Zend_Exception("You should be an administrator");
245245
}
246246
if(!$this->getRequest()->isXmlHttpRequest())
247-
{
248-
throw new Zend_Exception("Why are you here ? Should be ajax.");
249-
}
247+
{
248+
throw new Zend_Exception("Why are you here ? Should be ajax.");
249+
}
250250
$this->_helper->layout->disableLayout();
251251

252252
$db = Zend_Registry::get('dbAdapter');

core/controllers/AssetstoreController.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
class AssetstoreController extends AppController
88
{
99

10-
public $_models=array('Assetstore');
11-
public $_daos=array('Assetstore');
12-
public $_components=array('Utility');
13-
public $_forms=array('Assetstore');
10+
public $_models = array('Assetstore');
11+
public $_daos = array('Assetstore');
12+
public $_components = array('Utility');
13+
public $_forms = array('Assetstore');
1414

1515
/**
1616
* @method init()
@@ -59,10 +59,10 @@ function addAction()
5959
'assetstore_id' => $assetstoreDao->getAssetstoreId(),
6060
'assetstore_name' => $assetstoreDao->getName(),
6161
'assetstore_type' => $assetstoreDao->getType(),
62-
'totalSpace'=>disk_total_space($assetstoreDao->getPath()),
63-
'totalSpaceText'=>$this->Component->Utility->formatSize(disk_total_space($assetstoreDao->getPath())),
64-
'freeSpace'=>disk_free_space($assetstoreDao->getPath()),
65-
'freeSpaceText'=>$this->Component->Utility->formatSize(disk_free_space($assetstoreDao->getPath())),
62+
'totalSpace' => disk_total_space($assetstoreDao->getPath()),
63+
'totalSpaceText' => $this->Component->Utility->formatSize(disk_total_space($assetstoreDao->getPath())),
64+
'freeSpace' => disk_free_space($assetstoreDao->getPath()),
65+
'freeSpaceText' => $this->Component->Utility->formatSize(disk_free_space($assetstoreDao->getPath())),
6666
));
6767
return true;
6868
}

0 commit comments

Comments
 (0)