diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/l10n/az.php | 8 | ||||
-rw-r--r-- | lib/l10n/de.php | 8 | ||||
-rw-r--r-- | lib/l10n/eu.php | 17 | ||||
-rw-r--r-- | lib/private/backgroundjob/job.php | 23 | ||||
-rw-r--r-- | lib/private/backgroundjob/queuedjob.php | 5 | ||||
-rw-r--r-- | lib/private/backgroundjob/timedjob.php | 6 | ||||
-rw-r--r-- | lib/private/files.php | 3 | ||||
-rw-r--r-- | lib/private/files/cache/cache.php | 4 | ||||
-rw-r--r-- | lib/private/files/cache/scanner.php | 2 | ||||
-rw-r--r-- | lib/private/l10n.php | 2 | ||||
-rw-r--r-- | lib/public/share.php | 35 |
11 files changed, 86 insertions, 27 deletions
diff --git a/lib/l10n/az.php b/lib/l10n/az.php new file mode 100644 index 00000000000..e7b09649a24 --- /dev/null +++ b/lib/l10n/az.php @@ -0,0 +1,8 @@ +<?php +$TRANSLATIONS = array( +"_%n minute ago_::_%n minutes ago_" => array(""), +"_%n hour ago_::_%n hours ago_" => array(""), +"_%n day go_::_%n days ago_" => array(""), +"_%n month ago_::_%n months ago_" => array("") +); +$PLURAL_FORMS = "nplurals=1; plural=0;"; diff --git a/lib/l10n/de.php b/lib/l10n/de.php index 5b09d350a7d..8ee4cb71d30 100644 --- a/lib/l10n/de.php +++ b/lib/l10n/de.php @@ -18,17 +18,17 @@ $TRANSLATIONS = array( "Selected files too large to generate zip file." => "Die gewählten Dateien sind zu groß, um eine ZIP-Datei zu erstellen.", "Please download the files separately in smaller chunks or kindly ask your administrator." => "Bitte lade die Dateien einzeln in kleineren Teilen 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" => "Der Link (href) wurde nicht angegeben um die Applikation per http zu installieren", +"No href specified when installing app from http" => "Für die Installation der Applikation über http wurde keine Quelle (href) angegeben", "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 Archiv 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 can't be installed because of not allowed code in the App" => "Die Applikation kann auf Grund von unerlaubtem Code nicht installiert werden", "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 can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" => "Die Applikation konnte nicht installiert werden, da diese das <shipped>true</shipped> Tag beinhaltet und dieses, bei nicht mitausgelieferten Applikationen, nicht erlaubt ist ist", +"App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" => "Die Applikation konnte nicht installiert werden, da diese das <shipped>true</shipped> Tag beinhaltet und dieses, bei nicht mitausgelieferten Applikationen, nicht erlaubt ist", "App can't be installed because the version in info.xml/version is not the same as the version reported from the app store" => "Die Applikation konnte nicht installiert werden, da die Version in der info.xml nicht die gleiche Version wie im App-Store ist", "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", +"Can't create app folder. Please fix permissions. %s" => "Es kann kein Applikationsordner erstellt werden. Bitte passe 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/eu.php b/lib/l10n/eu.php index f28a77eeb03..67a80d90caa 100644 --- a/lib/l10n/eu.php +++ b/lib/l10n/eu.php @@ -1,17 +1,34 @@ <?php $TRANSLATIONS = array( +"App \"%s\" can't be installed because it is not compatible with this version of ownCloud." => "\"%s\" Aplikazioa ezin da instalatu ownCloud bertsio honekin bateragarria ez delako", +"No app name specified" => "Ez da aplikazioaren izena zehaztu", "Help" => "Laguntza", "Personal" => "Pertsonala", "Settings" => "Ezarpenak", "Users" => "Erabiltzaileak", "Admin" => "Admin", "Failed to upgrade \"%s\"." => "Ezin izan da \"%s\" eguneratu.", +"Unknown filetype" => "Fitxategi mota ezezaguna", +"Invalid image" => "Baliogabeko irudia", "web services under your control" => "web zerbitzuak zure kontrolpean", "cannot open \"%s\"" => "ezin da \"%s\" ireki", "ZIP download is turned off." => "ZIP deskarga ez dago gaituta.", "Files need to be downloaded one by one." => "Fitxategiak banan-banan deskargatu behar dira.", "Back to Files" => "Itzuli fitxategietara", "Selected files too large to generate zip file." => "Hautatuko fitxategiak oso handiak dira zip fitxategia sortzeko.", +"Please download the files separately in smaller chunks or kindly ask your administrator." => "Mesedez deskargatu fitzategiak zati txikiagoetan, banan-banan edo eskatu mesedez zure administradoreari.", +"No source specified when installing app" => "Ez da jatorririk zehaztu aplikazioa instalatzerakoan", +"No href specified when installing app from http" => "Ez da href parametrorik zehaztu http bidez aplikazioa instalatzerakoan", +"No path specified when installing app from local file" => "Ez da kokalekurik zehaztu fitxategi lokal moduan aplikazioa instalatzerakoan", +"Archives of type %s are not supported" => "%s motako fitxategiak ez dira onartzen", +"Failed to open archive when installing app" => "Fitxategia irekitzeak huts egin du aplikazioa instalatzerakoan", +"App does not provide an info.xml file" => "Aplikazioak ez du info.xml fitxategia", +"App can't be installed because of not allowed code in the App" => "Aplikazioa ezin da instalatu bertan duen baimendu gabeko kodea dela eta", +"App can't be installed because it is not compatible with this version of ownCloud" => "Aplikazioa ezin da instalatu ownCloud bertsio honekin bateragarria ez delako", +"App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" => "Aplikazioa ezin da instalatu <shipped>true</shipped> etiketa duelako eta etiketa hau ez da onartzen banaketan ez datozen aplikazioetan", +"App can't be installed because the version in info.xml/version is not the same as the version reported from the app store" => "Aplikazioa ezin da instalatu info.xml/version bertsioa ez delako \"app store\"an jartzen duenaren berdina", +"App directory already exists" => "Aplikazioaren karpeta dagoeneko existitzen da", +"Can't create app folder. Please fix permissions. %s" => "Ezin izan da aplikazioaren karpeta sortu. Mesdez konpondu baimenak. %s", "Application is not enabled" => "Aplikazioa ez dago gaituta", "Authentication error" => "Autentifikazio errorea", "Token expired. Please reload page." => "Tokena iraungitu da. Mesedez birkargatu orria.", diff --git a/lib/private/backgroundjob/job.php b/lib/private/backgroundjob/job.php index 49fbffbd684..92bd0f8fdbd 100644 --- a/lib/private/backgroundjob/job.php +++ b/lib/private/backgroundjob/job.php @@ -9,16 +9,35 @@ namespace OC\BackgroundJob; abstract class Job { + /** + * @var int $id + */ protected $id; + + /** + * @var int $lastRun + */ protected $lastRun; + + /** + * @var mixed $argument + */ protected $argument; /** * @param JobList $jobList + * @param \OC\Log $logger */ - public function execute($jobList) { + public function execute($jobList, $logger = null) { $jobList->setLastRun($this); - $this->run($this->argument); + try { + $this->run($this->argument); + } catch (\Exception $e) { + if ($logger) { + $logger->error('Error while running background job: ' . $e->getMessage()); + } + $jobList->remove($this, $this->argument); + } } abstract protected function run($argument); diff --git a/lib/private/backgroundjob/queuedjob.php b/lib/private/backgroundjob/queuedjob.php index 1714182820d..799eac47848 100644 --- a/lib/private/backgroundjob/queuedjob.php +++ b/lib/private/backgroundjob/queuedjob.php @@ -20,9 +20,10 @@ abstract class QueuedJob extends Job { * run the job, then remove it from the joblist * * @param JobList $jobList + * @param \OC\Log $logger */ - public function execute($jobList) { + public function execute($jobList, $logger = null) { $jobList->remove($this); - $this->run($this->argument); + parent::execute($jobList, $logger); } } diff --git a/lib/private/backgroundjob/timedjob.php b/lib/private/backgroundjob/timedjob.php index ae9f33505ab..09e05f1d846 100644 --- a/lib/private/backgroundjob/timedjob.php +++ b/lib/private/backgroundjob/timedjob.php @@ -31,11 +31,11 @@ abstract class TimedJob extends Job { * run the job if * * @param JobList $jobList + * @param \OC\Log $logger */ - public function execute($jobList) { + public function execute($jobList, $logger = null) { if ((time() - $this->lastRun) > $this->interval) { - $jobList->setLastRun($this); - $this->run($this->argument); + parent::execute($jobList, $logger); } } } diff --git a/lib/private/files.php b/lib/private/files.php index 8b8ff81ec5e..6ffa14c0d91 100644 --- a/lib/private/files.php +++ b/lib/private/files.php @@ -109,6 +109,9 @@ class OC_Files { $zip = false; $filename = $dir . '/' . $files; $name = $files; + if ($xsendfile && OC_App::isEnabled('files_encryption')) { + $xsendfile = false; + } } OC_Util::obEnd(); if ($zip or \OC\Files\Filesystem::isReadable($filename)) { diff --git a/lib/private/files/cache/cache.php b/lib/private/files/cache/cache.php index ac50a988e32..8e682a96b75 100644 --- a/lib/private/files/cache/cache.php +++ b/lib/private/files/cache/cache.php @@ -178,6 +178,10 @@ class Cache { if ($file['storage_mtime'] == 0) { $file['storage_mtime'] = $file['mtime']; } + if ($file['encrypted']) { + $file['encrypted_size'] = $file['size']; + $file['size'] = $file['unencrypted_size']; + } } return $files; } else { diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php index 34184c68c64..a8c069ee99f 100644 --- a/lib/private/files/cache/scanner.php +++ b/lib/private/files/cache/scanner.php @@ -286,7 +286,7 @@ class Scanner extends BasicEmitter { public function backgroundScan() { $lastPath = null; while (($path = $this->cache->getIncomplete()) !== false && $path !== $lastPath) { - $this->scan($path); + $this->scan($path, self::SCAN_RECURSIVE, self::REUSE_ETAG); $this->cache->correctFolderSize($path); $lastPath = $path; } diff --git a/lib/private/l10n.php b/lib/private/l10n.php index 2d440850459..98665c84c55 100644 --- a/lib/private/l10n.php +++ b/lib/private/l10n.php @@ -262,7 +262,7 @@ class OC_L10N implements \OCP\IL10N { */ public function n($text_singular, $text_plural, $count, $parameters = array()) { $this->init(); - $identifier = "_${text_singular}__${text_plural}_"; + $identifier = "_${text_singular}_::_${text_plural}_"; if( array_key_exists($identifier, $this->translations)) { return new OC_L10N_String( $this, $identifier, $parameters, $count ); } diff --git a/lib/public/share.php b/lib/public/share.php index 6dbcd5b67bf..6b3397c85c6 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -423,11 +423,13 @@ class Share { * @param string Item source * @param string Owner * @param bool Include collections + * @praram bool check expire date * @return Return array of users */ - public static function getUsersItemShared($itemType, $itemSource, $uidOwner, $includeCollections = false) { + public static function getUsersItemShared($itemType, $itemSource, $uidOwner, $includeCollections = false, $checkExpireDate = true) { + $users = array(); - $items = self::getItems($itemType, $itemSource, null, null, $uidOwner, self::FORMAT_NONE, null, -1, $includeCollections); + $items = self::getItems($itemType, $itemSource, null, null, $uidOwner, self::FORMAT_NONE, null, -1, $includeCollections, false, $checkExpireDate); if ($items) { foreach ($items as $item) { if ((int)$item['share_type'] === self::SHARE_TYPE_USER) { @@ -866,12 +868,14 @@ class Share { protected static function unshareItem(array $item) { // Pass all the vars we have for now, they may be useful $hookParams = array( - 'itemType' => $item['item_type'], - 'itemSource' => $item['item_source'], - 'shareType' => $item['share_type'], - 'shareWith' => $item['share_with'], - 'itemParent' => $item['parent'], + 'itemType' => $item['item_type'], + 'itemSource' => $item['item_source'], + 'shareType' => $item['share_type'], + 'shareWith' => $item['share_with'], + 'itemParent' => $item['parent'], + 'uidOwner' => $item['uid_owner'], ); + \OC_Hook::emit('OCP\Share', 'pre_unshare', $hookParams + array( 'fileSource' => $item['file_source'], )); @@ -961,6 +965,7 @@ class Share { * @param int Number of items to return, -1 to return all matches (optional) * @param bool Include collection item types (optional) * @param bool TODO (optional) + * @prams bool check expire date * @return mixed * * See public functions getItem(s)... for parameter usage @@ -968,7 +973,7 @@ class Share { */ private static function getItems($itemType, $item = null, $shareType = null, $shareWith = null, $uidOwner = null, $format = self::FORMAT_NONE, $parameters = null, $limit = -1, - $includeCollections = false, $itemShareWithBySource = false) { + $includeCollections = false, $itemShareWithBySource = false, $checkExpireDate = true) { if (!self::isEnabled()) { if ($limit == 1 || (isset($uidOwner) && isset($item))) { return false; @@ -1108,19 +1113,19 @@ class Share { if ($format == self::FORMAT_STATUSES) { if ($itemType == 'file' || $itemType == 'folder') { $select = '`*PREFIX*share`.`id`, `item_type`, `item_source`, `*PREFIX*share`.`parent`,' - .' `share_type`, `file_source`, `path`, `expiration`, `storage`, `mail_send`'; + .' `share_type`, `file_source`, `path`, `expiration`, `storage`, `share_with`, `mail_send`, `uid_owner`'; } else { - $select = '`id`, `item_type`, `item_source`, `parent`, `share_type`, `expiration`, `mail_send`'; + $select = '`id`, `item_type`, `item_source`, `parent`, `share_type`, `share_with`, `expiration`, `mail_send`, `uid_owner`'; } } else { if (isset($uidOwner)) { if ($itemType == 'file' || $itemType == 'folder') { $select = '`*PREFIX*share`.`id`, `item_type`, `item_source`, `*PREFIX*share`.`parent`,' .' `share_type`, `share_with`, `file_source`, `path`, `permissions`, `stime`,' - .' `expiration`, `token`, `storage`, `mail_send`'; + .' `expiration`, `token`, `storage`, `mail_send`, `uid_owner`'; } else { $select = '`id`, `item_type`, `item_source`, `parent`, `share_type`, `share_with`, `permissions`,' - .' `stime`, `file_source`, `expiration`, `token`, `mail_send`'; + .' `stime`, `file_source`, `expiration`, `token`, `mail_send`, `uid_owner`'; } } else { if ($fileDependent) { @@ -1234,8 +1239,10 @@ class Share { } } } - if (self::expireItem($row)) { - continue; + if($checkExpireDate) { + if (self::expireItem($row)) { + continue; + } } // Check if resharing is allowed, if not remove share permission if (isset($row['permissions']) && !self::isResharingAllowed()) { |