summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/l10n/ca.php1
-rw-r--r--lib/l10n/cs_CZ.php2
-rw-r--r--lib/l10n/es.php1
-rw-r--r--lib/l10n/ja_JP.php1
-rw-r--r--lib/l10n/nl.php1
-rw-r--r--lib/l10n/sk_SK.php1
-rw-r--r--lib/l10n/sl.php12
-rw-r--r--lib/l10n/tr.php24
-rw-r--r--lib/private/connector/sabre/file.php2
-rw-r--r--lib/private/files/cache/updater.php12
-rw-r--r--lib/private/files/view.php8
-rw-r--r--lib/private/installer.php3
-rwxr-xr-xlib/private/preview.php41
-rwxr-xr-xlib/private/util.php8
-rw-r--r--lib/public/contacts/imanager.php4
-rw-r--r--lib/public/iservercontainer.php11
-rw-r--r--lib/public/share.php26
17 files changed, 114 insertions, 44 deletions
diff --git a/lib/l10n/ca.php b/lib/l10n/ca.php
index 01457275cf2..e7250befc2f 100644
--- a/lib/l10n/ca.php
+++ b/lib/l10n/ca.php
@@ -16,6 +16,7 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Els fitxers s'han de baixar d'un en un.",
"Back to Files" => "Torna a Fitxers",
"Selected files too large to generate zip file." => "Els fitxers seleccionats son massa grans per generar un fitxer zip.",
+"Please download the files separately in smaller chunks or kindly ask your administrator." => "Baixeu els fitxers separadament en petits trossos o pregunteu a l'administrador.",
"No source specified when installing app" => "No heu especificat la font en instal·lar l'aplicació",
"No href specified when installing app from http" => "No heu especificat href en instal·lar l'aplicació des de http",
"No path specified when installing app from local file" => "No heu seleccionat el camí en instal·lar una aplicació des d'un fitxer local",
diff --git a/lib/l10n/cs_CZ.php b/lib/l10n/cs_CZ.php
index c9d9e50a2f0..96d3660c473 100644
--- a/lib/l10n/cs_CZ.php
+++ b/lib/l10n/cs_CZ.php
@@ -16,7 +16,7 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Soubory musí být stahovány jednotlivě.",
"Back to Files" => "Zpět k souborům",
"Selected files too large to generate zip file." => "Vybrané soubory jsou příliš velké pro vytvoření ZIP souboru.",
-"Please download the files separately in smaller chunks or kindly ask your administrator." => "Prosím stáhněte soubory odděleně v menších množstvích nebo požádejte vašeho správce.",
+"Please download the files separately in smaller chunks or kindly ask your administrator." => "Prosím stáhněte soubory odděleně po menších množstvích nebo požádejte vašeho správce.",
"No source specified when installing app" => "Nebyl zadán zdroj při instalaci aplikace",
"No href specified when installing app from http" => "Nebyl zadán odkaz pro instalaci aplikace z HTTP",
"No path specified when installing app from local file" => "Nebyla zadána cesta pro instalaci aplikace z místního souboru",
diff --git a/lib/l10n/es.php b/lib/l10n/es.php
index 8e79c9f1059..1412d49c2f5 100644
--- a/lib/l10n/es.php
+++ b/lib/l10n/es.php
@@ -16,6 +16,7 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Los archivos deben ser descargados uno por uno.",
"Back to Files" => "Volver a Archivos",
"Selected files too large to generate zip file." => "Los archivos seleccionados son demasiado grandes para generar el archivo zip.",
+"Please download the files separately in smaller chunks or kindly ask your administrator." => "Descargue los archivos en trozos más pequeños, por separado o solicítelos amablemente a su administrador.",
"No source specified when installing app" => "No se ha especificado origen cuando se ha instalado la aplicación",
"No href specified when installing app from http" => "No href especificado cuando se ha instalado la aplicación",
"No path specified when installing app from local file" => "Sin path especificado cuando se ha instalado la aplicación desde el fichero local",
diff --git a/lib/l10n/ja_JP.php b/lib/l10n/ja_JP.php
index f7af9b592ad..d7baf176a14 100644
--- a/lib/l10n/ja_JP.php
+++ b/lib/l10n/ja_JP.php
@@ -16,6 +16,7 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "ファイルは1つずつダウンロードする必要があります。",
"Back to Files" => "ファイルに戻る",
"Selected files too large to generate zip file." => "選択したファイルはZIPファイルの生成には大きすぎます。",
+"Please download the files separately in smaller chunks or kindly ask your administrator." => "少しずつに分けてファイルをダウンロードするか、管理者に問い合わせてください。",
"No source specified when installing app" => "アプリインストール時のソースが未指定",
"No href specified when installing app from http" => "アプリインストール時のhttpの URL が未指定",
"No path specified when installing app from local file" => "アプリインストール時のローカルファイルのパスが未指定",
diff --git a/lib/l10n/nl.php b/lib/l10n/nl.php
index d3a94d20f54..0254ce81886 100644
--- a/lib/l10n/nl.php
+++ b/lib/l10n/nl.php
@@ -16,6 +16,7 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Bestanden moeten één voor één worden gedownload.",
"Back to Files" => "Terug naar bestanden",
"Selected files too large to generate zip file." => "De geselecteerde bestanden zijn te groot om een zip bestand te maken.",
+"Please download the files separately in smaller chunks or kindly ask your administrator." => "Download de bestanden afzonderlijk in kleinere porties of vraag het uw beheerder,",
"No source specified when installing app" => "Geen bron opgegeven bij installatie van de app",
"No href specified when installing app from http" => "Geen href opgegeven bij installeren van de app vanaf http",
"No path specified when installing app from local file" => "Geen pad opgegeven bij installeren van de app vanaf een lokaal bestand",
diff --git a/lib/l10n/sk_SK.php b/lib/l10n/sk_SK.php
index 493374ade09..18b455780d1 100644
--- a/lib/l10n/sk_SK.php
+++ b/lib/l10n/sk_SK.php
@@ -16,6 +16,7 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Súbory musia byť nahrávané jeden za druhým.",
"Back to Files" => "Späť na súbory",
"Selected files too large to generate zip file." => "Zvolené súbory sú príliš veľké na vygenerovanie zip súboru.",
+"Please download the files separately in smaller chunks or kindly ask your administrator." => "Prosím, stiahnite si súbory samostatne v menších blokoch alebo sa obráťte na správcu.",
"No source specified when installing app" => "Nešpecifikovaný zdroj pri inštalácii aplikácie",
"No href specified when installing app from http" => "Nešpecifikovaný atribút \"href\" pri inštalácii aplikácie pomocou protokolu \"http\"",
"No path specified when installing app from local file" => "Nešpecifikovaná cesta pri inštalácii aplikácie z lokálneho súboru",
diff --git a/lib/l10n/sl.php b/lib/l10n/sl.php
index 49c9c6a3b29..69067c2691f 100644
--- a/lib/l10n/sl.php
+++ b/lib/l10n/sl.php
@@ -1,5 +1,6 @@
<?php
$TRANSLATIONS = array(
+"App \"%s\" can't be installed because it is not compatible with this version of ownCloud." => "Programa \"%s\" ni mogoče namestiti, ker ni skladen s trenutno nameščeno različico oblaka ownCloud.",
"No app name specified" => "Ni podanega imena programa",
"Help" => "Pomoč",
"Personal" => "Osebno",
@@ -15,11 +16,19 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Datoteke je mogoče prejeti le posamično.",
"Back to Files" => "Nazaj na datoteke",
"Selected files too large to generate zip file." => "Izbrane datoteke so prevelike za ustvarjanje datoteke arhiva zip.",
+"Please download the files separately in smaller chunks or kindly ask your administrator." => "Datoteke je treba prejeti ločeno v manjših paketih, ali pa je treba za pomoč prositi skrbnika.",
"No source specified when installing app" => "Ni podanega vira med nameščenjem programa",
"No href specified when installing app from http" => "Ni podanega podatka naslova HREF med nameščenjem programa preko protokola HTTP.",
"No path specified when installing app from local file" => "Ni podane poti med nameščenjem programa iz krajevne datoteke",
"Archives of type %s are not supported" => "Arhivi vrste %s niso podprti",
+"Failed to open archive when installing app" => "Odpiranje arhiva je med nameščanjem spodletelo",
+"App does not provide an info.xml file" => "Program je brez datoteke info.xml",
+"App can't be installed because of not allowed code in the App" => "Programa ni mogoče namestiti zaradi nedovoljene programske kode.",
+"App can't be installed because it is not compatible with this version of ownCloud" => "Programa ni mogoče namestiti, ker ni skladen z trenutno nameščeno različico oblaka ownCloud.",
+"App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" => "Programa ni mogoče namestiti, ker vsebuje oznako <shipped>potrditve</shipped>, ki pa ni dovoljena za javne programe.",
+"App can't be installed because the version in info.xml/version is not the same as the version reported from the app store" => "Program ni mogoče namestiti zaradi neustrezne različice datoteke info.xml. Ta ni enaka različici programa.",
"App directory already exists" => "Programska mapa že obstaja",
+"Can't create app folder. Please fix permissions. %s" => "Programske mape ni mogoče ustvariti. Ni ustreznih dovoljenj. %s",
"Application is not enabled" => "Program ni omogočen",
"Authentication error" => "Napaka overjanja",
"Token expired. Please reload page." => "Žeton je potekel. Stran je treba ponovno naložiti.",
@@ -56,6 +65,7 @@ $TRANSLATIONS = array(
"last month" => "zadnji mesec",
"_%n month ago_::_%n months ago_" => array("pred %n mesecem","pred %n mesecema","pred %n meseci","pred %n meseci"),
"last year" => "lansko leto",
-"years ago" => "let nazaj"
+"years ago" => "let nazaj",
+"Caused by:" => "Vzrok:"
);
$PLURAL_FORMS = "nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);";
diff --git a/lib/l10n/tr.php b/lib/l10n/tr.php
index 11f0c72671f..093984bb952 100644
--- a/lib/l10n/tr.php
+++ b/lib/l10n/tr.php
@@ -1,6 +1,6 @@
<?php
$TRANSLATIONS = array(
-"App \"%s\" can't be installed because it is not compatible with this version of ownCloud." => "Owncloud yazılımının bu sürümü ile uyumlu olmadığı için \"%s\" uygulaması kurulamaz.",
+"App \"%s\" can't be installed because it is not compatible with this version of ownCloud." => "ownCloud yazılımının bu sürümü ile uyumlu olmadığı için \"%s\" uygulaması kurulamaz.",
"No app name specified" => "Uygulama adı belirtimedli",
"Help" => "Yardım",
"Personal" => "Kişisel",
@@ -18,25 +18,25 @@ $TRANSLATIONS = array(
"Selected files too large to generate zip file." => "Seçilen dosyalar bir zip dosyası oluşturmak için fazla büyüktür.",
"Please download the files separately in smaller chunks or kindly ask your administrator." => "Dosyaları ayrı ayrı, küçük parçalar halinde indirin veya yöneticinizden yardım isteyin. ",
"No source specified when installing app" => "Uygulama kurulurken bir kaynak belirtilmedi",
-"No href specified when installing app from http" => "Uygulama kuruluyorken http'de href belirtilmedi.",
+"No href specified when installing app from http" => "Uygulama kuruluyorken http'de href belirtilmedi",
"No path specified when installing app from local file" => "Uygulama yerel dosyadan kuruluyorken dosya yolu belirtilmedi",
-"Archives of type %s are not supported" => "%s arşiv tipi desteklenmiyor",
+"Archives of type %s are not supported" => "%s arşiv türü desteklenmiyor",
"Failed to open archive when installing app" => "Uygulama kuruluyorken arşiv dosyası açılamadı",
"App does not provide an info.xml file" => "Uygulama info.xml dosyası sağlamıyor",
-"App can't be installed because of not allowed code in the App" => "Uygulamada izin verilmeyeden kodlar olduğu için kurulamıyor.",
-"App can't be installed because it is not compatible with this version of ownCloud" => "Owncloud versiyonunuz ile uyumsuz olduğu için uygulama kurulamıyor.",
-"App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" => "Uygulama kurulamıyor. Çünkü \"non shipped\" uygulamalar için <shipped>true</shipped> tag içermektedir.",
-"App can't be installed because the version in info.xml/version is not the same as the version reported from the app store" => "Uygulama kurulamıyor çünkü info.xml/version ile uygulama marketde belirtilen sürüm aynı değil.",
-"App directory already exists" => "App dizini zaten mevcut",
-"Can't create app folder. Please fix permissions. %s" => "app dizini oluşturulamıyor. Lütfen izinleri düzeltin. %s",
+"App can't be installed because of not allowed code in the App" => "Uygulama, izin verilmeyen kodlar barındırdığından kurulamıyor.",
+"App can't be installed because it is not compatible with this version of ownCloud" => "ownCloud sürümünüz ile uyumsuz olduğu için uygulama kurulamıyor.",
+"App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" => "Uygulama kurulamıyor. Çünkü \"birlikte gelmeyen\" uygulamalar için <shipped>true</shipped> etiketi içeriyor",
+"App can't be installed because the version in info.xml/version is not the same as the version reported from the app store" => "Uygulama kurulamıyor çünkü info.xml/version ile uygulama markette belirtilen sürüm aynı değil",
+"App directory already exists" => "Uygulama dizini zaten mevcut",
+"Can't create app folder. Please fix permissions. %s" => "Uygulama dizini oluşturulamıyor. Lütfen izinleri düzeltin. %s",
"Application is not enabled" => "Uygulama etkinleştirilmedi",
"Authentication error" => "Kimlik doğrulama hatası",
"Token expired. Please reload page." => "Jetonun süresi geçti. Lütfen sayfayı yenileyin.",
"Files" => "Dosyalar",
"Text" => "Metin",
"Images" => "Resimler",
-"%s enter the database username." => "%s veritabanı kullanıcı adını gir.",
-"%s enter the database name." => "%s veritabanı adını gir.",
+"%s enter the database username." => "%s veritabanı kullanıcı adını girin.",
+"%s enter the database name." => "%s veritabanı adını girin.",
"%s you may not use dots in the database name" => "%s veritabanı adında nokta kullanamayabilirsiniz",
"MS SQL username and/or password not valid: %s" => "MS SQL kullanıcı adı ve/veya parolası geçersiz: %s",
"You need to enter either an existing account or the administrator." => "Bir konto veya kullanici birlemek ihtiyacin. ",
@@ -46,7 +46,7 @@ $TRANSLATIONS = array(
"MySQL user '%s'@'localhost' exists already." => "MySQL kullanici '%s @local host zatan var. ",
"Drop this user from MySQL" => "Bu kullanici MySQLden list disari koymak. ",
"MySQL user '%s'@'%%' already exists" => "MySQL kullanici '%s @ % % zaten var (zaten yazili)",
-"Drop this user from MySQL." => "Bu kulanıcıyı MySQL veritabanından kaldır",
+"Drop this user from MySQL." => "Bu kullanıcıyı MySQL veritabanından kaldır",
"Oracle connection could not be established" => "Oracle bağlantısı kurulamadı",
"Oracle username and/or password not valid" => "Adi klullanici ve/veya parola Oracle mantikli değildir. ",
"Offending command was: \"%s\", name: %s, password: %s" => "Hatalı komut: \"%s\", ad: %s, parola: %s",
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php
index 26b5d200bde..295575f0af6 100644
--- a/lib/private/connector/sabre/file.php
+++ b/lib/private/connector/sabre/file.php
@@ -249,7 +249,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
// allow sync clients to send the mtime along in a header
$mtime = OC_Request::hasModificationTime();
if ($mtime !== false) {
- if($fs->touch($this->path, $mtime)) {
+ if($fs->touch($targetPath, $mtime)) {
header('X-OC-MTime: accepted');
}
}
diff --git a/lib/private/files/cache/updater.php b/lib/private/files/cache/updater.php
index d45c5e17fc8..73bc30e538f 100644
--- a/lib/private/files/cache/updater.php
+++ b/lib/private/files/cache/updater.php
@@ -59,9 +59,13 @@ class Updater {
*/
list($storage, $internalPath) = self::resolvePath($path);
if ($storage) {
+ $parent = dirname($internalPath);
+ if ($parent === '.') {
+ $parent = '';
+ }
$cache = $storage->getCache($internalPath);
$cache->remove($internalPath);
- $cache->correctFolderSize($internalPath);
+ $cache->correctFolderSize($parent);
self::correctFolder($path, time());
self::correctParentStorageMtime($storage, $internalPath);
}
@@ -86,6 +90,12 @@ class Updater {
if ($storageFrom === $storageTo) {
$cache = $storageFrom->getCache($internalFrom);
$cache->move($internalFrom, $internalTo);
+ if (pathinfo($internalFrom, PATHINFO_EXTENSION) !== pathinfo($internalTo, PATHINFO_EXTENSION)) {
+ // redetect mime type change
+ $mimeType = $storageTo->getMimeType($internalTo);
+ $fileId = $storageTo->getCache()->getId($internalTo);
+ $storageTo->getCache()->update($fileId, array('mimetype' => $mimeType));
+ }
$cache->correctFolderSize($internalFrom);
$cache->correctFolderSize($internalTo);
self::correctFolder($from, time());
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index 8cb56ede91b..ac45a881331 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -159,7 +159,11 @@ class View {
}
public function rmdir($path) {
- return $this->basicOperation('rmdir', $path, array('delete'));
+ if ($this->is_dir($path)) {
+ return $this->basicOperation('rmdir', $path, array('delete'));
+ } else {
+ return false;
+ }
}
public function opendir($path) {
@@ -712,7 +716,7 @@ class View {
return false;
}
$defaultRoot = Filesystem::getRoot();
- if($this->fakeRoot === $defaultRoot){
+ if ($this->fakeRoot === $defaultRoot) {
return true;
}
return (strlen($this->fakeRoot) > strlen($defaultRoot)) && (substr($this->fakeRoot, 0, strlen($defaultRoot) + 1) === $defaultRoot . '/');
diff --git a/lib/private/installer.php b/lib/private/installer.php
index 9b49543c3fb..8375b231e9b 100644
--- a/lib/private/installer.php
+++ b/lib/private/installer.php
@@ -460,8 +460,7 @@ class OC_Installer{
);
// is the code checker enabled?
- if(OC_Config::getValue('appcodechecker', false)) {
-
+ if(OC_Config::getValue('appcodechecker', true)) {
// check if grep is installed
$grep = exec('which grep');
if($grep=='') {
diff --git a/lib/private/preview.php b/lib/private/preview.php
index 266f7795f12..ff93f438f73 100755
--- a/lib/private/preview.php
+++ b/lib/private/preview.php
@@ -9,7 +9,7 @@
* Thumbnails:
* structure of filename:
* /data/user/thumbnails/pathhash/x-y.png
- *
+ *
*/
namespace OC;
@@ -40,6 +40,7 @@ class Preview {
private $maxX;
private $maxY;
private $scalingup;
+ private $mimetype;
//preview images object
/**
@@ -59,11 +60,18 @@ class Preview {
* @param int $maxX The maximum X size of the thumbnail. It can be smaller depending on the shape of the image
* @param int $maxY The maximum Y size of the thumbnail. It can be smaller depending on the shape of the image
* @param bool $scalingUp Disable/Enable upscaling of previews
- * @return mixed (bool / string)
+ * @return mixed (bool / string)
* false if thumbnail does not exist
* path to thumbnail if thumbnail exists
*/
public function __construct($user='', $root='/', $file='', $maxX=1, $maxY=1, $scalingUp=true) {
+ //init fileviews
+ if($user === ''){
+ $user = \OC_User::getUser();
+ }
+ $this->fileView = new \OC\Files\View('/' . $user . '/' . $root);
+ $this->userView = new \OC\Files\View('/' . $user);
+
//set config
$this->configMaxX = \OC_Config::getValue('preview_max_x', null);
$this->configMaxY = \OC_Config::getValue('preview_max_y', null);
@@ -75,13 +83,6 @@ class Preview {
$this->setMaxY($maxY);
$this->setScalingUp($scalingUp);
- //init fileviews
- if($user === ''){
- $user = \OC_User::getUser();
- }
- $this->fileView = new \OC\Files\View('/' . $user . '/' . $root);
- $this->userView = new \OC\Files\View('/' . $user);
-
$this->preview = null;
//check if there are preview backends
@@ -166,10 +167,21 @@ class Preview {
*/
public function setFile($file) {
$this->file = $file;
+ if ($file !== '') {
+ $this->mimetype = $this->fileView->getMimeType($this->file);
+ }
return $this;
}
/**
+ * @brief set mimetype explicitely
+ * @param string $mimetype
+ */
+ public function setMimetype($mimetype) {
+ $this->mimetype = $mimetype;
+ }
+
+ /**
* @brief set the the max width of the preview
* @param int $maxX
* @return $this
@@ -265,7 +277,7 @@ class Preview {
$fileInfo = $this->fileView->getFileInfo($file);
$fileId = $fileInfo['fileid'];
-
+
$previewPath = $this->getThumbnailsFolder() . '/' . $fileId . '/';
$this->userView->deleteAll($previewPath);
$this->userView->rmdir($previewPath);
@@ -274,7 +286,7 @@ class Preview {
/**
* @brief check if thumbnail or bigger version of thumbnail of file is cached
- * @return mixed (bool / string)
+ * @return mixed (bool / string)
* false if thumbnail does not exist
* path to thumbnail if thumbnail exists
*/
@@ -386,11 +398,10 @@ class Preview {
}
if(is_null($this->preview)) {
- $mimetype = $this->fileView->getMimeType($file);
$preview = null;
foreach(self::$providers as $supportedMimetype => $provider) {
- if(!preg_match($supportedMimetype, $mimetype)) {
+ if(!preg_match($supportedMimetype, $this->mimetype)) {
continue;
}
@@ -516,7 +527,7 @@ class Preview {
$cropY = 0;
$image->crop($cropX, $cropY, $x, $y);
-
+
$this->preview = $image;
return;
}
@@ -598,7 +609,7 @@ class Preview {
public static function post_write($args) {
self::post_delete($args);
}
-
+
public static function post_delete($args) {
$path = $args['path'];
if(substr($path, 0, 1) === '/') {
diff --git a/lib/private/util.php b/lib/private/util.php
index b5c5546da35..38de07abc92 100755
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -437,11 +437,11 @@ class OC_Util {
);
$webServerRestart = true;
}
- if(floatval(phpversion()) < 5.3) {
+ if(version_compare(phpversion(), '5.3.8', '<')) {
$errors[] = array(
- 'error'=>'PHP 5.3 is required.',
- 'hint'=>'Please ask your server administrator to update PHP to version 5.3 or higher.'
- .' PHP 5.2 is no longer supported by ownCloud and the PHP community.'
+ 'error'=>'PHP 5.3.8 or higher is required.',
+ 'hint'=>'Please ask your server administrator to update PHP to the latest version.'
+ .' Your PHP version is no longer supported by ownCloud and the PHP community.'
);
$webServerRestart = true;
}
diff --git a/lib/public/contacts/imanager.php b/lib/public/contacts/imanager.php
index 3bfbca7be50..973d48be5ec 100644
--- a/lib/public/contacts/imanager.php
+++ b/lib/public/contacts/imanager.php
@@ -119,11 +119,15 @@ namespace OCP\Contacts {
function isEnabled();
/**
+ * Registers an address book
+ *
* @param \OCP\IAddressBook $address_book
*/
function registerAddressBook(\OCP\IAddressBook $address_book);
/**
+ * Unregisters an address book
+ *
* @param \OCP\IAddressBook $address_book
*/
function unregisterAddressBook(\OCP\IAddressBook $address_book);
diff --git a/lib/public/iservercontainer.php b/lib/public/iservercontainer.php
index 36296a59850..b958d2d03f4 100644
--- a/lib/public/iservercontainer.php
+++ b/lib/public/iservercontainer.php
@@ -100,11 +100,15 @@ interface IServerContainer {
function getUserSession();
/**
+ * Returns the navigation manager
+ *
* @return \OCP\INavigationManager
*/
function getNavigationManager();
/**
+ * Returns the config manager
+ *
* @return \OCP\IConfig
*/
function getConfig();
@@ -117,11 +121,15 @@ interface IServerContainer {
function getL10N($app);
/**
+ * Returns the URL generator
+ *
* @return \OCP\IURLGenerator
*/
function getURLGenerator();
/**
+ * Returns the Helper
+ *
* @return \OCP\IHelper
*/
function getHelper();
@@ -155,7 +163,8 @@ interface IServerContainer {
function getDatabaseConnection();
/**
- * @brief Returns an avatar manager, used for avatar functionality
+ * Returns an avatar manager, used for avatar functionality
+ *
* @return \OCP\IAvatarManager
*/
function getAvatarManager();
diff --git a/lib/public/share.php b/lib/public/share.php
index 6178a5ae043..6dbcd5b67bf 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -244,7 +244,9 @@ class Share {
* Get the items of item type shared with the current user
* @param string Item type
* @param int Format (optional) Format type must be defined by the backend
+ * @param mixed Parameters (optional)
* @param int Number of items to return (optional) Returns all by default
+ * @param bool include collections (optional)
* @return Return depends on format
*/
public static function getItemsSharedWith($itemType, $format = self::FORMAT_NONE,
@@ -258,6 +260,8 @@ class Share {
* @param string $itemType
* @param string $itemTarget
* @param int $format (optional) Format type must be defined by the backend
+ * @param mixed Parameters (optional)
+ * @param bool include collections (optional)
* @return Return depends on format
*/
public static function getItemSharedWith($itemType, $itemTarget, $format = self::FORMAT_NONE,
@@ -823,11 +827,12 @@ class Share {
$date = null;
} else {
$date = new \DateTime($date);
- $date = date('Y-m-d H:i', $date->format('U') - $date->getOffset());
}
$query = \OC_DB::prepare('UPDATE `*PREFIX*share` SET `expiration` = ? WHERE `id` = ?');
+ $query->bindValue(1, $date, 'datetime');
foreach ($items as $item) {
- $query->execute(array($date, $item['id']));
+ $query->bindValue(2, (int) $item['id']);
+ $query->execute();
}
return true;
}
@@ -843,7 +848,8 @@ class Share {
protected static function expireItem(array $item) {
if (!empty($item['expiration'])) {
$now = new \DateTime();
- $expirationDate = new \DateTime($item['expiration'], new \DateTimeZone('UTC'));
+ $expirationDate = \Doctrine\DBAL\Types\Type::getType('datetime')
+ ->convertToPhpValue($item['expiration'], \OC_DB::getConnection()->getDatabasePlatform());
if ($now > $expirationDate) {
self::unshareItem($item);
return true;
@@ -954,6 +960,7 @@ class Share {
* @param mixed Parameters to pass to formatItems()
* @param int Number of items to return, -1 to return all matches (optional)
* @param bool Include collection item types (optional)
+ * @param bool TODO (optional)
* @return mixed
*
* See public functions getItem(s)... for parameter usage
@@ -1354,8 +1361,11 @@ class Share {
* @param string Item source
* @param int SHARE_TYPE_USER, SHARE_TYPE_GROUP, or SHARE_TYPE_LINK
* @param string User or group the item is being shared with
+ * @param string User that is the owner of shared item
* @param int CRUDS permissions
* @param bool|array Parent folder target (optional)
+ * @param string token (optional)
+ * @param string name of the source item (optional)
* @return bool Returns true on success or false on failure
*/
private static function put($itemType, $itemSource, $shareType, $shareWith, $uidOwner,
@@ -1593,6 +1603,7 @@ class Share {
* @param string Item source
* @param int SHARE_TYPE_USER, SHARE_TYPE_GROUP, or SHARE_TYPE_LINK
* @param string User or group the item is being shared with
+ * @param string User that is the owner of shared item
* @param string The suggested target originating from a reshare (optional)
* @param int The id of the parent group share (optional)
* @return string Item target
@@ -1780,6 +1791,7 @@ class Share {
*/
/**
+ * Function that is called after a user is deleted. Cleans up the shares of that user.
* @param array arguments
*/
public static function post_deleteUser($arguments) {
@@ -1796,6 +1808,8 @@ class Share {
}
/**
+ * Function that is called after a user is added to a group.
+ * TODO what does it do?
* @param array arguments
*/
public static function post_addToGroup($arguments) {
@@ -1829,6 +1843,7 @@ class Share {
}
/**
+ * Function that is called after a user is removed from a group. Shares are cleaned up.
* @param array arguments
*/
public static function post_removeFromGroup($arguments) {
@@ -1848,6 +1863,7 @@ class Share {
}
/**
+ * Function that is called after a group is removed. Cleans up the shares to that group.
* @param array arguments
*/
public static function post_deleteGroup($arguments) {
@@ -1894,7 +1910,7 @@ interface Share_Backend {
* Converts the shared item sources back into the item in the specified format
* @param array Shared items
* @param int Format
- * @return ?
+ * @return TODO
*
* The items array is a 3-dimensional array with the item_source as the
* first key and the share id as the second key to an array with the share
@@ -1923,6 +1939,8 @@ interface Share_Backend_File_Dependent extends Share_Backend {
/**
* Get the file path of the item
+ * @param string Item source
+ * @param string User that is the owner of shared item
*/
public function getFilePath($itemSource, $uidOwner);