diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-02-22 22:59:09 +0100 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-02-22 22:59:09 +0100 |
commit | 9898ba4daf1acdead2ed5fa6024e779caafb353e (patch) | |
tree | 3fc02fea4997344c73e0bc5ac7bdfc5616d7a7df /lib | |
parent | 5062ae250b767867609f64c29ab4cde65f022b75 (diff) | |
parent | 78fce834058a38a7dbcc5310e16095c743434bc6 (diff) | |
download | nextcloud-server-9898ba4daf1acdead2ed5fa6024e779caafb353e.tar.gz nextcloud-server-9898ba4daf1acdead2ed5fa6024e779caafb353e.zip |
Merge branch 'master' into master-sqlserver
Conflicts:
core/templates/installation.php
Diffstat (limited to 'lib')
-rw-r--r-- | lib/files/filesystem.php | 27 | ||||
-rw-r--r-- | lib/group.php | 15 | ||||
-rw-r--r-- | lib/group/database.php | 2 | ||||
-rw-r--r-- | lib/image.php | 15 | ||||
-rw-r--r-- | lib/l10n/de.php | 6 | ||||
-rw-r--r-- | lib/l10n/de_DE.php | 4 | ||||
-rw-r--r-- | lib/l10n/my_MM.php | 30 | ||||
-rw-r--r-- | lib/setup.php | 3 | ||||
-rwxr-xr-x | lib/util.php | 11 |
9 files changed, 84 insertions, 29 deletions
diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php index 875a9d6c5ee..401ee8417e5 100644 --- a/lib/files/filesystem.php +++ b/lib/files/filesystem.php @@ -219,11 +219,14 @@ class Filesystem { } $parser = new \OC\ArrayParser(); + $root = \OC_User::getHome($user); + self::mount('\OC\Files\Storage\Local', array('datadir' => $root), $user); + // Load system mount points if (is_file(\OC::$SERVERROOT . '/config/mount.php') or is_file(\OC::$SERVERROOT . '/config/mount.json')) { - if(is_file(\OC::$SERVERROOT . '/config/mount.json')){ + if (is_file(\OC::$SERVERROOT . '/config/mount.json')) { $mountConfig = json_decode(file_get_contents(\OC::$SERVERROOT . '/config/mount.json'), true); - }elseif(is_file(\OC::$SERVERROOT . '/config/mount.php')){ + } elseif (is_file(\OC::$SERVERROOT . '/config/mount.php')) { $mountConfig = $parser->parsePHP(file_get_contents(\OC::$SERVERROOT . '/config/mount.php')); } if (isset($mountConfig['global'])) { @@ -259,12 +262,10 @@ class Filesystem { } } // Load personal mount points - $root = \OC_User::getHome($user); - self::mount('\OC\Files\Storage\Local', array('datadir' => $root), $user); if (is_file($root . '/mount.php') or is_file($root . '/mount.json')) { - if (is_file($root . '/mount.json')){ + if (is_file($root . '/mount.json')) { $mountConfig = json_decode(file_get_contents($root . '/mount.json'), true); - } elseif (is_file($root . '/mount.php')){ + } elseif (is_file($root . '/mount.php')) { $mountConfig = $parser->parsePHP(file_get_contents($root . '/mount.php')); } if (isset($mountConfig['user'][$user])) { @@ -389,21 +390,29 @@ class Filesystem { * @param array $data from hook */ static public function isBlacklisted($data) { - $blacklist = \OC_Config::getValue('blacklisted_files', array('.htaccess')); if (isset($data['path'])) { $path = $data['path']; } else if (isset($data['newpath'])) { $path = $data['newpath']; } if (isset($path)) { - $filename = strtolower(basename($path)); - if (in_array($filename, $blacklist)) { + if (self::isFileBlacklisted($path)) { $data['run'] = false; } } } /** + * @param string $filename + * @return bool + */ + static public function isFileBlacklisted($filename) { + $blacklist = \OC_Config::getValue('blacklisted_files', array('.htaccess')); + $filename = strtolower(basename($filename)); + return (in_array($filename, $blacklist)); + } + + /** * following functions are equivalent to their php builtin equivalents for arguments/return values. */ static public function mkdir($path) { diff --git a/lib/group.php b/lib/group.php index 6afe1440030..8c06ddc0fd0 100644 --- a/lib/group.php +++ b/lib/group.php @@ -308,15 +308,16 @@ class OC_Group { * @return array with display names (Key) user ids (value)
*/
public static function displayNamesInGroups($gids, $search = '', $limit = -1, $offset = 0) {
- $displayNames = array();
+ $displayNames = array(); foreach ($gids as $gid) {
// TODO Need to apply limits to groups as total
- $displayNames = array_merge( - array_diff( - self::displayNamesInGroup($gid, $search, $limit, $offset), - $displayNames - ), - $displayNames); + $diff = array_diff( + self::displayNamesInGroup($gid, $search, $limit, $offset), + $displayNames + ); + if ($diff) { + $displayNames = array_merge($diff, $displayNames); + } }
return $displayNames;
} diff --git a/lib/group/database.php b/lib/group/database.php index 8816dd8169c..93dc05c53a1 100644 --- a/lib/group/database.php +++ b/lib/group/database.php @@ -225,7 +225,7 @@ class OC_Group_Database extends OC_Group_Backend { $stmt = OC_DB::prepare('SELECT `*PREFIX*users`.`uid`, `*PREFIX*users`.`displayname`' .' FROM `*PREFIX*users`' .' INNER JOIN `*PREFIX*group_user` ON `*PREFIX*group_user`.`uid` = `*PREFIX*users`.`uid`' - .' WHERE `gid` = ? AND `*PREFIX*group_user.uid` LIKE ?', + .' WHERE `gid` = ? AND `*PREFIX*group_user`.`uid` LIKE ?', $limit, $offset); $result = $stmt->execute(array($gid, $search.'%'));
diff --git a/lib/image.php b/lib/image.php index 7b0cbefd657..dc1c6df85ae 100644 --- a/lib/image.php +++ b/lib/image.php @@ -702,6 +702,13 @@ class OC_Image { return false; } + // preserve transparency + if($this->imagetype == IMAGETYPE_GIF or $this->imagetype == IMAGETYPE_PNG) { + imagecolortransparent($process, imagecolorallocatealpha($process, 0, 0, 0, 127)); + imagealphablending($process, false); + imagesavealpha($process, true); + } + imagecopyresampled($process, $this->resource, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig); if ($process == false) { OC_Log::write('core', __METHOD__.'(): Error resampling process image '.$width.'x'.$height, OC_Log::ERROR); @@ -751,6 +758,14 @@ class OC_Image { imagedestroy($process); return false; } + + // preserve transparency + if($this->imagetype == IMAGETYPE_GIF or $this->imagetype == IMAGETYPE_PNG) { + imagecolortransparent($process, imagecolorallocatealpha($process, 0, 0, 0, 127)); + imagealphablending($process, false); + imagesavealpha($process, true); + } + imagecopyresampled($process, $this->resource, 0, 0, $x, $y, $targetWidth, $targetHeight, $width, $height); if ($process == false) { OC_Log::write('core', diff --git a/lib/l10n/de.php b/lib/l10n/de.php index 0ad254ad844..87b0b29469c 100644 --- a/lib/l10n/de.php +++ b/lib/l10n/de.php @@ -9,7 +9,7 @@ "Files need to be downloaded one by one." => "Die Dateien müssen einzeln heruntergeladen werden.", "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.", -"couldn't be determined" => "Konnte nicht festgestellt werden", +"couldn't be determined" => "konnte nicht festgestellt werden", "Application is not enabled" => "Die Anwendung ist nicht aktiviert", "Authentication error" => "Authentifizierungs-Fehler", "Token expired. Please reload page." => "Token abgelaufen. Bitte lade die Seite neu.", @@ -18,7 +18,7 @@ "Images" => "Bilder", "Set an admin username." => "Setze Administrator Benutzername.", "Set an admin password." => "Setze Administrator Passwort", -"Specify a data folder." => "Datei-Verzeichnis angeben", +"Specify a data folder." => "Datei-Verzeichnis angeben.", "%s enter the database username." => "%s gib den Datenbank-Benutzernamen an.", "%s enter the database name." => "%s gib den Datenbank-Namen an.", "%s you may not use dots in the database name" => "%s Der Datenbank-Name darf keine Punkte enthalten", @@ -32,7 +32,7 @@ "MySQL user '%s'@'localhost' exists already." => "MySQL Benutzer '%s'@'localhost' existiert bereits.", "Drop this user from MySQL" => "Lösche diesen Benutzer von MySQL", "MySQL user '%s'@'%%' already exists" => "MySQL Benutzer '%s'@'%%' existiert bereits", -"Drop this user from MySQL." => "Lösche diesen Benutzer von MySQL.", +"Drop this user from MySQL." => "Lösche diesen Benutzer aus MySQL.", "Offending command was: \"%s\", name: %s, password: %s" => "Fehlerhafter Befehl war: \"%s\", Name: %s, Passwort: %s", "Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Dein Web-Server ist noch nicht für Datei-Synchronisation bereit, weil die WebDAV-Schnittstelle vermutlich defekt ist.", "Please double check the <a href='%s'>installation guides</a>." => "Bitte prüfe die <a href='%s'>Instalationsanleitungen</a>.", diff --git a/lib/l10n/de_DE.php b/lib/l10n/de_DE.php index 1f63fdd87b0..d04c691f7ec 100644 --- a/lib/l10n/de_DE.php +++ b/lib/l10n/de_DE.php @@ -30,9 +30,9 @@ "DB Error: \"%s\"" => "DB Fehler: \"%s\"", "Offending command was: \"%s\"" => "Fehlerhafter Befehl war: \"%s\"", "MySQL user '%s'@'localhost' exists already." => "MySQL Benutzer '%s'@'localhost' existiert bereits.", -"Drop this user from MySQL" => "Lösche diesen Benutzer von MySQL", +"Drop this user from MySQL" => "Lösche diesen Benutzer aus MySQL", "MySQL user '%s'@'%%' already exists" => "MySQL Benutzer '%s'@'%%' existiert bereits", -"Drop this user from MySQL." => "Lösche diesen Benutzer von MySQL.", +"Drop this user from MySQL." => "Lösche diesen Benutzer aus MySQL.", "Offending command was: \"%s\", name: %s, password: %s" => "Fehlerhafter Befehl war: \"%s\", Name: %s, Passwort: %s", "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 Datei-Synchronisation bereit, 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'>Instalationsanleitungen</a>.", diff --git a/lib/l10n/my_MM.php b/lib/l10n/my_MM.php new file mode 100644 index 00000000000..cee6f65d22e --- /dev/null +++ b/lib/l10n/my_MM.php @@ -0,0 +1,30 @@ +<?php $TRANSLATIONS = array( +"Help" => "အကူအညီ", +"Users" => "သုံးစွဲသူ", +"Apps" => "Apps", +"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 ဖိုင်အဖြစ်ပြုလုပ်ရန် ရွေးချယ်ထားသောဖိုင်များသည် အရမ်းကြီးလွန်းသည်", +"couldn't be determined" => "မဆုံးဖြတ်နိုင်ပါ။", +"Authentication error" => "ခွင့်ပြုချက်မအောင်မြင်", +"Files" => "ဖိုင်များ", +"Text" => "စာသား", +"Images" => "ပုံရိပ်များ", +"seconds ago" => "စက္ကန့်အနည်းငယ်က", +"1 minute ago" => "၁ မိနစ်အရင်က", +"%d minutes ago" => "%d မိနစ်အရင်က", +"1 hour ago" => "၁ နာရီ အရင်က", +"%d hours ago" => "%d နာရီအရင်က", +"today" => "ယနေ့", +"yesterday" => "မနေ့က", +"%d days ago" => "%d ရက် အရင်က", +"last month" => "ပြီးခဲ့သောလ", +"%d months ago" => "%d လအရင်က", +"last year" => "မနှစ်က", +"years ago" => "နှစ် အရင်က", +"%s is available. Get <a href=\"%s\">more information</a>" => "%s ကိုရရှိနိုင်ပါပြီ။ <a href=\"%s\">နောက်ထပ်အချက်အလက်များ</a>ရယူပါ။", +"up to date" => "နောက်ဆုံးပေါ်", +"updates check is disabled" => "နောက်ဆုံးပေါ်စစ်ဆေးခြင်းကိုပိတ်ထားသည်", +"Could not find category \"%s\"" => "\"%s\"ခေါင်းစဉ်ကို ရှာမတွေ့ပါ" +); diff --git a/lib/setup.php b/lib/setup.php index 21bf928efe4..fd5f3cd5bee 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -846,8 +846,7 @@ class OC_Setup { header("Location: ".OC::$WEBROOT.'/'); } else { - $error = $l->t('Your web server is not yet properly setup to allow files' - .' synchronization because the WebDAV interface seems to be broken.'); + $error = $l->t('Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken.'); $hint = $l->t('Please double check the <a href=\'%s\'>installation guides</a>.', 'http://doc.owncloud.org/server/5.0/admin_manual/installation.html'); diff --git a/lib/util.php b/lib/util.php index b2a4fce65a2..ab47e404c97 100755 --- a/lib/util.php +++ b/lib/util.php @@ -73,9 +73,9 @@ class OC_Util { * @return array */ public static function getVersion() { - // hint: We only can count up. So the internal version number - // of ownCloud 4.5 will be 4.90.0. This is not visible to the user - return array(4, 92, 10); + // hint: We only can count up. Reset minor/patchlevel when + // updating major/minor version number. + return array(4, 93, 10); } /** @@ -83,7 +83,7 @@ class OC_Util { * @return string */ public static function getVersionString() { - return '5.0 alpha 1'; + return '5.0 beta 1'; } /** @@ -562,7 +562,7 @@ class OC_Util { */ public static function isWebDAVWorking() { if (!function_exists('curl_init')) { - return; + return true; } $settings = array( @@ -578,6 +578,7 @@ class OC_Util { } catch(\Sabre_DAV_Exception_NotAuthenticated $e) { $return = true; } catch(\Exception $e) { + OC_Log::write('core', 'isWebDAVWorking: NO - Reason: '.$e, OC_Log::WARN); $return = false; } |