summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php31
-rw-r--r--lib/connector/sabre/directory.php6
-rw-r--r--lib/connector/sabre/quotaplugin.php91
-rw-r--r--lib/group/group.php38
-rw-r--r--lib/helper.php34
-rw-r--r--lib/l10n/ca.php14
-rw-r--r--lib/l10n/de.php11
-rw-r--r--lib/l10n/de_CH.php12
-rw-r--r--lib/l10n/de_DE.php4
-rw-r--r--lib/l10n/et_EE.php14
-rw-r--r--lib/l10n/fi_FI.php7
-rw-r--r--lib/l10n/ko.php36
-rw-r--r--lib/l10n/lt_LT.php6
-rw-r--r--lib/l10n/nl.php1
-rw-r--r--lib/l10n/pt_BR.php14
-rw-r--r--lib/l10n/tr.php14
-rw-r--r--lib/l10n/ug.php1
-rw-r--r--lib/l10n/zh_CN.GB2312.php32
-rw-r--r--lib/l10n/zh_CN.php7
-rw-r--r--lib/l10n/zh_TW.php26
-rw-r--r--lib/log/rotate.php35
-rw-r--r--lib/ocs/cloud.php46
22 files changed, 368 insertions, 112 deletions
diff --git a/lib/base.php b/lib/base.php
index 5043c491475..488634f86f3 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -257,8 +257,8 @@ class OC {
OC_Util::addScript("compatibility");
OC_Util::addScript("jquery.ocdialog");
OC_Util::addScript("oc-dialogs");
- OC_Util::addScript("octemplate");
OC_Util::addScript("js");
+ OC_Util::addScript("octemplate");
OC_Util::addScript("eventsource");
OC_Util::addScript("config");
//OC_Util::addScript( "multiselect" );
@@ -492,6 +492,7 @@ class OC {
self::registerFilesystemHooks();
self::registerPreviewHooks();
self::registerShareHooks();
+ self::registerLogRotate();
//make sure temporary files are cleaned up
register_shutdown_function(array('OC_Helper', 'cleanTmp'));
@@ -554,6 +555,21 @@ class OC {
}
/**
+ * register hooks for the cache
+ */
+ public static function registerLogRotate() {
+ if (OC_Config::getValue('installed', false) && OC_Config::getValue('log_rotate_size', false)) {
+ //don't try to do this before we are properly setup
+ // register cache cleanup jobs
+ try { //if this is executed before the upgrade to the new backgroundjob system is completed it will throw an exception
+ \OCP\BackgroundJob::registerJob('OC\Log\Rotate', OC_Config::getValue("datadirectory", OC::$SERVERROOT.'/data').'/owncloud.log');
+ } catch (Exception $e) {
+
+ }
+ }
+ }
+
+ /**
* register hooks for the filesystem
*/
public static function registerFilesystemHooks() {
@@ -678,12 +694,15 @@ class OC {
$app = $param['app'];
$file = $param['file'];
$app_path = OC_App::getAppPath($app);
- $file = $app_path . '/' . $file;
- unset($app, $app_path);
- if (file_exists($file)) {
- require_once $file;
- return true;
+ if (OC_App::isEnabled($app) && $app_path !== false) {
+ $file = $app_path . '/' . $file;
+ unset($app, $app_path);
+ if (file_exists($file)) {
+ require_once $file;
+ return true;
+ }
}
+ header('HTTP/1.0 404 Not Found');
return false;
}
diff --git a/lib/connector/sabre/directory.php b/lib/connector/sabre/directory.php
index ed8d085462d..66cd2fcd4e3 100644
--- a/lib/connector/sabre/directory.php
+++ b/lib/connector/sabre/directory.php
@@ -233,10 +233,10 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
* @return array
*/
public function getQuotaInfo() {
- $rootInfo=\OC\Files\Filesystem::getFileInfo('');
+ $storageInfo = OC_Helper::getStorageInfo($this->path);
return array(
- $rootInfo['size'],
- \OC\Files\Filesystem::free_space()
+ $storageInfo['used'],
+ $storageInfo['total']
);
}
diff --git a/lib/connector/sabre/quotaplugin.php b/lib/connector/sabre/quotaplugin.php
index 34d4b676157..ea2cb81d1f7 100644
--- a/lib/connector/sabre/quotaplugin.php
+++ b/lib/connector/sabre/quotaplugin.php
@@ -3,58 +3,95 @@
/**
* This plugin check user quota and deny creating files when they exceeds the quota.
*
- * @copyright Copyright (C) 2012 entreCables S.L. All rights reserved.
* @author Sergio Cambra
+ * @copyright Copyright (C) 2012 entreCables S.L. All rights reserved.
* @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
*/
class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin {
/**
- * Reference to main server object
- *
- * @var Sabre_DAV_Server
- */
+ * Reference to main server object
+ *
+ * @var Sabre_DAV_Server
+ */
private $server;
/**
- * This initializes the plugin.
- *
- * This function is called by Sabre_DAV_Server, after
- * addPlugin is called.
- *
- * This method should set up the requires event subscriptions.
- *
- * @param Sabre_DAV_Server $server
- * @return void
- */
+ * is kept public to allow overwrite for unit testing
+ *
+ * @var \OC\Files\View
+ */
+ public $fileView;
+
+ /**
+ * This initializes the plugin.
+ *
+ * This function is called by Sabre_DAV_Server, after
+ * addPlugin is called.
+ *
+ * This method should set up the requires event subscriptions.
+ *
+ * @param Sabre_DAV_Server $server
+ * @return void
+ */
public function initialize(Sabre_DAV_Server $server) {
- $this->server = $server;
- $this->server->subscribeEvent('beforeWriteContent', array($this, 'checkQuota'), 10);
- $this->server->subscribeEvent('beforeCreateFile', array($this, 'checkQuota'), 10);
+ $this->server = $server;
+ $server->subscribeEvent('beforeWriteContent', array($this, 'checkQuota'), 10);
+ $server->subscribeEvent('beforeCreateFile', array($this, 'checkQuota'), 10);
}
/**
- * This method is called before any HTTP method and forces users to be authenticated
- *
- * @param string $method
- * @throws Sabre_DAV_Exception
- * @return bool
- */
+ * This method is called before any HTTP method and validates there is enough free space to store the file
+ *
+ * @param string $method
+ * @throws Sabre_DAV_Exception
+ * @return bool
+ */
public function checkQuota($uri, $data = null) {
- $expected = $this->server->httpRequest->getHeader('X-Expected-Entity-Length');
- $length = $expected ? $expected : $this->server->httpRequest->getHeader('Content-Length');
+ $length = $this->getLength();
if ($length) {
if (substr($uri, 0, 1)!=='/') {
$uri='/'.$uri;
}
list($parentUri, $newName) = Sabre_DAV_URLUtil::splitPath($uri);
- $freeSpace = \OC\Files\Filesystem::free_space($parentUri);
+ $freeSpace = $this->getFreeSpace($parentUri);
if ($freeSpace !== \OC\Files\SPACE_UNKNOWN && $length > $freeSpace) {
throw new Sabre_DAV_Exception_InsufficientStorage();
}
}
return true;
}
+
+ public function getLength()
+ {
+ $req = $this->server->httpRequest;
+ $length = $req->getHeader('X-Expected-Entity-Length');
+ if (!$length) {
+ $length = $req->getHeader('Content-Length');
+ }
+
+ $ocLength = $req->getHeader('OC-Total-Length');
+ if ($length && $ocLength) {
+ return max($length, $ocLength);
+ }
+
+ return $length;
+ }
+
+ /**
+ * @param $parentUri
+ * @return mixed
+ */
+ public function getFreeSpace($parentUri)
+ {
+ if (is_null($this->fileView)) {
+ // initialize fileView
+ $this->fileView = \OC\Files\Filesystem::getView();
+ }
+
+ $freeSpace = $this->fileView->free_space($parentUri);
+ return $freeSpace;
+ }
}
diff --git a/lib/group/group.php b/lib/group/group.php
index a752c4311c1..bcd2419b309 100644
--- a/lib/group/group.php
+++ b/lib/group/group.php
@@ -62,7 +62,6 @@ class Group {
return $this->users;
}
- $users = array();
$userIds = array();
foreach ($this->backends as $backend) {
$diff = array_diff(
@@ -74,11 +73,8 @@ class Group {
}
}
- foreach ($userIds as $userId) {
- $users[] = $this->userManager->get($userId);
- }
- $this->users = $users;
- return $users;
+ $this->users = $this->getVerifiedUsers($userIds);
+ return $this->users;
}
/**
@@ -113,7 +109,7 @@ class Group {
if ($backend->implementsActions(OC_GROUP_BACKEND_ADD_TO_GROUP)) {
$backend->addToGroup($user->getUID(), $this->gid);
if ($this->users) {
- $this->users[] = $user;
+ $this->users[$user->getUID()] = $user;
}
if ($this->emitter) {
$this->emitter->emit('\OC\Group', 'postAddUser', array($this, $user));
@@ -172,9 +168,7 @@ class Group {
if (!is_null($offset)) {
$offset -= count($userIds);
}
- foreach ($userIds as $userId) {
- $users[$userId] = $this->userManager->get($userId);
- }
+ $users += $this->getVerifiedUsers($userIds);
if (!is_null($limit) and $limit <= 0) {
return array_values($users);
}
@@ -191,7 +185,6 @@ class Group {
* @return \OC\User\User[]
*/
public function searchDisplayName($search, $limit = null, $offset = null) {
- $users = array();
foreach ($this->backends as $backend) {
if ($backend->implementsActions(OC_GROUP_BACKEND_GET_DISPLAYNAME)) {
$userIds = array_keys($backend->displayNamesInGroup($this->gid, $search, $limit, $offset));
@@ -204,9 +197,7 @@ class Group {
if (!is_null($offset)) {
$offset -= count($userIds);
}
- foreach ($userIds as $userId) {
- $users[$userId] = $this->userManager->get($userId);
- }
+ $users = $this->getVerifiedUsers($userIds);
if (!is_null($limit) and $limit <= 0) {
return array_values($users);
}
@@ -235,4 +226,23 @@ class Group {
}
return $result;
}
+
+ /**
+ * @brief returns all the Users from an array that really exists
+ * @param $userIds an array containing user IDs
+ * @return an Array with the userId as Key and \OC\User\User as value
+ */
+ private function getVerifiedUsers($userIds) {
+ if(!is_array($userIds)) {
+ return array();
+ }
+ $users = array();
+ foreach ($userIds as $userId) {
+ $user = $this->userManager->get($userId);
+ if(!is_null($user)) {
+ $users[$userId] = $user;
+ }
+ }
+ return $users;
+ }
}
diff --git a/lib/helper.php b/lib/helper.php
index 4c3415f4afa..afeb3771048 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -637,9 +637,26 @@ class OC_Helper {
* remove all files in PHP /oc-noclean temp dir
*/
public static function cleanTmpNoClean() {
- $tmpDirNoCleanFile = get_temp_dir() . '/oc-noclean/';
- if (file_exists($tmpDirNoCleanFile)) {
- self::rmdirr($tmpDirNoCleanFile);
+ $tmpDirNoCleanName=get_temp_dir() . '/oc-noclean/';
+ if(file_exists($tmpDirNoCleanName) && is_dir($tmpDirNoCleanName)) {
+ $files=scandir($tmpDirNoCleanName);
+ foreach($files as $file) {
+ $fileName = $tmpDirNoCleanName . $file;
+ if (!\OC\Files\Filesystem::isIgnoredDir($file) && filemtime($fileName) + 600 < time()) {
+ unlink($fileName);
+ }
+ }
+ // if oc-noclean is empty delete it
+ $isTmpDirNoCleanEmpty = true;
+ $tmpDirNoClean = opendir($tmpDirNoCleanName);
+ while (false !== ($file = readdir($tmpDirNoClean))) {
+ if (!\OC\Files\Filesystem::isIgnoredDir($file)) {
+ $isTmpDirNoCleanEmpty = false;
+ }
+ }
+ if ($isTmpDirNoCleanEmpty) {
+ rmdir($tmpDirNoCleanName);
+ }
}
}
@@ -870,15 +887,18 @@ class OC_Helper {
}
/**
- * Calculate the disc space
+ * Calculate the disc space for the given path
+ *
+ * @param string $path
+ * @return array
*/
- public static function getStorageInfo() {
- $rootInfo = \OC\Files\Filesystem::getFileInfo('/');
+ public static function getStorageInfo($path) {
+ $rootInfo = \OC\Files\Filesystem::getFileInfo($path);
$used = $rootInfo['size'];
if ($used < 0) {
$used = 0;
}
- $free = \OC\Files\Filesystem::free_space();
+ $free = \OC\Files\Filesystem::free_space($path);
if ($free >= 0) {
$total = $free + $used;
} else {
diff --git a/lib/l10n/ca.php b/lib/l10n/ca.php
index 83e70585e36..166455e652c 100644
--- a/lib/l10n/ca.php
+++ b/lib/l10n/ca.php
@@ -1,5 +1,7 @@
<?php
$TRANSLATIONS = array(
+"App \"%s\" can't be installed because it is not compatible with this version of ownCloud." => "L'aplicació \"%s\" no es pot instal·lar perquè no és compatible amb aquesta versió d'ownCloud.",
+"No app name specified" => "No heu especificat cap nom d'aplicació",
"Help" => "Ajuda",
"Personal" => "Personal",
"Settings" => "Configuració",
@@ -13,6 +15,18 @@ $TRANSLATIONS = array(
"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.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Baixeu els fitxers en trossos petits, de forma separada, 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",
+"Archives of type %s are not supported" => "Els fitxers del tipus %s no són compatibles",
+"Failed to open archive when installing app" => "Ha fallat l'obertura del fitxer en instal·lar l'aplicació",
+"App does not provide an info.xml file" => "L'aplicació no proporciona un fitxer info.xml",
+"App can't be installed because of not allowed code in the App" => "L'aplicació no es pot instal·lar perquè hi ha codi no autoritzat en l'aplicació",
+"App can't be installed because it is not compatible with this version of ownCloud" => "L'aplicació no es pot instal·lar perquè no és compatible amb aquesta versió d'ownCloud",
+"App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" => "L'aplicació no es pot instal·lar perquè conté l'etiqueta <shipped>vertader</shipped> que no es permet per aplicacions no enviades",
+"App can't be installed because the version in info.xml/version is not the same as the version reported from the app store" => "L'aplicació no es pot instal·lar perquè la versió a info.xml/version no és la mateixa que la versió indicada des de la botiga d'aplicacions",
+"App directory already exists" => "La carpeta de l'aplicació ja existeix",
+"Can't create app folder. Please fix permissions. %s" => "No es pot crear la carpeta de l'aplicació. Arregleu els permisos. %s",
"Application is not enabled" => "L'aplicació no està habilitada",
"Authentication error" => "Error d'autenticació",
"Token expired. Please reload page." => "El testimoni ha expirat. Torneu a carregar la pàgina.",
diff --git a/lib/l10n/de.php b/lib/l10n/de.php
index 01fe5ee0583..8670e1175c6 100644
--- a/lib/l10n/de.php
+++ b/lib/l10n/de.php
@@ -1,5 +1,7 @@
<?php
$TRANSLATIONS = array(
+"App \"%s\" can't be installed because it is not compatible with this version of ownCloud." => "Applikation \"%s\" kann nicht installiert werden, da sie mit dieser ownCloud Version nicht kompatibel ist.",
+"No app name specified" => "Es wurde kein App-Name angegeben",
"Help" => "Hilfe",
"Personal" => "Persönlich",
"Settings" => "Einstellungen",
@@ -13,6 +15,15 @@ $TRANSLATIONS = array(
"Back to Files" => "Zurück zu \"Dateien\"",
"Selected files too large to generate zip file." => "Die gewählten Dateien sind zu groß, um eine ZIP-Datei zu erstellen.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Lade die Dateien in kleineren, separaten, Stücken herunter oder bitte deinen Administrator.",
+"No source specified when installing app" => "Für die Installation der Applikation wurde keine Quelle angegeben",
+"No href specified when installing app from http" => "href wurde nicht angegeben um die Applikation per http zu installieren",
+"No path specified when installing app from local file" => "Bei der Installation der Applikation aus einer lokalen Datei wurde kein Pfad angegeben",
+"Archives of type %s are not supported" => "Archive vom Typ %s werden nicht unterstützt",
+"Failed to open archive when installing app" => "Das Archive konnte bei der Installation der Applikation nicht geöffnet werden",
+"App does not provide an info.xml file" => "Die Applikation enthält keine info,xml Datei",
+"App can't be installed because of not allowed code in the App" => "Die Applikation kann auf Grund von unerlaubten Code nicht installiert werden",
+"App directory already exists" => "Das Applikationsverzeichnis existiert bereits",
+"Can't create app folder. Please fix permissions. %s" => "Es kann kein Applikationsordner erstellt werden. Bitte passen sie die Berechtigungen an. %s",
"Application is not enabled" => "Die Anwendung ist nicht aktiviert",
"Authentication error" => "Fehler bei der Anmeldung",
"Token expired. Please reload page." => "Token abgelaufen. Bitte lade die Seite neu.",
diff --git a/lib/l10n/de_CH.php b/lib/l10n/de_CH.php
index 188ea4e2fc0..33f3446a693 100644
--- a/lib/l10n/de_CH.php
+++ b/lib/l10n/de_CH.php
@@ -1,5 +1,7 @@
<?php
$TRANSLATIONS = array(
+"App \"%s\" can't be installed because it is not compatible with this version of ownCloud." => "Anwendung \"%s\" kann nicht installiert werden, da sie mit dieser Version von ownCloud nicht kompatibel ist.",
+"No app name specified" => "Kein App-Name spezifiziert",
"Help" => "Hilfe",
"Personal" => "Persönlich",
"Settings" => "Einstellungen",
@@ -13,6 +15,8 @@ $TRANSLATIONS = array(
"Back to Files" => "Zurück zu \"Dateien\"",
"Selected files too large to generate zip file." => "Die gewählten Dateien sind zu gross, um eine ZIP-Datei zu erstellen.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Laden Sie die Dateien in kleineren, separaten, Stücken herunter oder bitten Sie Ihren Administrator.",
+"App can't be installed because of not allowed code in the App" => "Anwendung kann wegen nicht erlaubten Codes nicht installiert werden",
+"App directory already exists" => "Anwendungsverzeichnis existiert bereits",
"Application is not enabled" => "Die Anwendung ist nicht aktiviert",
"Authentication error" => "Authentifizierungs-Fehler",
"Token expired. Please reload page." => "Token abgelaufen. Bitte laden Sie die Seite neu.",
@@ -40,13 +44,13 @@ $TRANSLATIONS = array(
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Ihr Web-Server ist noch nicht für eine Datei-Synchronisation konfiguriert, weil die WebDAV-Schnittstelle vermutlich defekt ist.",
"Please double check the <a href='%s'>installation guides</a>." => "Bitte prüfen Sie die <a href='%s'>Installationsanleitungen</a>.",
"seconds ago" => "Gerade eben",
-"_%n minute ago_::_%n minutes ago_" => array("",""),
-"_%n hour ago_::_%n hours ago_" => array("",""),
+"_%n minute ago_::_%n minutes ago_" => array("","Vor %n Minuten"),
+"_%n hour ago_::_%n hours ago_" => array("","Vor %n Stunden"),
"today" => "Heute",
"yesterday" => "Gestern",
-"_%n day go_::_%n days ago_" => array("",""),
+"_%n day go_::_%n days ago_" => array("","Vor %n Tagen"),
"last month" => "Letzten Monat",
-"_%n month ago_::_%n months ago_" => array("",""),
+"_%n month ago_::_%n months ago_" => array("","Vor %n Monaten"),
"last year" => "Letztes Jahr",
"years ago" => "Vor Jahren",
"Caused by:" => "Verursacht durch:",
diff --git a/lib/l10n/de_DE.php b/lib/l10n/de_DE.php
index 9fd319b7e1b..eafd76b7ee9 100644
--- a/lib/l10n/de_DE.php
+++ b/lib/l10n/de_DE.php
@@ -13,6 +13,10 @@ $TRANSLATIONS = array(
"Back to Files" => "Zurück zu \"Dateien\"",
"Selected files too large to generate zip file." => "Die gewählten Dateien sind zu groß, um eine ZIP-Datei zu erstellen.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Laden Sie die Dateien in kleineren, separaten, Stücken herunter oder bitten Sie Ihren Administrator.",
+"Archives of type %s are not supported" => "Archive des Typs %s werden nicht unterstützt.",
+"App can't be installed because it is not compatible with this version of ownCloud" => "Die Anwendung konnte nicht installiert werden, weil Sie nicht mit dieser Version von ownCloud kompatibel ist.",
+"App directory already exists" => "Der Ordner für die Anwendung existiert bereits.",
+"Can't create app folder. Please fix permissions. %s" => "Der Ordner für die Anwendung konnte nicht angelegt werden. Bitte überprüfen Sie die Ordner- und Dateirechte und passen Sie diese entsprechend an. %s",
"Application is not enabled" => "Die Anwendung ist nicht aktiviert",
"Authentication error" => "Authentifizierungs-Fehler",
"Token expired. Please reload page." => "Token abgelaufen. Bitte laden Sie die Seite neu.",
diff --git a/lib/l10n/et_EE.php b/lib/l10n/et_EE.php
index a2ac6bcabc9..8e3aa55c4ed 100644
--- a/lib/l10n/et_EE.php
+++ b/lib/l10n/et_EE.php
@@ -1,5 +1,7 @@
<?php
$TRANSLATIONS = array(
+"App \"%s\" can't be installed because it is not compatible with this version of ownCloud." => "Rakendit \"%s\" ei saa paigaldada, kuna see pole ühilduv selle ownCloud versiooniga.",
+"No app name specified" => "Ühegi rakendi nime pole määratletud",
"Help" => "Abiinfo",
"Personal" => "Isiklik",
"Settings" => "Seaded",
@@ -13,6 +15,18 @@ $TRANSLATIONS = array(
"Back to Files" => "Tagasi failide juurde",
"Selected files too large to generate zip file." => "Valitud failid on ZIP-faili loomiseks liiga suured.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Laadi failid alla eraldi väiksemate osadena või küsi nõu oma süsteemiadminstraatorilt.",
+"No source specified when installing app" => "Ühegi lähteallikat pole rakendi paigalduseks määratletud",
+"No href specified when installing app from http" => "Ühtegi aadressi pole määratletud rakendi paigalduseks veebist",
+"No path specified when installing app from local file" => "Ühtegi teed pole määratletud paigaldamaks rakendit kohalikust failist",
+"Archives of type %s are not supported" => "%s tüüpi arhiivid pole toetatud",
+"Failed to open archive when installing app" => "Arhiivi avamine ebaõnnestus rakendi paigalduse käigus",
+"App does not provide an info.xml file" => "Rakend ei paku ühtegi info.xml faili",
+"App can't be installed because of not allowed code in the App" => "Rakendit ei saa paigaldada, kuna sisaldab lubamatud koodi",
+"App can't be installed because it is not compatible with this version of ownCloud" => "Rakendit ei saa paigaldada, kuna see pole ühilduv selle ownCloud versiooniga.",
+"App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" => "Rakendit ei saa paigaldada, kuna see sisaldab \n<shipped>\n\ntrue\n</shipped>\nmärgendit, mis pole lubatud mitte veetud (non shipped) rakendites",
+"App can't be installed because the version in info.xml/version is not the same as the version reported from the app store" => "Rakendit ei saa paigaldada, kuna selle versioon info.xml/version pole sama, mis on märgitud rakendite laos.",
+"App directory already exists" => "Rakendi kataloog on juba olemas",
+"Can't create app folder. Please fix permissions. %s" => "Ei saa luua rakendi kataloogi. Palun korrigeeri õigusi. %s",
"Application is not enabled" => "Rakendus pole sisse lülitatud",
"Authentication error" => "Autentimise viga",
"Token expired. Please reload page." => "Kontrollkood aegus. Paelun lae leht uuesti.",
diff --git a/lib/l10n/fi_FI.php b/lib/l10n/fi_FI.php
index 4552d4627c0..2e69df43ad2 100644
--- a/lib/l10n/fi_FI.php
+++ b/lib/l10n/fi_FI.php
@@ -1,5 +1,6 @@
<?php
$TRANSLATIONS = array(
+"App \"%s\" can't be installed because it is not compatible with this version of ownCloud." => "Sovellusta \"%s\" ei voi asentaa, koska se ei ole yhteensopiva käytössä olevan ownCloud-version kanssa.",
"Help" => "Ohje",
"Personal" => "Henkilökohtainen",
"Settings" => "Asetukset",
@@ -10,6 +11,12 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Tiedostot on ladattava yksittäin.",
"Back to Files" => "Takaisin tiedostoihin",
"Selected files too large to generate zip file." => "Valitut tiedostot ovat liian suurikokoisia mahtuakseen zip-tiedostoon.",
+"No source specified when installing app" => "Lähdettä ei määritelty sovellusta asennettaessa",
+"No path specified when installing app from local file" => "Polkua ei määritelty sovellusta asennettaessa paikallisesta tiedostosta",
+"Archives of type %s are not supported" => "Tyypin %s arkistot eivät ole tuettuja",
+"App does not provide an info.xml file" => "Sovellus ei sisällä info.xml-tiedostoa",
+"App directory already exists" => "Sovelluskansio on jo olemassa",
+"Can't create app folder. Please fix permissions. %s" => "Sovelluskansion luominen ei onnistu. Korjaa käyttöoikeudet. %s",
"Application is not enabled" => "Sovellusta ei ole otettu käyttöön",
"Authentication error" => "Tunnistautumisvirhe",
"Token expired. Please reload page." => "Valtuutus vanheni. Lataa sivu uudelleen.",
diff --git a/lib/l10n/ko.php b/lib/l10n/ko.php
index 4dab8b816bf..eec5be65abd 100644
--- a/lib/l10n/ko.php
+++ b/lib/l10n/ko.php
@@ -1,15 +1,31 @@
<?php
$TRANSLATIONS = array(
+"App \"%s\" can't be installed because it is not compatible with this version of ownCloud." => "현재 ownCloud 버전과 호환되지 않기 때문에 \"%s\" 앱을 설치할 수 없습니다.",
+"No app name specified" => "앱 이름이 지정되지 않았습니다.",
"Help" => "도움말",
"Personal" => "개인",
"Settings" => "설정",
"Users" => "사용자",
"Admin" => "관리자",
+"Failed to upgrade \"%s\"." => "\"%s\" 업그레이드에 실패했습니다.",
"web services under your control" => "내가 관리하는 웹 서비스",
+"cannot open \"%s\"" => "\"%s\"을(를) 열 수 없습니다.",
"ZIP download is turned off." => "ZIP 다운로드가 비활성화되었습니다.",
"Files need to be downloaded one by one." => "파일을 개별적으로 다운로드해야 합니다.",
"Back to Files" => "파일로 돌아가기",
"Selected files too large to generate zip file." => "선택한 파일들은 ZIP 파일을 생성하기에 너무 큽니다.",
+"No source specified when installing app" => "앱을 설치할 때 소스가 지정되지 않았습니다.",
+"No href specified when installing app from http" => "http에서 앱을 설치할 대 href가 지정되지 않았습니다.",
+"No path specified when installing app from local file" => "로컬 파일에서 앱을 설치할 때 경로가 지정되지 않았습니다.",
+"Archives of type %s are not supported" => "%s 타입 아카이브는 지원되지 않습니다.",
+"Failed to open archive when installing app" => "앱을 설치할 때 아카이브를 열지 못했습니다.",
+"App does not provide an info.xml file" => "앱에서 info.xml 파일이 제공되지 않았습니다.",
+"App can't be installed because of not allowed code in the App" => "앱에 허용되지 않는 코드가 있어서 앱을 설치할 수 없습니다. ",
+"App can't be installed because it is not compatible with this version of ownCloud" => "현재 ownCloud 버전과 호환되지 않기 때문에 앱을 설치할 수 없습니다.",
+"App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" => "출하되지 않은 앱에 허용되지 않는 <shipped>true</shipped> 태그를 포함하고 있기 때문에 앱을 설치할 수 없습니다.",
+"App can't be installed because the version in info.xml/version is not the same as the version reported from the app store" => "info.xml/version에 포함된 버전과 앱 스토어에 보고된 버전이 같지 않아서 앱을 설치할 수 없습니다. ",
+"App directory already exists" => "앱 디렉토리가 이미 존재합니다. ",
+"Can't create app folder. Please fix permissions. %s" => "앱 폴더를 만들 수 없습니다. 권한을 수정하십시오. %s ",
"Application is not enabled" => "앱이 활성화되지 않았습니다",
"Authentication error" => "인증 오류",
"Token expired. Please reload page." => "토큰이 만료되었습니다. 페이지를 새로 고치십시오.",
@@ -19,22 +35,34 @@ $TRANSLATIONS = array(
"%s enter the database username." => "데이터베이스 사용자 명을 %s 에 입력해주십시오",
"%s enter the database name." => "데이터베이스 명을 %s 에 입력해주십시오",
"%s you may not use dots in the database name" => "%s 에 적으신 데이터베이스 이름에는 점을 사용할수 없습니다",
+"MS SQL username and/or password not valid: %s" => "MS SQL 사용자 이름이나 암호가 잘못되었습니다: %s",
+"You need to enter either an existing account or the administrator." => "기존 계정이나 administrator(관리자)를 입력해야 합니다.",
+"MySQL username and/or password not valid" => "MySQL 사용자 이름이나 암호가 잘못되었습니다.",
"DB Error: \"%s\"" => "DB 오류: \"%s\"",
+"Offending command was: \"%s\"" => "잘못된 명령: \"%s\"",
+"MySQL user '%s'@'localhost' exists already." => "MySQL 사용자 '%s'@'localhost'이(가) 이미 존재합니다.",
+"Drop this user from MySQL" => "이 사용자를 MySQL에서 뺍니다.",
+"MySQL user '%s'@'%%' already exists" => "MySQL 사용자 '%s'@'%%'이(가) 이미 존재합니다. ",
+"Drop this user from MySQL." => "이 사용자를 MySQL에서 뺍니다.",
+"Oracle connection could not be established" => "Oracle 연결을 수립할 수 없습니다.",
+"Oracle username and/or password not valid" => "Oracle 사용자 이름이나 암호가 잘못되었습니다.",
+"Offending command was: \"%s\", name: %s, password: %s" => "잘못된 명령: \"%s\", 이름: %s, 암호: %s",
"PostgreSQL username and/or password not valid" => "PostgreSQL의 사용자 명 혹은 비밀번호가 잘못되었습니다",
"Set an admin username." => "관리자 이름 설정",
"Set an admin password." => "관리자 비밀번호 설정",
"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" => "초 전",
-"_%n minute ago_::_%n minutes ago_" => array(""),
-"_%n hour ago_::_%n hours ago_" => array(""),
+"_%n minute ago_::_%n minutes ago_" => array("%n분 전 "),
+"_%n hour ago_::_%n hours ago_" => array("%n시간 전 "),
"today" => "오늘",
"yesterday" => "어제",
-"_%n day go_::_%n days ago_" => array(""),
+"_%n day go_::_%n days ago_" => array("%n일 전 "),
"last month" => "지난 달",
-"_%n month ago_::_%n months ago_" => array(""),
+"_%n month ago_::_%n months ago_" => array("%n달 전 "),
"last year" => "작년",
"years ago" => "년 전",
+"Caused by:" => "원인: ",
"Could not find category \"%s\"" => "분류 \"%s\"을(를) 찾을 수 없습니다."
);
$PLURAL_FORMS = "nplurals=1; plural=0;";
diff --git a/lib/l10n/lt_LT.php b/lib/l10n/lt_LT.php
index fb109b86339..242b0a23106 100644
--- a/lib/l10n/lt_LT.php
+++ b/lib/l10n/lt_LT.php
@@ -17,13 +17,13 @@ $TRANSLATIONS = array(
"Text" => "Žinučių",
"Images" => "Paveikslėliai",
"seconds ago" => "prieš sekundę",
-"_%n minute ago_::_%n minutes ago_" => array("","",""),
-"_%n hour ago_::_%n hours ago_" => array("","",""),
+"_%n minute ago_::_%n minutes ago_" => array("",""," prieš %n minučių"),
+"_%n hour ago_::_%n hours ago_" => array("","","prieš %n valandų"),
"today" => "šiandien",
"yesterday" => "vakar",
"_%n day go_::_%n days ago_" => array("","",""),
"last month" => "praeitą mėnesį",
-"_%n month ago_::_%n months ago_" => array("","",""),
+"_%n month ago_::_%n months ago_" => array("","","prieš %n mėnesių"),
"last year" => "praeitais metais",
"years ago" => "prieš metus"
);
diff --git a/lib/l10n/nl.php b/lib/l10n/nl.php
index 338c3673c5b..e546c1f3179 100644
--- a/lib/l10n/nl.php
+++ b/lib/l10n/nl.php
@@ -1,5 +1,6 @@
<?php
$TRANSLATIONS = array(
+"No app name specified" => "De app naam is niet gespecificeerd.",
"Help" => "Help",
"Personal" => "Persoonlijk",
"Settings" => "Instellingen",
diff --git a/lib/l10n/pt_BR.php b/lib/l10n/pt_BR.php
index 52329667174..a2379ca4883 100644
--- a/lib/l10n/pt_BR.php
+++ b/lib/l10n/pt_BR.php
@@ -1,5 +1,7 @@
<?php
$TRANSLATIONS = array(
+"App \"%s\" can't be installed because it is not compatible with this version of ownCloud." => "O aplicativo \"%s\" não pode ser instalado porque não é compatível com esta versão do ownCloud.",
+"No app name specified" => "O nome do aplicativo não foi especificado.",
"Help" => "Ajuda",
"Personal" => "Pessoal",
"Settings" => "Ajustes",
@@ -13,6 +15,18 @@ $TRANSLATIONS = array(
"Back to Files" => "Voltar para Arquivos",
"Selected files too large to generate zip file." => "Arquivos selecionados são muito grandes para gerar arquivo zip.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Baixe os arquivos em pedaços menores, separadamente ou solicite educadamente ao seu administrador.",
+"No source specified when installing app" => "Nenhuma fonte foi especificada enquanto instalava o aplicativo",
+"No href specified when installing app from http" => "Nenhuma href foi especificada enquanto instalava o aplicativo de httml",
+"No path specified when installing app from local file" => "Nenhum caminho foi especificado enquanto instalava o aplicativo do arquivo local",
+"Archives of type %s are not supported" => "Arquivos do tipo %s não são suportados",
+"Failed to open archive when installing app" => "Falha para abrir o arquivo enquanto instalava o aplicativo",
+"App does not provide an info.xml file" => "O aplicativo não fornece um arquivo info.xml",
+"App can't be installed because of not allowed code in the App" => "O aplicativo não pode ser instalado por causa do código não permitido no Aplivativo",
+"App can't be installed because it is not compatible with this version of ownCloud" => "O aplicativo não pode ser instalado porque não é compatível com esta versão do ownCloud",
+"App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" => "O aplicativo não pode ser instalado porque ele contém a marca <shipped>verdadeiro</shipped> que não é permitido para aplicações não embarcadas",
+"App can't be installed because the version in info.xml/version is not the same as the version reported from the app store" => "O aplicativo não pode ser instalado porque a versão em info.xml /versão não é a mesma que a versão relatada na App Store",
+"App directory already exists" => "Diretório App já existe",
+"Can't create app folder. Please fix permissions. %s" => "Não é possível criar pasta app. Corrija as permissões. %s",
"Application is not enabled" => "Aplicação não está habilitada",
"Authentication error" => "Erro de autenticação",
"Token expired. Please reload page." => "Token expirou. Por favor recarregue a página.",
diff --git a/lib/l10n/tr.php b/lib/l10n/tr.php
index 498469ea8b1..b63c37c7240 100644
--- a/lib/l10n/tr.php
+++ b/lib/l10n/tr.php
@@ -1,5 +1,7 @@
<?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.",
+"No app name specified" => "Uygulama adı belirtimedli",
"Help" => "Yardım",
"Personal" => "Kişisel",
"Settings" => "Ayarlar",
@@ -13,6 +15,18 @@ $TRANSLATIONS = array(
"Back to Files" => "Dosyalara dön",
"Selected files too large to generate zip file." => "Seçilen dosyalar bir zip dosyası oluşturmak için fazla büyüktür.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Dosyaları ayrı ayrı, küçük parçalar halinde indirin ya da 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 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",
+"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",
"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.",
diff --git a/lib/l10n/ug.php b/lib/l10n/ug.php
index 731ad904d7e..e2cf38ecc8c 100644
--- a/lib/l10n/ug.php
+++ b/lib/l10n/ug.php
@@ -8,6 +8,7 @@ $TRANSLATIONS = array(
"Files" => "ھۆججەتلەر",
"Text" => "قىسقا ئۇچۇر",
"Images" => "سۈرەتلەر",
+"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "سىزنىڭ تور مۇلازىمېتىرىڭىز ھۆججەت قەدەمداشلاشقا يول قويىدىغان قىلىپ توغرا تەڭشەلمەپتۇ، چۈنكى WebDAV نىڭ ئېغىزى بۇزۇلغاندەك تۇرىدۇ.",
"_%n minute ago_::_%n minutes ago_" => array(""),
"_%n hour ago_::_%n hours ago_" => array(""),
"today" => "بۈگۈن",
diff --git a/lib/l10n/zh_CN.GB2312.php b/lib/l10n/zh_CN.GB2312.php
deleted file mode 100644
index bc81ff8fe1b..00000000000
--- a/lib/l10n/zh_CN.GB2312.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-$TRANSLATIONS = array(
-"Help" => "帮助",
-"Personal" => "私人",
-"Settings" => "设置",
-"Users" => "用户",
-"Admin" => "管理员",
-"web services under your control" => "您控制的网络服务",
-"ZIP download is turned off." => "ZIP 下载已关闭",
-"Files need to be downloaded one by one." => "需要逐个下载文件。",
-"Back to Files" => "返回到文件",
-"Selected files too large to generate zip file." => "选择的文件太大而不能生成 zip 文件。",
-"Application is not enabled" => "应用未启用",
-"Authentication error" => "验证错误",
-"Token expired. Please reload page." => "会话过期。请刷新页面。",
-"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" => "秒前",
-"_%n minute ago_::_%n minutes ago_" => array("%n 分钟以前"),
-"_%n hour ago_::_%n hours ago_" => array("%n 小时以前"),
-"today" => "今天",
-"yesterday" => "昨天",
-"_%n day go_::_%n days ago_" => array("%n 天以前"),
-"last month" => "上个月",
-"_%n month ago_::_%n months ago_" => array("%n 个月以前"),
-"last year" => "去年",
-"years ago" => "年前"
-);
-$PLURAL_FORMS = "nplurals=1; plural=0;";
diff --git a/lib/l10n/zh_CN.php b/lib/l10n/zh_CN.php
index 03bd48de74b..2c34356ea10 100644
--- a/lib/l10n/zh_CN.php
+++ b/lib/l10n/zh_CN.php
@@ -10,6 +10,7 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "需要逐一下载文件",
"Back to Files" => "回到文件",
"Selected files too large to generate zip file." => "选择的文件太大,无法生成 zip 文件。",
+"App does not provide an info.xml file" => "应用未提供 info.xml 文件",
"Application is not enabled" => "应用程序未启用",
"Authentication error" => "认证出错",
"Token expired. Please reload page." => "Token 过期,请刷新页面。",
@@ -38,12 +39,12 @@ $TRANSLATIONS = array(
"Please double check the <a href='%s'>installation guides</a>." => "请认真检查<a href='%s'>安装指南</a>.",
"seconds ago" => "秒前",
"_%n minute ago_::_%n minutes ago_" => array("%n 分钟前"),
-"_%n hour ago_::_%n hours ago_" => array(""),
+"_%n hour ago_::_%n hours ago_" => array("%n 小时前"),
"today" => "今天",
"yesterday" => "昨天",
-"_%n day go_::_%n days ago_" => array(""),
+"_%n day go_::_%n days ago_" => array("%n 天前"),
"last month" => "上月",
-"_%n month ago_::_%n months ago_" => array(""),
+"_%n month ago_::_%n months ago_" => array("%n 月前"),
"last year" => "去年",
"years ago" => "年前",
"Could not find category \"%s\"" => "无法找到分类 \"%s\""
diff --git a/lib/l10n/zh_TW.php b/lib/l10n/zh_TW.php
index f405eb88ae9..210c766aa59 100644
--- a/lib/l10n/zh_TW.php
+++ b/lib/l10n/zh_TW.php
@@ -1,15 +1,32 @@
<?php
$TRANSLATIONS = array(
+"App \"%s\" can't be installed because it is not compatible with this version of ownCloud." => "無法安裝應用程式 %s 因為它和此版本的 ownCloud 不相容。",
+"No app name specified" => "沒有指定應用程式名稱",
"Help" => "說明",
"Personal" => "個人",
"Settings" => "設定",
"Users" => "使用者",
"Admin" => "管理",
+"Failed to upgrade \"%s\"." => "升級失敗:%s",
"web services under your control" => "由您控制的網路服務",
+"cannot open \"%s\"" => "無法開啓 %s",
"ZIP download is turned off." => "ZIP 下載已關閉。",
"Files need to be downloaded one by one." => "檔案需要逐一下載。",
"Back to Files" => "回到檔案列表",
"Selected files too large to generate zip file." => "選擇的檔案太大以致於無法產生壓縮檔。",
+"Download the files in smaller chunks, seperately or kindly ask your administrator." => "以小分割下載您的檔案,請詢問您的系統管理員。",
+"No source specified when installing app" => "沒有指定應用程式安裝來源",
+"No href specified when installing app from http" => "從 http 安裝應用程式,找不到 href 屬性",
+"No path specified when installing app from local file" => "從本地檔案安裝應用程式時沒有指定路徑",
+"Archives of type %s are not supported" => "不支援 %s 格式的壓縮檔",
+"Failed to open archive when installing app" => "安裝應用程式時無法開啓壓縮檔",
+"App does not provide an info.xml file" => "應用程式沒有提供 info.xml 檔案",
+"App can't be installed because of not allowed code in the App" => "無法安裝應用程式因為在當中找到危險的代碼",
+"App can't be installed because it is not compatible with this version of ownCloud" => "無法安裝應用程式因為它和此版本的 ownCloud 不相容。",
+"App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" => "無法安裝應用程式,因為它包含了 <shipped>true</shipped> 標籤,在未發行的應用程式當中這是不允許的",
+"App can't be installed because the version in info.xml/version is not the same as the version reported from the app store" => "無法安裝應用程式,因為它在 info.xml/version 宣告的版本與 app store 當中記載的版本不同",
+"App directory already exists" => "應用程式目錄已經存在",
+"Can't create app folder. Please fix permissions. %s" => "無法建立應用程式目錄,請檢查權限:%s",
"Application is not enabled" => "應用程式未啟用",
"Authentication error" => "認證錯誤",
"Token expired. Please reload page." => "Token 過期,請重新整理頁面。",
@@ -37,15 +54,16 @@ $TRANSLATIONS = array(
"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" => "幾秒前",
-"_%n minute ago_::_%n minutes ago_" => array(""),
-"_%n hour ago_::_%n hours ago_" => array(""),
+"_%n minute ago_::_%n minutes ago_" => array("%n 分鐘前"),
+"_%n hour ago_::_%n hours ago_" => array("%n 小時前"),
"today" => "今天",
"yesterday" => "昨天",
-"_%n day go_::_%n days ago_" => array(""),
+"_%n day go_::_%n days ago_" => array("%n 天前"),
"last month" => "上個月",
-"_%n month ago_::_%n months ago_" => array(""),
+"_%n month ago_::_%n months ago_" => array("%n 個月前"),
"last year" => "去年",
"years ago" => "幾年前",
+"Caused by:" => "原因:",
"Could not find category \"%s\"" => "找不到分類:\"%s\""
);
$PLURAL_FORMS = "nplurals=1; plural=0;";
diff --git a/lib/log/rotate.php b/lib/log/rotate.php
new file mode 100644
index 00000000000..bf23ad588b3
--- /dev/null
+++ b/lib/log/rotate.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Copyright (c) 2013 Bart Visscher <bartv@thisnet.nl>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Log;
+
+/**
+ * This rotates the current logfile to a new name, this way the total log usage
+ * will stay limited and older entries are available for a while longer.
+ * For more professional log management set the 'logfile' config to a different
+ * location and manage that with your own tools.
+ */
+class Rotate extends \OC\BackgroundJob\Job {
+ private $max_log_size;
+ public function run($logFile) {
+ $this->max_log_size = \OC_Config::getValue('log_rotate_size', false);
+ if ($this->max_log_size) {
+ $filesize = @filesize($logFile);
+ if ($filesize >= $this->max_log_size) {
+ $this->rotate($logFile);
+ }
+ }
+ }
+
+ protected function rotate($logfile) {
+ $rotatedLogfile = $logfile.'.1';
+ rename($logfile, $rotatedLogfile);
+ $msg = 'Log file "'.$logfile.'" was over '.$this->max_log_size.' bytes, moved to "'.$rotatedLogfile.'"';
+ \OC_Log::write('OC\Log\Rotate', $msg, \OC_Log::WARN);
+ }
+}
diff --git a/lib/ocs/cloud.php b/lib/ocs/cloud.php
index 132d923d960..2dd99319057 100644
--- a/lib/ocs/cloud.php
+++ b/lib/ocs/cloud.php
@@ -35,13 +35,49 @@ class OC_OCS_Cloud {
'edition' => OC_Util::getEditionString(),
);
- $result['capabilities'] = array(
- 'core' => array(
- 'pollinterval' => OC_Config::getValue('pollinterval', 60),
- ),
- );
+ $result['capabilities'] = array(
+ 'core' => array(
+ 'pollinterval' => OC_Config::getValue('pollinterval', 60),
+ ),
+ );
+
return new OC_OCS_Result($result);
}
+
+ /**
+ * gets user info
+ *
+ * exposes the quota of an user:
+ * <data>
+ * <quota>
+ * <free>1234</free>
+ * <used>4321</used>
+ * <total>5555</total>
+ * <ralative>0.78</ralative>
+ * </quota>
+ * </data>
+ *
+ * @param $parameters object should contain parameter 'userid' which identifies
+ * the user from whom the information will be returned
+ */
+ public static function getUser($parameters) {
+ // Check if they are viewing information on themselves
+ if($parameters['userid'] === OC_User::getUser()) {
+ // Self lookup
+ $quota = array();
+ $storage = OC_Helper::getStorageInfo();
+ $quota = array(
+ 'free' => $storage['free'],
+ 'used' => $storage['used'],
+ 'total' => $storage['total'],
+ 'relative' => $storage['relative'],
+ );
+ return new OC_OCS_Result(array('quota' => $quota));
+ } else {
+ // No permission to view this user data
+ return new OC_OCS_Result(null, 997);
+ }
+ }
public static function getUserPublickey($parameters) {