Update setup upgrade

This commit is contained in:
Romain Neutron
2012-09-21 14:43:48 +02:00
parent a757adbdbe
commit 200b8c3576

View File

@@ -9,6 +9,8 @@
* file that was distributed with this source code.
*/
use Alchemy\Phrasea\Application;
/**
* UpgradeManager for Phraseanet.
* Datas are written in a lock file.
@@ -55,7 +57,7 @@ class Setup_Upgrade
* @param appbox $appbox
* @return Setup_Upgrade
*/
public function __construct(appbox &$appbox, $force = false)
public function __construct(Application $app, $force = false)
{
if ($force) {
self::remove_lock_file();
@@ -65,9 +67,9 @@ class Setup_Upgrade
throw new Exception_Setup_UpgradeAlreadyStarted('The upgrade is already started');
}
$this->appbox = $appbox;
$this->appbox = $app['phraseanet.appbox'];
if (count(User_Adapter::get_wrong_email_users($appbox)) > 0) {
if (count(User_Adapter::get_wrong_email_users($app)) > 0) {
throw new Exception_Setup_FixBadEmailAddresses('Please fix the database before starting');
}