summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-05-03 23:26:43 +0200
committerBart Visscher <bartv@thisnet.nl>2012-05-03 23:26:43 +0200
commit89c8316f8f07dea02351793f1edb4c85773a7331 (patch)
treeb67ccbcdaaa1310af5c13dafbc64481283c318a3
parent077ea94f713773fe2cdc0a07bf2d8bc0977b6942 (diff)
parent3d6909f3727f4083be9f92d77503e679452d4322 (diff)
downloadnextcloud-server-89c8316f8f07dea02351793f1edb4c85773a7331.tar.gz
nextcloud-server-89c8316f8f07dea02351793f1edb4c85773a7331.zip
Merge branch 'master' of git://gitorious.org/owncloud/owncloud
-rw-r--r--.gitignore1
-rwxr-xr-xapps/user_ldap/settings.php1
-rw-r--r--lib/app.php6
-rw-r--r--lib/filecache.php17
4 files changed, 16 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index 4bfd1a9e032..ac58f3e6a63 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
data
owncloud
config/config.php
+config/mount.php
apps/inc.php
# just sane ignores
diff --git a/apps/user_ldap/settings.php b/apps/user_ldap/settings.php
index 566f058e658..7512aa3c942 100755
--- a/apps/user_ldap/settings.php
+++ b/apps/user_ldap/settings.php
@@ -23,7 +23,6 @@
$params = array('ldap_host', 'ldap_port', 'ldap_dn', 'ldap_password', 'ldap_base', 'ldap_base_users', 'ldap_base_groups', 'ldap_userlist_filter', 'ldap_login_filter', 'ldap_display_name', 'ldap_tls', 'ldap_nocase'. 'ldap_quota_def', 'ldap_quota_attr', 'ldap_email_attr');
OCP\Util::addscript('user_ldap', 'settings');
-OCP\Util::addStyle('user_ldap', 'settings');
if ($_POST) {
foreach($params as $param){
diff --git a/lib/app.php b/lib/app.php
index 2917fd7a572..c8d3826bca5 100644
--- a/lib/app.php
+++ b/lib/app.php
@@ -125,11 +125,13 @@ class OC_App{
* get all enabled apps
*/
public static function getEnabledApps(){
- $apps=array();
+ $apps=array('files');
$query = OC_DB::prepare( 'SELECT appid FROM *PREFIX*appconfig WHERE configkey = \'enabled\' AND configvalue=\'yes\'' );
$result=$query->execute();
while($row=$result->fetchRow()){
- $apps[]=$row['appid'];
+ if(array_search($row['appid'],$apps)===false){
+ $apps[]=$row['appid'];
+ }
}
return $apps;
}
diff --git a/lib/filecache.php b/lib/filecache.php
index fce9785f745..091a7939e1a 100644
--- a/lib/filecache.php
+++ b/lib/filecache.php
@@ -110,8 +110,13 @@ class OC_FileCache{
$data['versioned']=false;
}
$mimePart=dirname($data['mimetype']);
+ $data['size']=(int)$data['size'];
+ $data['ctime']=(int)$data['mtime'];
+ $data['writable']=(int)$data['writable'];
+ $data['encrypted']=(int)$data['encrypted'];
+ $data['versioned']=(int)$data['versioned'];
$user=OC_User::getUser();
- $query=OC_DB::prepare('INSERT INTO *PREFIX*fscache(parent, name, path, path_hash, size, mtime, ctime, mimetype, mimepart,user,writable,encrypted,versioned) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)');
+ $query=OC_DB::prepare('INSERT INTO *PREFIX*fscache(parent, name, path, path_hash, size, mtime, ctime, mimetype, mimepart,`user`,writable,encrypted,versioned) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)');
$result=$query->execute(array($parent,basename($path),$path,md5($path),$data['size'],$data['mtime'],$data['ctime'],$data['mimetype'],$mimePart,$user,$data['writable'],$data['encrypted'],$data['versioned']));
if(OC_DB::isError($result)){
OC_Log::write('files','error while writing file('.$path.') to cache',OC_Log::ERROR);
@@ -208,9 +213,9 @@ class OC_FileCache{
}
$rootLen=strlen($root);
if(!$returnData){
- $query=OC_DB::prepare('SELECT path FROM *PREFIX*fscache WHERE name LIKE ? AND user=?');
+ $query=OC_DB::prepare('SELECT path FROM *PREFIX*fscache WHERE name LIKE ? AND `user`=?');
}else{
- $query=OC_DB::prepare('SELECT * FROM *PREFIX*fscache WHERE name LIKE ? AND user=?');
+ $query=OC_DB::prepare('SELECT * FROM *PREFIX*fscache WHERE name LIKE ? AND `user`=?');
}
$result=$query->execute(array("%$search%",OC_User::getUser()));
$names=array();
@@ -332,7 +337,7 @@ class OC_FileCache{
if(!$user){
$user=OC_User::getUser();
}
- $query=OC_DB::prepare('SELECT path FROM *PREFIX*fscache WHERE id=? AND user=?');
+ $query=OC_DB::prepare('SELECT path FROM *PREFIX*fscache WHERE id=? AND `user`=?');
$result=$query->execute(array($id,$user));
$row=$result->fetchRow();
$path=$row['path'];
@@ -594,10 +599,10 @@ class OC_FileCache{
$root .= '%';
$user=OC_User::getUser();
if(!$part2){
- $query=OC_DB::prepare('SELECT path FROM *PREFIX*fscache WHERE mimepart=? AND user=? AND path LIKE ?');
+ $query=OC_DB::prepare('SELECT path FROM *PREFIX*fscache WHERE mimepart=? AND `user`=? AND path LIKE ?');
$result=$query->execute(array($part1,$user, $root));
}else{
- $query=OC_DB::prepare('SELECT path FROM *PREFIX*fscache WHERE mimetype=? AND user=? AND path LIKE ? ');
+ $query=OC_DB::prepare('SELECT path FROM *PREFIX*fscache WHERE mimetype=? AND `user`=? AND path LIKE ? ');
$result=$query->execute(array($part1.'/'.$part2,$user, $root));
}
$names=array();