* fix for upgrade.
This commit is contained in:
@@ -90,6 +90,7 @@ class upgrade extends control
|
||||
$this->loadModel('extension');
|
||||
$extensions = $this->extension->getLocalExtensions('installed');
|
||||
|
||||
$versions = array();
|
||||
foreach($extensions as $code => $extension) $versions[$code] = $extension->version;
|
||||
|
||||
$incompatibleExts = $this->extension->checkIncompatible($versions);
|
||||
|
||||
@@ -767,9 +767,11 @@ class upgradeModel extends model
|
||||
*/
|
||||
public function mergeProjectGoalAndDesc()
|
||||
{
|
||||
$projects = $this->dao->select('id, goal, `desc`')->from(TABLE_PROJECT)->fetchAll('id');
|
||||
$projects = $this->dao->select('*')->from(TABLE_PROJECT)->fetchAll('id');
|
||||
foreach($projects as $id => $project)
|
||||
{
|
||||
if(!isset($project->goal)) continue;
|
||||
|
||||
$this->dao->update(TABLE_PROJECT)
|
||||
->set('`desc`')->eq($project->desc . '<br />' . $project->goal)
|
||||
->where('id')->eq($id)
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ $app->setDebug();
|
||||
|
||||
/* Check the installed version is the latest or not. */
|
||||
$config->installedVersion = $common->loadModel('setting')->getVersion();
|
||||
if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) and version_compare($config->version, $config->installedVersion) <= 0) die(header('location: index.php'));
|
||||
if(empty($_SERVER['HTTP_X_REQUESTED_WITH']) and version_compare($config->version, $config->installedVersion) <= 0) die(header('location: index.php'));
|
||||
|
||||
/* Run it. */
|
||||
$app->parseRequest();
|
||||
|
||||
Reference in New Issue
Block a user