Permalink
Browse files

Update upgrade files

  • Loading branch information...
1 parent 1e98628 commit 9dc0f2b5fd5a8f71088cf45bd0df19826c59d3d5 @cdujeu cdujeu committed Sep 15, 2016
Showing with 42 additions and 15 deletions.
  1. +9 −1 dist/php/6.5.1-extractArchive-post.php
  2. +27 −5 dist/php/6.5.1.php
  3. +6 −9 dist/php/6.5.1.sql
@@ -89,4 +89,12 @@ function checkThemeUsed($themeName){
echo "Checking usage of remove theme ($themeName): OK";
}
-}
+}
+
+checkPhpVersion('5.6.0');
+checkPluginUsed("conf", "serial");
+checkPluginUsed("auth", "serial");
+checkPluginUsed("auth", "cmsms");
+checkPluginUsed("access", "remote_fs");
+checkThemeUsed("vision");
+checkThemeUsed("umbra");
View
@@ -23,8 +23,10 @@ function updateSharePhpContent($installPath, $publicFolder){
$sharePhpPath = $installPath."/".trim($publicFolder, "/")."/"."share.php";
if(!is_file($sharePhpPath)){
- echo "No share.php file was found in public folder. If it does exist, you may have to manually upgrade its content.";
+ echo "No share.php file was found in public folder. If it does exist, you may have to manually upgrade its content.\n";
+ return;
}
+ echo "Upgrading content of share.php file\n";
$folders = array_map(function($value){
return "..";
}, explode("/", trim($publicFolder, "/")));
@@ -45,8 +47,10 @@ function updateSharePhpContent($installPath, $publicFolder){
function updateHtAccessContent($htAccessPath){
if(!is_file($htAccessPath)){
- echo "No htaccess file found. Skipping Htaccess update.";
+ echo "No htaccess file found. Skipping Htaccess update.\n";
+ return;
}
+ echo "Upgrading content of Htaccess file\n";
$lines = file($htAccessPath);
$startRemoving = false;
// Remove unnecessary lines
@@ -71,10 +75,28 @@ function updateHtAccessContent($htAccessPath){
function awsSdkVersion(){
- $s3Options = \Pydio\Core\Services\ConfService::getConfStorageImpl()->loadPluginConfig("access", "s3");
+ $s3Options = ConfService::getConfStorageImpl()->loadPluginConfig("access", "s3");
if($s3Options["SDK_VERSION"] === "v2"){
$s3Options["SDK_VERSION"] = "v3";
- \Pydio\Core\Services\ConfService::getConfStorageImpl()->savePluginConfig("access.s3", $s3Options);
+ ConfService::getConfStorageImpl()->savePluginConfig("access.s3", $s3Options);
}
-}
+}
+
+function forceRenameConfFile($prefix){
+
+ // FORCE bootstrap_repositories copy
+ if (is_file(AJXP_INSTALL_PATH."/conf/$prefix.php".".new-".date("Ymd"))) {
+ rename(AJXP_INSTALL_PATH."/conf/$prefix.php", AJXP_INSTALL_PATH."/conf/$prefix.php.pre-update");
+ rename(AJXP_INSTALL_PATH."/conf/$prefix.php".".new-".date("Ymd"), AJXP_INSTALL_PATH."/conf/$prefix.php");
+ }
+
+
+}
+
+awsSdkVersion();
+updateHtAccessContent(AJXP_INSTALL_PATH."/.htaccess");
+updateSharePhpContent(AJXP_INSTALL_PATH, ConfService::getCoreConf("PUBLIC_DOWNLOAD_FOLDER"));
+forceRenameConfFile("bootstrap_conf");
+forceRenameConfFile("bootstrap_context");
+forceRenameConfFile("extensions.conf");
View
@@ -1,16 +1,13 @@
-
-
-
-ALTER TABLE `ajxp_log` CHANGE `dirname` `dirname` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
-CHANGE `basename` `basename` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ;
-
+ALTER TABLE `ajxp_log` CHANGE `dirname` `dirname` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL , CHANGE `basename` `basename` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ;
+/* SEPARATOR */
ALTER TABLE `ajxp_log` DROP INDEX `basename`;
+/* SEPARATOR */
ALTER TABLE `ajxp_log` DROP INDEX `dirname`;
-
+/* SEPARATOR */
ALTER TABLE `ajxp_log` ADD INDEX ( `user` ) ;
+/* SEPARATOR */
ALTER TABLE `ajxp_log` ADD INDEX ( `dirname`, `basename` ) ;
-
-
+/* SEPARATOR */
CREATE TABLE IF NOT EXISTS `ajxp_tasks` (
`uid` varchar(255) NOT NULL,
`type` int(11) NOT NULL,

0 comments on commit 9dc0f2b

Please sign in to comment.