Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
New action test_upgrade_scripts to ease production
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Sep 16, 2014
1 parent d673d58 commit a75f9a4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/src/plugins/action.updater/class.AjaXplorerUpgrader.php
Expand Up @@ -132,6 +132,11 @@ public function execute()
$this->step ++;
}

public function testUpgradeScripts(){
echo '<br>'.$this->upgradeDB();
echo '<br>'.$this->specificTask();
}

public function checkDownloadFolder()
{
if (!is_dir($this->workingFolder)) {
Expand Down
12 changes: 12 additions & 0 deletions core/src/plugins/action.updater/class.UpdateController.php
Expand Up @@ -99,6 +99,18 @@ public function switchAction($action, $httpVars, $fileVars)

break;

case "test_upgrade_scripts":

if(!AJXP_SERVER_DEBUG
|| AuthService::getLoggedUser() == null
|| !AuthService::getLoggedUser()->isAdmin()){
break;
}
$upgrader = new AjaXplorerUpgrader("", "", "");
$upgrader->testUpgradeScripts();

break;

case "perform_upgrade" :

AJXP_Utils::safeIniSet("output_buffering", "Off");
Expand Down
5 changes: 5 additions & 0 deletions core/src/plugins/action.updater/manifest.xml
Expand Up @@ -184,6 +184,11 @@
<serverCallback methodName="switchAction"/>
</processing>
</action>
<action name="test_upgrade_scripts">
<processing>
<serverCallback methodName="switchAction"/>
</processing>
</action>
</actions>
</registry_contributions>
<class_definition filename="plugins/action.updater/class.UpdateController.php" classname="UpdateController"/>
Expand Down

0 comments on commit a75f9a4

Please sign in to comment.