diff options
author | Florin Peter <github@florin-peter.de> | 2013-05-20 02:25:56 +0200 |
---|---|---|
committer | Florin Peter <github@florin-peter.de> | 2013-05-20 02:25:56 +0200 |
commit | 31037241e11122203f2ea73b6c1b126a14bfdae2 (patch) | |
tree | c783857d7a61c48d913a252fb05e99e6389fb937 /lib | |
parent | 58a8d67a9b3c48567bcc40cc02444311c6773275 (diff) | |
parent | 71668cf08a57742c0a585c9e2fe7e4bb0ea08165 (diff) | |
download | nextcloud-server-31037241e11122203f2ea73b6c1b126a14bfdae2.tar.gz nextcloud-server-31037241e11122203f2ea73b6c1b126a14bfdae2.zip |
Merge branch 'master' into files_encryption
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base.php | 10 | ||||
-rw-r--r-- | lib/files/cache/backgroundwatcher.php | 4 | ||||
-rw-r--r-- | lib/l10n/et_EE.php | 2 | ||||
-rw-r--r-- | lib/l10n/nn_NO.php | 2 | ||||
-rw-r--r-- | lib/user.php | 4 | ||||
-rw-r--r-- | lib/vobject/compoundproperty.php | 70 |
6 files changed, 82 insertions, 10 deletions
diff --git a/lib/base.php b/lib/base.php index 667202d3aef..7d7e690aa6f 100644 --- a/lib/base.php +++ b/lib/base.php @@ -542,10 +542,12 @@ class OC { * register hooks for sharing */ public static function registerShareHooks() { - OC_Hook::connect('OC_User', 'post_deleteUser', 'OCP\Share', 'post_deleteUser'); - OC_Hook::connect('OC_User', 'post_addToGroup', 'OCP\Share', 'post_addToGroup'); - OC_Hook::connect('OC_User', 'post_removeFromGroup', 'OCP\Share', 'post_removeFromGroup'); - OC_Hook::connect('OC_User', 'post_deleteGroup', 'OCP\Share', 'post_deleteGroup'); + if(\OC_Config::getValue('installed')) { + OC_Hook::connect('OC_User', 'post_deleteUser', 'OCP\Share', 'post_deleteUser'); + OC_Hook::connect('OC_User', 'post_addToGroup', 'OCP\Share', 'post_addToGroup'); + OC_Hook::connect('OC_User', 'post_removeFromGroup', 'OCP\Share', 'post_removeFromGroup'); + OC_Hook::connect('OC_User', 'post_deleteGroup', 'OCP\Share', 'post_deleteGroup'); + } } /** diff --git a/lib/files/cache/backgroundwatcher.php b/lib/files/cache/backgroundwatcher.php index 7549745e7d7..8933101577d 100644 --- a/lib/files/cache/backgroundwatcher.php +++ b/lib/files/cache/backgroundwatcher.php @@ -30,7 +30,7 @@ class BackgroundWatcher { return; } list($storageId, $internalPath) = $cacheItem; - $mounts = Mount::findByStorageId($storageId); + $mounts = Filesystem::getMountByStorageId($storageId); if (count($mounts) === 0) { //if the storage we need isn't mounted on default, try to find a user that has access to the storage @@ -40,7 +40,7 @@ class BackgroundWatcher { return; } Filesystem::initMountPoints($users[0]); - $mounts = Mount::findByStorageId($storageId); + $mounts = Filesystem::getMountByStorageId($storageId); if (count($mounts) === 0) { return; } diff --git a/lib/l10n/et_EE.php b/lib/l10n/et_EE.php index 90c9c416827..a4423343ce0 100644 --- a/lib/l10n/et_EE.php +++ b/lib/l10n/et_EE.php @@ -9,7 +9,7 @@ "Files need to be downloaded one by one." => "Failid tuleb alla laadida ükshaaval.", "Back to Files" => "Tagasi failide juurde", "Selected files too large to generate zip file." => "Valitud failid on ZIP-faili loomiseks liiga suured.", -"couldn't be determined" => "Ei suuda tuvastada", +"couldn't be determined" => "ei suudetud tuvastada", "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/nn_NO.php b/lib/l10n/nn_NO.php index f8f15c9fba6..8241573f9ae 100644 --- a/lib/l10n/nn_NO.php +++ b/lib/l10n/nn_NO.php @@ -3,7 +3,7 @@ "Personal" => "Personleg", "Settings" => "Innstillingar", "Users" => "Brukarar", -"Apps" => "Applikasjonar", +"Apps" => "Program", "Admin" => "Administrer", "Authentication error" => "Feil i autentisering", "Files" => "Filer", diff --git a/lib/user.php b/lib/user.php index 833e8866592..2bd11022e26 100644 --- a/lib/user.php +++ b/lib/user.php @@ -32,7 +32,7 @@ * post_deleteUser(uid) * pre_setPassword(&run, uid, password) * post_setPassword(uid, password) - * pre_login(&run, uid) + * pre_login(&run, uid, password) * post_login(uid) * logout() */ @@ -244,7 +244,7 @@ class OC_User { */ public static function login( $uid, $password ) { $run = true; - OC_Hook::emit( "OC_User", "pre_login", array( "run" => &$run, "uid" => $uid )); + OC_Hook::emit( "OC_User", "pre_login", array( "run" => &$run, "uid" => $uid, "password" => $password)); if( $run ) { $uid = self::checkPassword( $uid, $password ); diff --git a/lib/vobject/compoundproperty.php b/lib/vobject/compoundproperty.php new file mode 100644 index 00000000000..d702ab802e0 --- /dev/null +++ b/lib/vobject/compoundproperty.php @@ -0,0 +1,70 @@ +<?php +/** + * ownCloud - VObject Compound Property + * + * @author Thomas Tanghus + * @author Evert Pot (http://www.rooftopsolutions.nl/) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + * + */ + +namespace OC\VObject; + +/** + * This class overrides \Sabre\VObject\Property::serialize() to not + * double escape commas and semi-colons in compound properties. +*/ +class CompoundProperty extends \Sabre\VObject\Property\Compound { + + /** + * Turns the object back into a serialized blob. + * + * @return string + */ + public function serialize() { + + $str = $this->name; + if ($this->group) { + $str = $this->group . '.' . $this->name; + } + + foreach($this->parameters as $param) { + $str.=';' . $param->serialize(); + } + $src = array( + "\n", + ); + $out = array( + '\n', + ); + $str.=':' . str_replace($src, $out, $this->value); + + $out = ''; + while(strlen($str) > 0) { + if (strlen($str) > 75) { + $out .= mb_strcut($str, 0, 75, 'utf-8') . "\r\n"; + $str = ' ' . mb_strcut($str, 75, strlen($str), 'utf-8'); + } else { + $out .= $str . "\r\n"; + $str = ''; + break; + } + } + + return $out; + + } + +}
\ No newline at end of file |