summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2013-06-28 09:22:48 +0200
committerThomas Mueller <thomas.mueller@tmit.eu>2013-06-28 09:22:48 +0200
commite7d50617d7add1ac3bcd7ecfacf5dae76fea05b7 (patch)
tree0513edcd9eb3bc6892b6253e12801449669c3377 /lib
parent0f32c5ec346490e0473d9003de5c796ff0cf92ea (diff)
parent6127fee5aa012e58c124b00f159afd3d3d95d8ce (diff)
downloadnextcloud-server-e7d50617d7add1ac3bcd7ecfacf5dae76fea05b7.tar.gz
nextcloud-server-e7d50617d7add1ac3bcd7ecfacf5dae76fea05b7.zip
Merge branch 'master' into ext-fs-irods-master
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php6
-rw-r--r--lib/connector/sabre/locks.php4
-rw-r--r--lib/connector/sabre/node.php4
-rw-r--r--lib/files/cache/scanner.php14
-rw-r--r--lib/l10n/el.php1
-rw-r--r--lib/l10n/eo.php18
-rw-r--r--lib/l10n/ko.php2
-rw-r--r--lib/l10n/sl.php1
-rw-r--r--lib/user.php2
-rw-r--r--lib/user/database.php2
10 files changed, 47 insertions, 7 deletions
diff --git a/lib/base.php b/lib/base.php
index 26e9595e869..fd4870974fe 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -288,14 +288,14 @@ class OC {
$cookie_path = OC::$WEBROOT ?: '/';
ini_set('session.cookie_path', $cookie_path);
+ //set the session object to a dummy session so code relying on the session existing still works
+ self::$session = new \OC\Session\Memory('');
+
try{
// set the session name to the instance id - which is unique
self::$session = new \OC\Session\Internal(OC_Util::getInstanceId());
// if session cant be started break with http 500 error
}catch (Exception $e){
- //set the session object to a dummy session so code relying on the session existing still works
- self::$session = new \OC\Session\Memory('');
-
OC_Log::write('core', 'Session could not be initialized',
OC_Log::ERROR);
diff --git a/lib/connector/sabre/locks.php b/lib/connector/sabre/locks.php
index cbc495dec19..7aca2e43712 100644
--- a/lib/connector/sabre/locks.php
+++ b/lib/connector/sabre/locks.php
@@ -176,6 +176,10 @@ class OC_Connector_Sabre_Locks extends Sabre_DAV_Locks_Backend_Abstract {
public function unlock($uri, Sabre_DAV_Locks_LockInfo $lockInfo) {
$sql = 'DELETE FROM `*PREFIX*locks` WHERE `userid` = ? AND `uri` = ? AND `token` = ?';
+ if (OC_Config::getValue( "dbtype") === 'oci') {
+ //FIXME oracle hack: need to explicitly cast CLOB to CHAR for comparison
+ $sql = 'DELETE FROM `*PREFIX*locks` WHERE `userid` = ? AND to_char(`uri`) = ? AND `token` = ?';
+ }
$result = OC_DB::executeAudited( $sql, array(OC_User::getUser(), $uri, $lockInfo->token));
return $result->numRows() === 1;
diff --git a/lib/connector/sabre/node.php b/lib/connector/sabre/node.php
index 1ffa048d6b2..0bffa58af78 100644
--- a/lib/connector/sabre/node.php
+++ b/lib/connector/sabre/node.php
@@ -189,8 +189,8 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
*/
public function getProperties($properties) {
if (is_null($this->property_cache)) {
- $query = OC_DB::prepare( 'SELECT * FROM `*PREFIX*properties` WHERE `userid` = ? AND `propertypath` = ?' );
- $result = $query->execute( array( OC_User::getUser(), $this->path ));
+ $sql = 'SELECT * FROM `*PREFIX*properties` WHERE `userid` = ? AND `propertypath` = ?';
+ $result = OC_DB::executeAudited( $sql, array( OC_User::getUser(), $this->path ) );
$this->property_cache = array();
while( $row = $result->fetchRow()) {
diff --git a/lib/files/cache/scanner.php b/lib/files/cache/scanner.php
index e7fbd856d5a..9b94a24f481 100644
--- a/lib/files/cache/scanner.php
+++ b/lib/files/cache/scanner.php
@@ -137,11 +137,20 @@ class Scanner {
\OC_Hook::emit('\OC\Files\Cache\Scanner', 'scan_folder', array('path' => $path, 'storage' => $this->storageId));
$size = 0;
$childQueue = array();
+ $existingChildren = array();
+ if ($this->cache->inCache($path)) {
+ $children = $this->cache->getFolderContents($path);
+ foreach ($children as $child) {
+ $existingChildren[] = $child['name'];
+ }
+ }
+ $newChildren = array();
if ($this->storage->is_dir($path) && ($dh = $this->storage->opendir($path))) {
\OC_DB::beginTransaction();
while ($file = readdir($dh)) {
$child = ($path) ? $path . '/' . $file : $file;
if (!Filesystem::isIgnoredDir($file)) {
+ $newChildren[] = $file;
$data = $this->scanFile($child, $reuse);
if ($data) {
if ($data['size'] === -1) {
@@ -156,6 +165,11 @@ class Scanner {
}
}
}
+ $removedChildren = \array_diff($existingChildren, $newChildren);
+ foreach ($removedChildren as $childName) {
+ $child = ($path) ? $path . '/' . $childName : $childName;
+ $this->cache->remove($child);
+ }
\OC_DB::commit();
foreach ($childQueue as $child) {
$childSize = $this->scanChildren($child, self::SCAN_RECURSIVE);
diff --git a/lib/l10n/el.php b/lib/l10n/el.php
index 8637b8da269..cd025aec78d 100644
--- a/lib/l10n/el.php
+++ b/lib/l10n/el.php
@@ -24,6 +24,7 @@
"%s set the database host." => "%s ρυθμίση του κεντρικόυ υπολογιστή βάσης δεδομένων. ",
"PostgreSQL username and/or password not valid" => "Μη έγκυρος χρήστης και/ή συνθηματικό της PostgreSQL",
"You need to enter either an existing account or the administrator." => "Χρειάζεται να εισάγετε είτε έναν υπάρχον λογαριασμό ή του διαχειριστή.",
+"Oracle connection could not be established" => "Αδυναμία σύνδεσης Oracle",
"MySQL username and/or password not valid" => "Μη έγκυρος χρήστης και/ή συνθηματικό της MySQL",
"DB Error: \"%s\"" => "Σφάλμα Βάσης Δεδομένων: \"%s\"",
"Offending command was: \"%s\"" => "Η εντολη παραβατικοτητας ηταν: \"%s\"",
diff --git a/lib/l10n/eo.php b/lib/l10n/eo.php
index 2782be65da9..327fe75b9d2 100644
--- a/lib/l10n/eo.php
+++ b/lib/l10n/eo.php
@@ -15,6 +15,24 @@
"Files" => "Dosieroj",
"Text" => "Teksto",
"Images" => "Bildoj",
+"Set an admin username." => "Starigi administran uzantonomon.",
+"Set an admin password." => "Starigi administran pasvorton.",
+"%s enter the database username." => "%s enigu la uzantonomon de la datumbazo.",
+"%s enter the database name." => "%s enigu la nomon de la datumbazo.",
+"%s you may not use dots in the database name" => "%s vi ne povas uzi punktojn en la nomo de la datumbazo",
+"%s set the database host." => "%s enigu la gastigon de la datumbazo.",
+"PostgreSQL username and/or password not valid" => "La uzantonomo de PostgreSQL aŭ la pasvorto ne validas",
+"Oracle connection could not be established" => "Konekto al Oracle ne povas stariĝi",
+"MySQL username and/or password not valid" => "La uzantonomo de MySQL aŭ la pasvorto ne validas",
+"DB Error: \"%s\"" => "Datumbaza eraro: “%s”",
+"MySQL user '%s'@'localhost' exists already." => "La uzanto de MySQL “%s”@“localhost” jam ekzistas.",
+"Drop this user from MySQL" => "Forigi ĉi tiun uzanton el MySQL",
+"MySQL user '%s'@'%%' already exists" => "La uzanto de MySQL “%s”@“%%” jam ekzistas",
+"Drop this user from MySQL." => "Forigi ĉi tiun uzanton el MySQL.",
+"Oracle username and/or password not valid" => "La uzantonomo de Oracle aŭ la pasvorto ne validas",
+"MS SQL username and/or password not valid: %s" => "La uzantonomo de MS SQL aŭ la pasvorto ne validas: %s",
+"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Via TTT-servilo ankoraŭ ne ĝuste agordiĝis por permesi sinkronigi dosierojn ĉar la WebDAV-interfaco ŝajnas rompita.",
+"Please double check the <a href='%s'>installation guides</a>." => "Bonvolu duoble kontroli la <a href='%s'>gvidilon por instalo</a>.",
"seconds ago" => "sekundoj antaŭe",
"1 minute ago" => "antaŭ 1 minuto",
"%d minutes ago" => "antaŭ %d minutoj",
diff --git a/lib/l10n/ko.php b/lib/l10n/ko.php
index bf2a68369f1..bfb99544a3b 100644
--- a/lib/l10n/ko.php
+++ b/lib/l10n/ko.php
@@ -16,6 +16,8 @@
"Files" => "파일",
"Text" => "텍스트",
"Images" => "그림",
+"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "WebDAV 인터페이스가 제대로 작동하지 않습니다. 웹 서버에서 파일 동기화를 사용할 수 있도록 설정이 제대로 되지 않은 것 같습니다.",
+"Please double check the <a href='%s'>installation guides</a>." => "<a href='%s'>설치 가이드</a>를 다시 한 번 확인하십시오.",
"seconds ago" => "초 전",
"1 minute ago" => "1분 전",
"%d minutes ago" => "%d분 전",
diff --git a/lib/l10n/sl.php b/lib/l10n/sl.php
index 7f8827d17f3..2073f545232 100644
--- a/lib/l10n/sl.php
+++ b/lib/l10n/sl.php
@@ -24,6 +24,7 @@
"%s set the database host." => "%s - vnos gostitelja podatkovne zbirke.",
"PostgreSQL username and/or password not valid" => "Uporabniško ime ali geslo PostgreSQL ni veljavno",
"You need to enter either an existing account or the administrator." => "Prijaviti se je treba v obstoječi ali pa skrbniški račun.",
+"Oracle connection could not be established" => "Povezava z bazo Oracle ni uspela.",
"MySQL username and/or password not valid" => "Uporabniško ime ali geslo MySQL ni veljavno",
"DB Error: \"%s\"" => "Napaka podatkovne zbirke: \"%s\"",
"Offending command was: \"%s\"" => "Napačni ukaz je: \"%s\"",
diff --git a/lib/user.php b/lib/user.php
index 06ea8e791dd..830f13bb8df 100644
--- a/lib/user.php
+++ b/lib/user.php
@@ -190,7 +190,7 @@ class OC_User {
// use Reflection to create a new instance, using the $args
$backend = $reflectionObj->newInstanceArgs($arguments);
self::useBackend($backend);
- $_setupedBackends[] = $i;
+ self::$_setupedBackends[] = $i;
} else {
OC_Log::write('core', 'User backend ' . $class . ' already initialized.', OC_Log::DEBUG);
}
diff --git a/lib/user/database.php b/lib/user/database.php
index d70b620f2ab..9f00a022d9f 100644
--- a/lib/user/database.php
+++ b/lib/user/database.php
@@ -85,7 +85,7 @@ class OC_User_Database extends OC_User_Backend {
*/
public function deleteUser( $uid ) {
// Delete user-group-relation
- $query = OC_DB::prepare( 'DELETE FROM `*PREFIX*users` WHERE uid = ?' );
+ $query = OC_DB::prepare( 'DELETE FROM `*PREFIX*users` WHERE `uid` = ?' );
$query->execute( array( $uid ));
return true;
}