summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Karlitschek <karlitschek@kde.org>2011-04-16 19:43:26 +0200
committerFrank Karlitschek <karlitschek@kde.org>2011-04-16 19:43:26 +0200
commit219c4a2c7856e5f065582dbe75587b1b724c01c2 (patch)
treed9f4500b485fcfa5fe871167633dc75f38708f81
parent85df69974633b4012d42bd66930d1320ff51b62e (diff)
parentc5f9c5b8a3bf6b1e28644af6f8ae408dbdb16594 (diff)
downloadnextcloud-server-219c4a2c7856e5f065582dbe75587b1b724c01c2.tar.gz
nextcloud-server-219c4a2c7856e5f065582dbe75587b1b724c01c2.zip
Merge branch 'refactoring' of git.kde.org:owncloud into refactoring
-rw-r--r--index.php4
-rw-r--r--lib/base.php1
-rw-r--r--lib/plugin.php12
3 files changed, 9 insertions, 8 deletions
diff --git a/index.php b/index.php
index 105a04ad76e..b1172382ec6 100644
--- a/index.php
+++ b/index.php
@@ -36,12 +36,12 @@ if(count($errors)>0){
exit();
}
else{
- header( "Location: ".OC_APPCONFIG::getValue( "core", "defaultpage", "files/index.php" ));
+ header( "Location: ".$WEBROOT.'/'.OC_APPCONFIG::getValue( "core", "defaultpage", "files/index.php" ));
exit();
}
}else{
if( OC_USER::login( $_POST["user"], $_POST["password"] )){
- header( "Location: ".OC_APPCONFIG::getValue( "core", "defaultpage", "files/index.php" ));
+ header( "Location: ".$WEBROOT.'/'.OC_APPCONFIG::getValue( "core", "defaultpage", "files/index.php" ));
exit();
}
else{
diff --git a/lib/base.php b/lib/base.php
index 9ecf7db0778..93d6fb66c7e 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -77,6 +77,7 @@ if( OC_CONFIG::getValue( "forcessl", false )){
require_once('helper.php');
require_once('database.php');
require_once('app.php');
+require_once('appconfig.php');
require_once('files.php');
require_once('filesystem.php');
require_once('filestorage.php');
diff --git a/lib/plugin.php b/lib/plugin.php
index 0d4e9744dc3..d8291a8a758 100644
--- a/lib/plugin.php
+++ b/lib/plugin.php
@@ -52,7 +52,8 @@ class OC_PLUGIN{
//check for uninstalled db's
if(isset($data['install']) and isset($data['install']['database'])){
foreach($data['install']['database'] as $db){
- if(!$data['install']['database_installed'][$db]){
+ $installed=OC_APPCONFIG::getValue('plugin_installer','database_installed_'.$id.'_'.$db,'false');
+ if($installed!='true'){
self::installDB($id);
break;
}
@@ -339,13 +340,13 @@ class OC_PLUGIN{
global $SERVERROOT;
$data=OC_PLUGIN::getPluginData($id);
foreach($data['install']['database'] as $db){
- if (!$data['install']['database_installed'][$db]){
+ $installed=OC_APPCONFIG::getValue('plugin_installer','database_installed_'.$id.'_'.$db,'false');
+ if ($installed!='true'){
$file=$SERVERROOT.'/plugins/'.$id.'/'.$db;
OC_DB::createDbFromStructure($file);
- $data['install']['database_installed'][$db]=true;
+ OC_APPCONFIG::setValue('plugin_installer','database_installed_'.$id.'_'.$db,'true');
}
}
- self::savePluginData($id,$data);
return true;
}
@@ -363,14 +364,13 @@ class OC_PLUGIN{
if(isset($pluginData['install'])){
foreach($pluginData['install']['database'] as $db){
OC_DB::createDbFromStructure($folder.'/'.$db);
- $pluginData['install']['database_installed'][$db]=true;
+ OC_APPCONFIG::setValue('plugin_installer','database_installed_'.$id.'_'.$db,'true');
}
foreach($pluginData['install']['include'] as $include){
include($folder.'/'.$include);
}
}
recursive_copy($folder,$SERVERROOT.'/plugins/'.$pluginData['info']['id']);
- self::savePluginData($SERVERROOT.'/plugins/'.$pluginData['info']['id'].'/plugin.xml',$pluginData);
}
}
delTree($folder);