\ No newline at end of file
diff --git a/apps/bookmarks/templates/list.php b/apps/bookmarks/templates/list.php
index 769ad81524..4f101d44f9 100644
--- a/apps/bookmarks/templates/list.php
+++ b/apps/bookmarks/templates/list.php
@@ -1,7 +1,8 @@
-
+
- t('The path to this addressbook is %s', array(OC::$WEBROOT.'/apps/contacts/carddav.php/addressbooks/'.OC_User::getUser().'/'.$_['addressbooks'][0]['uri'])); ?>
+ t('The path to this addressbook is %s', array(((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].OC::$WEBROOT.'/apps/contacts/carddav.php/addressbooks/'.OC_User::getUser().'/'.$_['addressbooks'][0]['uri'])); ?>
diff --git a/apps/contacts/templates/part.details.php b/apps/contacts/templates/part.details.php
index 5048349abc..81b32f2ff5 100644
--- a/apps/contacts/templates/part.details.php
+++ b/apps/contacts/templates/part.details.php
@@ -30,6 +30,6 @@
-
-
+
+
diff --git a/apps/contacts/temporaryupdate.php b/apps/contacts/temporaryupdate.php
deleted file mode 100644
index 4b6453364e..0000000000
--- a/apps/contacts/temporaryupdate.php
+++ /dev/null
@@ -1,33 +0,0 @@
-.
- *
- */
-// Init owncloud
-require_once('../../lib/base.php');
-$connector = new OC_Connector_Sabre_Principal;
-$users = OC_User::getUsers();
-
-foreach($users as $user){
- $foo = $connector->getPrincipalByPath('principals/'.$user);
- if(!isset($foo)){
- OC_Connector_Sabre_Principal::addPrincipal(array('uid'=>$user));
- }
-}
-echo "done";
\ No newline at end of file
diff --git a/apps/files_sharing/ajax/getitem.php b/apps/files_sharing/ajax/getitem.php
index cdb59b9cd1..249af6cfa3 100644
--- a/apps/files_sharing/ajax/getitem.php
+++ b/apps/files_sharing/ajax/getitem.php
@@ -6,17 +6,18 @@ require_once('../lib_share.php');
$userDirectory = "/".OC_User::getUser()."/files";
$source = $userDirectory.$_GET['source'];
-$users = OC_Share::getMySharedItem($source);
$path = $source;
-for ($i = 0; $i < count($users); $i++) {
- if ($users[$i]['uid_shared_with'] == OC_Share::PUBLICLINK) {
- $users[$i]['token'] = OC_Share::getTokenFromSource($source);
+if ($users = OC_Share::getMySharedItem($source)) {
+ for ($i = 0; $i < count($users); $i++) {
+ if ($users[$i]['uid_shared_with'] == OC_Share::PUBLICLINK) {
+ $users[$i]['token'] = OC_Share::getTokenFromSource($source);
+ }
}
}
$source = dirname($source);
while ($source != "" && $source != "/" && $source != "." && $source != $userDirectory) {
- $values = array_values(OC_Share::getMySharedItem($source));
- if (count($values) > 0) {
+ if ($values = OC_Share::getMySharedItem($source)) {
+ $values = array_values($values);
$parentUsers = array();
for ($i = 0; $i < count($values); $i++) {
if ($values[$i]['uid_shared_with'] == OC_Share::PUBLICLINK) {
diff --git a/apps/files_sharing/ajax/share.php b/apps/files_sharing/ajax/share.php
index d9bf4ff7ab..e672cf0240 100644
--- a/apps/files_sharing/ajax/share.php
+++ b/apps/files_sharing/ajax/share.php
@@ -4,20 +4,25 @@ $RUNTIME_NOAPPS = true;
require_once('../../../lib/base.php');
require_once('../lib_share.php');
+$userDirectory = "/".OC_User::getUser()."/files";
$sources = explode(";", $_POST['sources']);
$uid_shared_with = $_POST['uid_shared_with'];
$permissions = $_POST['permissions'];
foreach ($sources as $source) {
+ // Make sure file exists and can be shared
if ($source && OC_FILESYSTEM::file_exists($source) && OC_FILESYSTEM::is_readable($source)) {
- $source = "/".OC_User::getUser()."/files".$source;
- try {
- $shared = new OC_Share($source, $uid_shared_with, $permissions);
- if ($uid_shared_with == OC_Share::PUBLICLINK) {
- echo $shared->getToken();
- }
- } catch (Exception $exception) {
- echo "false";
+ $source = $userDirectory.$source;
+ // If the file doesn't exist, it may be shared with the current user
+ } else if (!$source = OC_Share::getSource($userDirectory.$source)) {
+ echo "false";
+ }
+ try {
+ $shared = new OC_Share($source, $uid_shared_with, $permissions);
+ if ($uid_shared_with == OC_Share::PUBLICLINK) {
+ echo $shared->getToken();
}
+ } catch (Exception $exception) {
+ echo "false";
}
}
diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php
index 771d91b93b..c175142319 100644
--- a/apps/files_sharing/appinfo/app.php
+++ b/apps/files_sharing/appinfo/app.php
@@ -1,9 +1,11 @@
"string"));
+OC::$CLASSPATH['OC_Share'] = "apps/files_sharing/lib_share.php";
+OC_Hook::connect("OC_Filesystem", "post_delete", "OC_Share", "deleteItem");
+OC_Hook::connect("OC_Filesystem", "post_rename", "OC_Share", "renameItem");
+OC_Filesystem::registerStorageType("shared", "OC_Filestorage_Shared", array("datadir" => "string"));
OC_Util::addScript("files_sharing", "share");
OC_Util::addScript("3rdparty", "chosen/chosen.jquery.min");
OC_Util::addStyle( 'files_sharing', 'sharing' );
diff --git a/apps/files_sharing/get.php b/apps/files_sharing/get.php
index e50a319ace..a1b6c316cd 100644
--- a/apps/files_sharing/get.php
+++ b/apps/files_sharing/get.php
@@ -67,7 +67,7 @@ if ($source !== false) {
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Pragma: public");
- header("Content-Disposition: filename='".basename($source)."'");
+ header("Content-Disposition: filename=".basename($source));
header("Content-Type: " . $mimetype);
header("Content-Length: " . OC_Filesystem::filesize($source));
//download the file
@@ -80,4 +80,4 @@ if ($source !== false) {
$tmpl->printPage();
die();
}
-?>
\ No newline at end of file
+?>
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index 1fae8cbdc9..1bd1ac1075 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -117,7 +117,7 @@ $(document).ready(function() {
cache: false,
data: data,
success: function() {
- var option = "";
+ var option = '';
$(user).remove();
$(option).appendTo('#share_with');
$('#share_with').trigger('liszt:updated');
@@ -128,7 +128,7 @@ $(document).ready(function() {
$('#makelink').live('change', function() {
if (this.checked) {
var source = $('#dropdown').data('file');
- var uid_shared_with = "public";
+ var uid_shared_with = 'public';
var permissions = 0;
var data = 'sources='+encodeURIComponent(source)+'&uid_shared_with='+encodeURIComponent(uid_shared_with)+'&permissions='+encodeURIComponent(permissions);
$.ajax({
@@ -144,7 +144,7 @@ $(document).ready(function() {
});
} else {
var source = $('#dropdown').data('file');
- var uid_shared_with = "public";
+ var uid_shared_with = 'public';
var data = 'source='+encodeURIComponent(source)+'&uid_shared_with='+encodeURIComponent(uid_shared_with);
$.ajax({
type: 'GET',
@@ -165,19 +165,19 @@ $(document).ready(function() {
});
function createDropdown(filename, files) {
- var html = "
";
- html += "
";
- html += "";
- html += "
";
- html += "
";
- html += "
";
- html += "";
- //html += "";
- html += " ";
- html += "";
- html += "
";
+ var html = '
';
+ html += '
';
+ html += '';
+ html += '
';
+ html += '
';
+ html += '
';
+ html += '';
+ //html += '';
+ html += ' ';
+ html += '';
+ html += '
';
if (filename) {
$('tr[data-file="'+filename+'"]').addClass('mouseOver');
$(html).appendTo($('tr[data-file="'+filename+'"] td.filename'));
@@ -211,13 +211,13 @@ function createDropdown(filename, files) {
function addUser(uid_shared_with, permissions, parentFolder) {
if (parentFolder) {
- var user = "
Parent folder "+parentFolder+" shared with "+uid_shared_with+"
";
+ var user = '
Parent folder '+parentFolder+' shared with '+uid_shared_with+'
';
} else {
- var checked = ((permissions > 0) ? "checked='checked'" : "style='display:none;'");
- var style = ((permissions == 0) ? "style='display:none;'" : "");
- var user = "
"+uid_shared_with;
- user += "";
- user += "
";
+ var checked = ((permissions > 0) ? 'checked="checked"' : 'style="display:none;"');
+ var style = ((permissions == 0) ? 'style="display:none;"' : '');
+ var user = '
'+uid_shared_with;
+ user += '';
+ user += '
';
}
$('#share_with option[value="'+uid_shared_with+'"]').remove();
$('#share_with').trigger('liszt:updated');
@@ -227,6 +227,6 @@ function addUser(uid_shared_with, permissions, parentFolder) {
function showPublicLink(token) {
$('#makelink').attr('checked', true);
$('#link').data('token', token);
- $('#link').val(parent.location.protocol+"//"+location.host+OC.linkTo('files_sharing','get.php')+'?token='+token);
+ $('#link').val(parent.location.protocol+'//'+location.host+OC.linkTo('files_sharing','get.php')+'?token='+token);
$('#link').show('blind');
}
diff --git a/apps/files_sharing/lib_share.php b/apps/files_sharing/lib_share.php
index df704c131e..978847f4a8 100644
--- a/apps/files_sharing/lib_share.php
+++ b/apps/files_sharing/lib_share.php
@@ -20,9 +20,6 @@
*
*/
-OC_Hook::connect("OC_FILESYSTEM","post_delete", "OC_Share", "deleteItem");
-OC_Hook::connect("OC_FILESYSTEM","post_rename", "OC_Share", "renameItem");
-
/**
* This class manages shared items within the database.
*/
@@ -69,7 +66,8 @@ class OC_Share {
throw new Exception("This item is already shared with ".$uid);
}
// Check if the target already exists for the user, if it does append a number to the name
- $target = "/".$uid."/files/Shared/".basename($source);
+ $sharedFolder = "/".$uid."/files/Shared";
+ $target = $sharedFolder."/".basename($source);
if (self::getSource($target)) {
if ($pos = strrpos($target, ".")) {
$name = substr($target, 0, $pos);
@@ -90,6 +88,9 @@ class OC_Share {
$uid = $uid."@".$gid;
}
$query->execute(array($uid_owner, $uid, $source, $target, $permissions));
+ // Clear the folder size cache for the 'Shared' folder
+ $clearFolderSize = OC_DB::prepare("DELETE FROM *PREFIX*foldersize WHERE path = ?");
+ $clearFolderSize->execute(array($sharedFolder));
}
}
}
@@ -175,8 +176,16 @@ class OC_Share {
public static function getMySharedItem($source) {
$source = self::cleanPath($source);
$query = OC_DB::prepare("SELECT uid_shared_with, permissions FROM *PREFIX*sharing WHERE source = ? AND uid_owner = ?");
- return $query->execute(array($source, OC_User::getUser()))->fetchAll();
+ $result = $query->execute(array($source, OC_User::getUser()))->fetchAll();
+ if (count($result) > 0) {
+ return $result;
+ } else if ($originalSource = self::getSource($source)) {
+ return $query->execute(array($originalSource, OC_User::getUser()))->fetchAll();
+ } else {
+ return false;
+ }
}
+
/**
* Get all items the current user is sharing
* @return An array with all items the user is sharing
@@ -185,7 +194,7 @@ class OC_Share {
$query = OC_DB::prepare("SELECT uid_shared_with, source, permissions FROM *PREFIX*sharing WHERE uid_owner = ?");
return $query->execute(array(OC_User::getUser()))->fetchAll();
}
-
+
/**
* Get the items within a shared folder that have their own entry for the purpose of name, location, or permissions that differ from the folder itself
*
@@ -204,7 +213,7 @@ class OC_Share {
$query = OC_DB::prepare("SELECT uid_owner, source, target, permissions FROM *PREFIX*sharing WHERE SUBSTR(source, 1, ?) = ? OR SUBSTR(target, 1, ?) = ? AND uid_shared_with ".self::getUsersAndGroups());
return $query->execute(array($length, $folder, $length, $folder))->fetchAll();
}
-
+
/**
* Get the source and target parent folders of the specified target location
* @param $target The target location of the item
@@ -301,18 +310,6 @@ class OC_Share {
}
}
- /**
- * Set the source location to a new value
- * @param $oldSource The current source location
- * @param $newTarget The new source location
- */
- public static function setSource($oldSource, $newSource) {
- $oldSource = self::cleanPath($oldSource);
- $newSource = self::cleanPath($newSource);
- $query = OC_DB::prepare("UPDATE *PREFIX*sharing SET source = REPLACE(source, ?, ?) WHERE uid_owner = ?");
- $query->execute(array($oldSource, $newSource, OC_User::getUser()));
- }
-
/**
* Set the target location to a new value
*
@@ -327,7 +324,7 @@ class OC_Share {
$query = OC_DB::prepare("UPDATE *PREFIX*sharing SET target = REPLACE(target, ?, ?) WHERE uid_shared_with ".self::getUsersAndGroups());
$query->execute(array($oldTarget, $newTarget));
}
-
+
/**
* Change the permissions for the specified item and user
*
@@ -342,7 +339,7 @@ class OC_Share {
$query = OC_DB::prepare("UPDATE *PREFIX*sharing SET permissions = ? WHERE SUBSTR(source, 1, ?) = ? AND uid_owner = ? AND uid_shared_with ".self::getUsersAndGroups($uid_shared_with));
$query->execute(array($permissions, strlen($source), $source, OC_User::getUser()));
}
-
+
/**
* Unshare the item, removes it from all specified users
*
@@ -356,13 +353,14 @@ class OC_Share {
$query = OC_DB::prepare("DELETE FROM *PREFIX*sharing WHERE SUBSTR(source, 1, ?) = ? AND uid_owner = ? AND uid_shared_with ".self::getUsersAndGroups($uid_shared_with));
$query->execute(array(strlen($source), $source, OC_User::getUser()));
}
-
+
/**
* Unshare the item from the current user, removes it only from the database and doesn't touch the source file
*
- * You must use the pullOutOfFolder() function to unshare a file inside a shared folder and set $newTarget to nothing
+ * You must use the pullOutOfFolder() function before you call unshareFromMySelf() and set the delete parameter to false to unshare from self a file inside a shared folder
*
* @param $target The target location of the item
+ * @param $delete (Optional) If true delete the entry from the database, if false the permission is set to UNSHARED
*/
public static function unshareFromMySelf($target, $delete = true) {
$target = self::cleanPath($target);
@@ -377,25 +375,23 @@ class OC_Share {
/**
* Remove the item from the database, the owner deleted the file
- * @param $arguments Array of arguments passed from OC_HOOK
+ * @param $arguments Array of arguments passed from OC_Hook
*/
public static function deleteItem($arguments) {
- $source = "/".OC_User::getUser()."/files".$arguments['path'];
- $source = self::cleanPath($source);
+ $source = "/".OC_User::getUser()."/files".self::cleanPath($arguments['path']);
$query = OC_DB::prepare("DELETE FROM *PREFIX*sharing WHERE SUBSTR(source, 1, ?) = ? AND uid_owner = ?");
$query->execute(array(strlen($source), $source, OC_User::getUser()));
}
/**
* Rename the item in the database, the owner renamed the file
- * @param $arguments Array of arguments passed from OC_HOOK
+ * @param $arguments Array of arguments passed from OC_Hook
*/
public static function renameItem($arguments) {
- $oldSource = "/".OC_User::getUser()."/files".$arguments['oldpath'];
- $oldSource = self::cleanPath($oldSource);
- $newSource = "/".OC_User::getUser()."/files".$arguments['newpath'];
- $newSource = self::cleanPath($newSource);
- self::setSource($oldSource, $newSource);
+ $oldSource = "/".OC_User::getUser()."/files".self::cleanPath($arguments['oldpath']);
+ $newSource = "/".OC_User::getUser()."/files".self::cleanPath($arguments['newpath']);
+ $query = OC_DB::prepare("UPDATE *PREFIX*sharing SET source = REPLACE(source, ?, ?) WHERE uid_owner = ?");
+ $query->execute(array($oldSource, $newSource, OC_User::getUser()));
}
}
diff --git a/apps/files_sharing/sharedstorage.php b/apps/files_sharing/sharedstorage.php
index 695fe3160a..53f25b60e9 100644
--- a/apps/files_sharing/sharedstorage.php
+++ b/apps/files_sharing/sharedstorage.php
@@ -79,37 +79,37 @@ class OC_Filestorage_Shared extends OC_Filestorage {
public function opendir($path) {
if ($path == "" || $path == "/") {
- global $FAKEDIRS;
$path = $this->datadir.$path;
$sharedItems = OC_Share::getItemsInFolder($path);
if (empty($sharedItems)) {
return false;
- }
- $files = array();
- foreach ($sharedItems as $item) {
- // If item is in the root of the shared storage provider add it to the fakedirs
- if (dirname($item['target'])."/" == $path) {
- $files[] = basename($item['target']);
+ } else {
+ global $FAKEDIRS;
+ $files = array();
+ foreach ($sharedItems as $item) {
+ // If item is in the root of the shared storage provider and the item exists add it to the fakedirs
+ if (dirname($item['target'])."/" == $path && $this->file_exists(basename($item['target']))) {
+ $files[] = basename($item['target']);
+ }
}
+ $FAKEDIRS['shared'] = $files;
+ return opendir('fakedir://shared');
}
- $FAKEDIRS['shared'] = $files;
- return opendir('fakedir://shared');
} else {
$source = $this->getSource($path);
if ($source) {
$storage = OC_Filesystem::getStorage($source);
$dh = $storage->opendir($this->getInternalPath($source));
- // Remove any duplicate or trailing '/'
- $path = rtrim($this->datadir.$path, "/");
- $path = preg_replace('{(/)\1+}', "/", $path);
$modifiedItems = OC_Share::getItemsInFolder($source);
if ($modifiedItems && $dh) {
- global $FAKEDIRS;
$sources = array();
$targets = array();
+ // Remove any duplicate or trailing '/'
+ $path = preg_replace('{(/)\1+}', "/", $path);
+ $targetFolder = rtrim($this->datadir.$path, "/");
foreach ($modifiedItems as $item) {
- // If the item is in the current directory and has a different name than the source, add it to the arrays
- if (dirname($item['target']) == $path) {
+ // If the item is in the current directory and the item exists add it to the arrays
+ if (dirname($item['target']) == $targetFolder && $this->file_exists($path."/".basename($item['target']))) {
// If the item was unshared from self, add it it to the arrays
if ($item['permissions'] == OC_Share::UNSHARED) {
$sources[] = basename($item['source']);
@@ -124,6 +124,7 @@ class OC_Filestorage_Shared extends OC_Filestorage {
if (empty($sources)) {
return $dh;
} else {
+ global $FAKEDIRS;
$files = array();
while (($filename = readdir($dh)) !== false) {
if ($filename != "." && $filename != "..") {
@@ -210,7 +211,6 @@ class OC_Filestorage_Shared extends OC_Filestorage {
}
public function filesize($path) {
-
if ($path == "" || $path == "/" || $this->is_dir($path)) {
return $this->getFolderSize($path);
} else {
@@ -221,10 +221,14 @@ class OC_Filestorage_Shared extends OC_Filestorage {
}
}
}
-
+
public function getFolderSize($path) {
- $dbpath = OC_User::getUser()."/files/Share/".$path."/";
- $query = OC_DB::prepare("SELECT size FROM *PREFIX*foldersize WHERE path=?");
+ // Shared folder sizes are cached separately from the source folder sizes because folders can have different names
+ $path = rtrim($path, "/");
+ $path = ltrim($path, "/");
+ $path = preg_replace('{(/)\1+}', "/", $path);
+ $dbpath = rtrim($this->datadir.$path, "/");
+ $query = OC_DB::prepare("SELECT size FROM *PREFIX*foldersize WHERE path = ?");
$size = $query->execute(array($dbpath))->fetchAll();
if (count($size) > 0) {
return $size[0]['size'];
@@ -233,19 +237,15 @@ class OC_Filestorage_Shared extends OC_Filestorage {
}
}
- public function calculateFolderSize($path) {
+ private function calculateFolderSize($path) {
if ($this->is_file($path)) {
$path = dirname($path);
}
- $path = str_replace("//", "/", $path);
- if ($this->is_dir($path) && substr($path, -1) != "/") {
- $path .= "/";
- }
$size = 0;
if ($dh = $this->opendir($path)) {
while (($filename = readdir($dh)) !== false) {
if ($filename != "." && $filename != "..") {
- $subFile = $path.$filename;
+ $subFile = $path."/".$filename;
if ($this->is_file($subFile)) {
$size += $this->filesize($subFile);
} else {
@@ -254,7 +254,7 @@ class OC_Filestorage_Shared extends OC_Filestorage {
}
}
if ($size > 0) {
- $dbpath = OC_User::getUser()."/files/Share/".$path;
+ $dbpath = rtrim($this->datadir.$path, "/");
$query = OC_DB::prepare("INSERT INTO *PREFIX*foldersize VALUES(?,?)");
$result = $query->execute(array($dbpath, $size));
}
@@ -262,16 +262,15 @@ class OC_Filestorage_Shared extends OC_Filestorage {
return $size;
}
- public function clearFolderSizeCache($path){
+ private function clearFolderSizeCache($path) {
+ $path = rtrim($path, "/");
+ $path = preg_replace('{(/)\1+}', "/", $path);
if ($this->is_file($path)) {
$path = dirname($path);
}
- $path = str_replace("//", "/", $path);
- if ($this->is_dir($path) && substr($path, -1) != "/") {
- $path .= "/";
- }
+ $dbpath = rtrim($this->datadir.$path, "/");
$query = OC_DB::prepare("DELETE FROM *PREFIX*foldersize WHERE path = ?");
- $result = $query->execute(array($path));
+ $result = $query->execute(array($dbpath));
if ($path != "/" && $path != "") {
$parts = explode("/", $path);
$part = array_pop($parts);
@@ -391,7 +390,11 @@ class OC_Filestorage_Shared extends OC_Filestorage {
$source = $this->getSource($path);
if ($source) {
$storage = OC_Filesystem::getStorage($source);
- return $storage->file_put_contents($this->getInternalPath($source), $data);
+ $result = $storage->file_put_contents($this->getInternalPath($source), $data);
+ if ($result) {
+ $this->clearFolderSizeCache($path);
+ }
+ return $result;
}
}
}
@@ -459,7 +462,11 @@ class OC_Filestorage_Shared extends OC_Filestorage {
} else {
if ($this->is_writeable($path2)) {
$tmpFile = $this->toTmpFile($path1);
- return $this->fromTmpFile($tmpFile, $path2);
+ $result = $this->fromTmpFile($tmpFile, $path2);
+ if ($result) {
+ $this->clearFolderSizeCache($path2);
+ }
+ return $result;
} else {
return false;
}
@@ -487,18 +494,30 @@ class OC_Filestorage_Shared extends OC_Filestorage {
$source = $this->getSource($path);
if ($source) {
$storage = OC_Filesystem::getStorage($source);
- return $storage->fromTmpFile($tmpFile, $this->getInternalPath($source));
+ $result = $storage->fromTmpFile($tmpFile, $this->getInternalPath($source));
+ if ($result) {
+ $this->clearFolderSizeCache($path);
+ }
+ return $result;
}
} else {
return false;
}
}
- public function fromUploadedFile($tmpPath, $path) {
- $source = $this->getSource($tmpPath);
- if ($source) {
- $storage = OC_Filesystem::getStorage($source);
- return $storage->fromUploadedFile($this->getInternalPath($source), $path);
+ public function fromUploadedFile($tmpFile, $path) {
+ if ($this->is_writeable($path)) {
+ $source = $this->getSource($path);
+ if ($source) {
+ $storage = OC_Filesystem::getStorage($source);
+ $result = $storage->fromUploadedFile($tmpFile, $this->getInternalPath($source));
+ if ($result) {
+ $this->clearFolderSizeCache($path);
+ }
+ return $result;
+ }
+ } else {
+ return false;
}
}
@@ -510,50 +529,6 @@ class OC_Filestorage_Shared extends OC_Filestorage {
}
}
- public function delTree($path) {
- $target = $this->datadir.$path;
- if (OC_Share::getPermissions($target) & OC_Share::DELETE) {
- $source = $this->getSource($path);
- if ($source) {
- $storage = OC_Filesystem::getStorage($source);
- return $storage->delTree($this->getInternalPath($source));
- }
- } else {
- // Check if the folder is inside a shared folder
- if (OC_Share::getParentFolders($target)) {
- // If entry for folder already exists
- if (OC_Share::getItem($target)) {
- OC_Share::setTarget($target, "/");
- } else {
- OC_Share::pullOutOfFolder($target, "/");
- // Call setTarget in case there are any database entries for items inside this folder
- OC_Share::setTarget($target, "/");
- }
- // Delete the database entry
- } else {
- OC_Share::unshareFromMySelf($target);
- }
- $this->clearFolderSizeCache($this->getInternalPath($target));
- return true;
- }
- }
-
- public function find($path) {
- $source = $this->getSource($path);
- if ($source) {
- $storage = OC_Filesystem::getStorage($source);
- return $storage->find($this->getInternalPath($source));
- }
- }
-
- public function getTree($path) {
- $source = $this->getSource($path);
- if ($source) {
- $storage = OC_Filesystem::getStorage($source);
- return $storage->getTree($this->getInternalPath($source));
- }
- }
-
public function hash($type, $path, $raw) {
$source = $this->getSource($path);
if ($source) {
@@ -570,9 +545,33 @@ class OC_Filestorage_Shared extends OC_Filestorage {
}
}
- // TODO query all shared files?
- public function search($query) {
-
+ public function search($query) {
+ return $this->searchInDir($query);
+ }
+
+ private function searchInDir($query, $path = "") {
+ $files = array();
+ if ($dh = $this->opendir($path)) {
+ while (($filename = readdir($dh)) !== false) {
+ if ($filename != "." && $filename != "..") {
+ if (strstr(strtolower($filename), strtolower($query))) {
+ $files[] = $path."/".$filename;
+ }
+ if ($this->is_dir($path."/".$filename)) {
+ $files = array_merge($files, $this->searchInDir($query, $path."/".$filename));
+ }
+ }
+ }
+ }
+ return $files;
+ }
+
+ public function getLocalFile($path) {
+ $source = $this->getSource($path);
+ if ($source) {
+ $storage = OC_Filesystem::getStorage($source);
+ return $storage->getLocalFile($this->getInternalPath($source));
+ }
}
}
diff --git a/apps/files_textviewer/js/textviewer.js b/apps/files_textviewer/js/textviewer.js
index b1a564df9b..143c97c9d4 100644
--- a/apps/files_textviewer/js/textviewer.js
+++ b/apps/files_textviewer/js/textviewer.js
@@ -122,10 +122,9 @@ $(document).ready(function() {
a.data('file',text);
a.attr('href','#');
a.click(function(){
- var file=$(this).data('file');
- var text=file.split('/').pop();
- var dir=file.substr(0,file.length-file.length-1);
- TextViewer.showText(dir,text);
+ var file=text.split('/').pop();
+ var dir=text.substr(0,text.length-file.length-1);
+ TextViewer.showText(dir,file);
});
}
});
diff --git a/apps/media/ajax/api.php b/apps/media/ajax/api.php
index a9bd4f745a..3b4932728d 100644
--- a/apps/media/ajax/api.php
+++ b/apps/media/ajax/api.php
@@ -56,7 +56,6 @@ OC_MEDIA_COLLECTION::$uid=OC_User::getUser();
if($arguments['action']){
switch($arguments['action']){
case 'delete':
- unset($_SESSION['collection']);
$path=$arguments['path'];
OC_MEDIA_COLLECTION::deleteSongByPath($path);
$paths=explode(PATH_SEPARATOR,OC_Preferences::getValue(OC_User::getUser(),'media','paths',''));
@@ -65,21 +64,13 @@ if($arguments['action']){
OC_Preferences::setValue(OC_User::getUser(),'media','paths',implode(PATH_SEPARATOR,$paths));
}
case 'get_collection':
- if(!isset($_SESSION['collection'])){
- $artists=OC_MEDIA_COLLECTION::getArtists();
- foreach($artists as &$artist){
- $artist['albums']=OC_MEDIA_COLLECTION::getAlbums($artist['artist_id']);
- foreach($artist['albums'] as &$album){
- $album['songs']=OC_MEDIA_COLLECTION::getSongs($artist['artist_id'],$album['album_id']);
- }
- }
-
- $_SESSION['collection']=json_encode($artists);
- }
- echo $_SESSION['collection'];
+ $data=array();
+ $data['artists']=OC_MEDIA_COLLECTION::getArtists();
+ $data['albums']=OC_MEDIA_COLLECTION::getAlbums();
+ $data['songs']=OC_MEDIA_COLLECTION::getSongs();
+ echo json_encode($data);
break;
case 'scan':
- unset($_SESSION['collection']);
OC_DB::beginTransaction();
set_time_limit(0); //recursive scan can take a while
$path=$arguments['path'];
@@ -88,7 +79,6 @@ if($arguments['action']){
flush();
break;
case 'scanFile':
- unset($_SESSION['collection']);
echo (OC_MEDIA_SCANNER::scanFile($arguments['path']))?'true':'false';
break;
case 'get_artists':
diff --git a/apps/media/css/music.css b/apps/media/css/music.css
index f8e41064fd..59d10f74db 100644
--- a/apps/media/css/music.css
+++ b/apps/media/css/music.css
@@ -1,6 +1,21 @@
-#folderlist li { margin-bottom:1em; }
-#folderlist button.prettybutton { font-size:1em; width:10em; }
-li button.right.prettybutton { font-size:1em; }
+#controls ul.jp-controls { padding:0; }
+#controls ul.jp-controls li { display:inline; }
+#controls ul.jp-controls li a { position:absolute; padding:.8em 1em; }
+a.jp-play, a.jp-pause { left:2.5em; }
+a.jp-pause { display:none; }
+a.jp-next { left:5em; }
+
+div.jp-progress { position:absolute; overflow:hidden; top:.5em; left:8em; width:15em; height:1.2em; padding:0; }
+div.jp-seek-bar { background:#eee; width:0; height:100%; cursor:pointer; }
+div.jp-play-bar { background:#ccc; width:0; height:100%; }
+div.jp-seeking-bg { background:url("../img/pbar-ani.gif"); }
+div.jp-current-time,div.jp-duration { position:absolute; font-size:.64em; font-style:oblique; top:1em; left:13.5em; width:22em; }
+div.jp-duration { text-align:right; }
+
+a.jp-mute,a.jp-unmute { left:24em; }
+div.jp-volume-bar { position:absolute; overflow:hidden; background:#eee; width:4em; height:0.4em; cursor:pointer; top:1.3em; left:27em; }
+div.jp-volume-bar-value { background:#ccc; width:0; height:0.4em; }
+
#collection { padding-top:1em; position:relative; width:70em; float:left; }
#collection li.album,#collection li.song { margin-left:3em; }
#leftcontent img.remove { display:none; float:right; cursor:pointer; }
@@ -12,5 +27,14 @@ li button.right.prettybutton { font-size:1em; }
#collection li { padding-right:10px; }
#searchresults input.play, #searchresults input.add { float:left; height:1em; width:1em; }
#collection tr.collapsed td.album, #collection tr.collapsed td.title { color:#ddd; }
-a.expander { float:right; display:block; }
+a.expander { }
tr.active { background-color:#eee; }
+tr.artist, tr.artist td {
+ border-top: 1px solid lightgrey;
+}
+tr.album td.artist {
+ padding-left: 20px;
+}
+tr.song td.artist {
+ padding-left: 40px;
+}
diff --git a/apps/media/css/player.css b/apps/media/css/player.css
index 98a76e82f0..8b13789179 100644
--- a/apps/media/css/player.css
+++ b/apps/media/css/player.css
@@ -1,16 +1 @@
-#controls ul.jp-controls { padding:0; }
-#controls ul.jp-controls li { display:inline; }
-#controls ul.jp-controls li a { position:absolute; padding:.8em 1em; }
-a.jp-play, a.jp-pause { left:2.5em; }
-a.jp-next { left:5em; }
-div.jp-progress { position:absolute; overflow:hidden; top:.5em; left:8em; width:15em; height:1.2em; padding:0; }
-div.jp-seek-bar { background:#eee; width:0; height:100%; cursor:pointer; }
-div.jp-play-bar { background:#ccc; width:0; height:100%; }
-div.jp-seeking-bg { background:url("../img/pbar-ani.gif"); }
-div.jp-current-time,div.jp-duration { position:absolute; font-size:.64em; font-style:oblique; top:1em; left:13.5em; width:22em; }
-div.jp-duration { text-align:right; }
-
-a.jp-mute,a.jp-unmute { left:24em; }
-div.jp-volume-bar { position:absolute; overflow:hidden; background:#eee; width:4em; height:0.4em; cursor:pointer; top:1.3em; left:27em; }
-div.jp-volume-bar-value { background:#ccc; width:0; height:0.4em; }
diff --git a/apps/media/js/collection.js b/apps/media/js/collection.js
index 98d21b236e..405fbbcf4a 100644
--- a/apps/media/js/collection.js
+++ b/apps/media/js/collection.js
@@ -1,5 +1,9 @@
Collection={
artists:[],
+ albums:[],
+ songs:[],
+ artistsById:{},
+ albumsById:{},
loaded:false,
loading:false,
loadedListeners:[],
@@ -12,18 +16,37 @@ Collection={
$.ajax({
url: OC.linkTo('media','ajax/api.php')+'?action=get_collection',
dataType: 'json',
- success: function(collection){
- Collection.artists=collection;
-
- //set the album and artist fieds for the songs
- for(var i=0;i1){
- var expander=$('>');
- expander.data('expanded',true);
- expander.click(function(event){
- var tr=$(this).parent().parent();
- if(expander.data('expanded')){
- Collection.hideArtist(tr.data('artist'));
- }else{
- Collection.showArtist(tr.data('artist'));
- }
- });
- tr.children('td.artist').append(expander);
- }
- }
- if(album.album_name!=lastAlbum){
- tr.find('td.album a').click(function(event){
- event.preventDefault();
- PlayList.add(album,true);
- PlayList.play(0);
- Collection.parent.find('tr').removeClass('active');
- $('tr[data-album="'+album.album_name+'"]').addClass('active');
- });
- tr.find('td.album a').text(album.album_name);
- if(album.songs.length>1){
- var expander=$('>');
- expander.data('expanded',true);
- expander.click(function(event){
- var tr=$(this).parent().parent();
- if(expander.data('expanded')){
- Collection.hideAlbum(tr.data('album'));
- }else{
- Collection.showAlbum(tr.data('album'));
- }
- });
- tr.children('td.album').append(expander);
- }
- }
- tr.attr('data-artist',artist.artist_name);
- tr.attr('data-album',album.album_name);
- lastArtist=artist.artist_name;
- lastAlbum=album.album_name;
-
- Collection.parent.find('tbody').append(tr);
+ $.each(Collection.artists,function(i,artist){
+ if(artist.name && artist.songs.length>0){
+ var tr=template.clone().removeClass('template');
+ tr.find('td.title a').text(artist.songs.length+' '+t('media','songs'));
+ tr.find('td.album a').text(artist.albums.length+' '+t('media','albums'));
+ tr.find('td.artist a').text(artist.name);
+ tr.data('artistData',artist);
+ tr.find('td.artist a').click(function(event){
+ event.preventDefault();
+ PlayList.add(artist);
+ PlayList.play(0);
+ Collection.parent.find('tr').removeClass('active');
+ $('tr[data-artist="'+artist.name+'"]').addClass('active');
});
- Collection.hideAlbum(artist.artist_name,album.album_name);
- });
- Collection.hideArtist(artist.artist_name);
+ var expander=$('>');
+ expander.data('expanded',false);
+ expander.click(function(event){
+ var tr=$(this).parent().parent();
+ if(expander.data('expanded')){
+ Collection.hideArtist(tr.data('artist'));
+ }else{
+ Collection.showArtist(tr.data('artist'));
+ }
+ });
+ tr.find('td.artist').addClass('buttons');
+ Collection.addButtons(tr,artist);
+ tr.children('td.artist').append(expander);
+ tr.attr('data-artist',artist.name);
+ Collection.parent.find('tbody').append(tr);
+ }
});
}
}
},
showArtist:function(artist){
- Collection.parent.find('tr[data-artist="'+artist+'"]').show();
- Collection.parent.find('tr[data-artist="'+artist+'"]').first().removeClass('collapsed');
- Collection.parent.find('tr[data-artist="'+artist+'"] a.expander').data('expanded',true);
- Collection.parent.find('tr[data-artist="'+artist+'"] a.expander').addClass('expanded');
- Collection.parent.find('tr[data-artist="'+artist+'"] a.expander').text('v');
+ var tr=Collection.parent.find('tr[data-artist="'+artist+'"]');
+ var nextRow=tr.next();
+ var artist=tr.data('artistData');
+ var first=true;
+ $.each(artist.albums,function(foo,album){
+ $.each(album.songs,function(i,song){
+ if(first){
+ newRow=tr;
+ }else{
+ var newRow=tr.clone();
+ }
+ if(i==0){
+ newRow.find('td.album a').text(album.name);
+ newRow.find('td.album a').click(function(event){
+ event.preventDefault();
+ PlayList.add(album);
+ PlayList.play(0);
+ Collection.parent.find('tr').removeClass('active');
+ $('tr[data-album="'+album.name+'"]').addClass('active');
+ });
+ }else{
+ newRow.find('.expander').remove();
+ newRow.find('td.album a').text('');
+ }
+ newRow.find('td.title a').text(song.name);
+ Collection.addButtons(newRow,song);
+ newRow.find('td.title a').click(function(event){
+ event.preventDefault();
+ PlayList.add(song);
+ PlayList.play(0);
+ Collection.parent.find('tr').removeClass('active');
+ $('tr[data-title="'+song.name+'"]').addClass('active');
+ });
+ newRow.attr('data-album',album.name);
+ newRow.attr('data-title',song.name);
+ newRow.attr('data-artist',artist.name);
+ if(!first){
+ nextRow.before(newRow);
+ }
+ first=false;
+ });
+ });
+ tr.removeClass('collapsed');
+ tr.find('a.expander').data('expanded',true);
+ tr.find('a.expander').addClass('expanded');
+ tr.find('a.expander').text('v');
},
hideArtist:function(artist){
- if(Collection.parent.find('tr[data-artist="'+artist+'"]').length>1){
- Collection.parent.find('tr[data-artist="'+artist+'"]').hide();
- Collection.parent.find('tr[data-artist="'+artist+'"]').first().show();
- Collection.parent.find('tr[data-artist="'+artist+'"]').first().addClass('collapsed');
- Collection.parent.find('tr[data-artist="'+artist+'"] a.expander').data('expanded',false);
- Collection.parent.find('tr[data-artist="'+artist+'"] a.expander').removeClass('expanded');
- Collection.parent.find('tr[data-artist="'+artist+'"] a.expander').text('>');
+ var tr=Collection.parent.find('tr[data-artist="'+artist+'"]');
+ if(tr.length>1){
+ var artist=tr.first().data('artistData');
+ tr.first().find('td.album a').text(artist.albums.length+' '+t('media','albums'));
+ tr.first().find('td.title a').text(artist.songs.length+' '+t('media','songs'));
+ tr.first().find('td.album a').unbind('click');
+ tr.first().find('td.title a').unbind('click');
+ tr.each(function(i,row){
+ if(i>0){
+ $(row).remove();
+ }
+ });
+ tr.find('a.expander').data('expanded',false);
+ tr.find('a.expander').removeClass('expanded');
+ tr.find('a.expander').text('>');
}
},
showAlbum:function(artist,album){
@@ -161,16 +195,26 @@ Collection={
song.song_playcount++;
}
},
- addButtons:function(parent){
- parent.children('button.add').click(function(){
- var type=$(this).parent().data('type');
- PlayList.add($(this).parent().data(type));
+ addButtons:function(parent,data){
+ buttons = parent.find('.buttons');
+ if(buttons.find('.add').length<=0) {
+ buttons.append('');
+ }
+ if(buttons.find('.play').length<=0) {
+ buttons.append('');
+ }
+ buttons.find('.add').unbind('click');
+ buttons.find('.add').click(function(event){
+ event.preventDefault();
+ PlayList.add(data,true);
+ PlayList.render();
});
- parent.children('button.play').click(function(){
- var type=$(this).parent().data('type');
- var oldSize=PlayList.items.length;
- PlayList.add($(this).parent().data(type));
- PlayList.play(oldSize);
+ buttons.find('.play').unbind('click');
+ buttons.find('.play').click(function(event){
+ event.preventDefault();
+ PlayList.add(data);
+ PlayList.play(0,0);
+ PlayList.render();
});
},
find:function(artistName,albumName,songName){
diff --git a/apps/media/js/player.js b/apps/media/js/player.js
index 0b0502c778..f696b87bbd 100644
--- a/apps/media/js/player.js
+++ b/apps/media/js/player.js
@@ -5,10 +5,8 @@ var PlayList={
player:null,
volume:0.8,
active:false,
- tempPlaylist:[],
- isTemp:true,
next:function(){
- var items=(PlayList.isTemp)?PlayList.tempPlaylist:PlayList.items;
+ var items=PlayList.items;
var next=PlayList.current+1;
if(next>=items.length){
next=0;
@@ -17,7 +15,7 @@ var PlayList={
PlayList.render();
},
previous:function(){
- var items=(PlayList.isTemp)?PlayList.tempPlaylist:PlayList.items;
+ var items=PlayList.items;
var next=PlayList.current-1;
if(next<0){
next=items.length-1;
@@ -26,7 +24,7 @@ var PlayList={
PlayList.render();
},
play:function(index,time,ready){
- var items=(PlayList.isTemp)?PlayList.tempPlaylist:PlayList.items;
+ var items=PlayList.items;
if(index==null){
index=PlayList.current;
}
@@ -34,8 +32,11 @@ var PlayList={
PlayList.current=index;
if(PlayList.player){
if(PlayList.player.data('jPlayer').options.supplied!=items[index].type){//the the audio type changes we need to reinitialize jplayer
+ PlayList.player.jPlayer("play",time);
+ localStorage.setItem(oc_current_user+'oc_playlist_time',time);
PlayList.player.jPlayer("destroy");
- PlayList.init(items[index].type,function(){PlayList.play(null,time,ready)});
+ PlayList.save(); // so that the init don't lose the playlist
+ PlayList.init(items[index].type,null); // init calls load that calls play
}else{
PlayList.player.jPlayer("setMedia", items[PlayList.current]);
items[index].playcount++;
@@ -60,7 +61,10 @@ var PlayList={
}
}
}else{
- PlayList.init(items[index].type,PlayList.play);
+ localStorage.setItem(oc_current_user+'oc_playlist_time',time);
+ localStorage.setItem(oc_current_user+'oc_playlist_playing','true');
+ PlayList.save(); // so that the init don't lose the playlist
+ PlayList.init(items[index].type,null); // init calls load that calls play
}
}
},
@@ -100,37 +104,30 @@ var PlayList={
swfPath:OC.linkTo('media','js'),
});
},
- add:function(song,temp,dontReset){
+ add:function(song,dontReset){
if(!dontReset){
- PlayList.tempPlaylist=[];//clear the temp playlist
+ PlayList.items=[];//clear the playlist
}
- PlayList.isTemp=temp;
- PlayList.isTemp=true;
if(!song){
return;
}
if(song.substr){//we are passed a string, asume it's a url to a song
- PlayList.addFile(song,temp,true);
+ PlayList.addFile(song,true);
}
if(song.albums){//a artist object was passed, add all albums inside it
$.each(song.albums,function(index,album){
- PlayList.add(album,temp,true);
+ PlayList.add(album,true);
});
- }
- if(song.songs){//a album object was passed, add all songs inside it
+ } else if(song.songs){//a album object was passed, add all songs inside it
$.each(song.songs,function(index,song){
- PlayList.add(song,temp,true);
+ PlayList.add(song,true);
});
}
- if(song.song_name){
- var type=musicTypeFromFile(song.song_path);
- var item={name:song.song_name,type:type,artist:song.artist_name,album:song.album_name,length:song.song_length,playcount:song.song_playcount};
- item[type]=PlayList.urlBase+encodeURIComponent(song.song_path);
- if(PlayList.isTemp){
- PlayList.tempPlaylist.push(item);
- }else{
- PlayList.items.push(item);
- }
+ if(song.path){
+ var type=musicTypeFromFile(song.path);
+ var item={name:song.name,type:type,artist:song.artist,album:song.album,length:song.length,playcount:song.playCount};
+ item[type]=PlayList.urlBase+encodeURIComponent(song.path);
+ PlayList.items.push(item);
}
},
addFile:function(path){
@@ -160,10 +157,14 @@ var PlayList={
if(typeof localStorage !== 'undefined' && localStorage){
localStorage.setItem(oc_current_user+'oc_playlist_items',JSON.stringify(PlayList.items));
localStorage.setItem(oc_current_user+'oc_playlist_current',PlayList.current);
- var time=Math.round(PlayList.player.data('jPlayer').status.currentTime);
- localStorage.setItem(oc_current_user+'oc_playlist_time',time);
- var volume=PlayList.player.data('jPlayer').options.volume*100;
- localStorage.setItem(oc_current_user+'oc_playlist_volume',volume);
+ if(PlayList.player) {
+ if(PlayList.player.data('jPlayer')) {
+ var time=Math.round(PlayList.player.data('jPlayer').status.currentTime);
+ localStorage.setItem(oc_current_user+'oc_playlist_time',time);
+ var volume=PlayList.player.data('jPlayer').options.volume*100;
+ localStorage.setItem(oc_current_user+'oc_playlist_volume',volume);
+ }
+ }
if(PlayList.active){
localStorage.setItem(oc_current_user+'oc_playlist_active','false');
}
diff --git a/apps/media/l10n/ca.php b/apps/media/l10n/ca.php
index 810eecd8a4..f0e24d8514 100644
--- a/apps/media/l10n/ca.php
+++ b/apps/media/l10n/ca.php
@@ -1,8 +1,13 @@
"Música",
+"Play" => "Reprodueix",
+"Pause" => "Pausa",
+"Previous" => "Anterior",
+"Next" => "Següent",
+"Mute" => "Mut",
+"Unmute" => "Activa el so",
"Songs scanned" => "Cançons escanejades",
"Rescan Collection" => "Escaneja de nou la col·lecció",
-"Pause" => "Pausa",
"Artist" => "Artista",
"Album" => "Àlbum",
"Title" => "Títol"
diff --git a/apps/media/l10n/da.php b/apps/media/l10n/da.php
index 671f0cf44c..64cdc59ded 100644
--- a/apps/media/l10n/da.php
+++ b/apps/media/l10n/da.php
@@ -1,8 +1,8 @@
"Musik",
+"Pause" => "Pause",
"Songs scanned" => "Sange skannet",
"Rescan Collection" => "Genskan Samling",
-"Pause" => "Pause",
"Artist" => "Kunstner",
"Album" => "Album",
"Title" => "Titel"
diff --git a/apps/media/l10n/de.php b/apps/media/l10n/de.php
index 9f664b78d8..7a87f6dcb3 100644
--- a/apps/media/l10n/de.php
+++ b/apps/media/l10n/de.php
@@ -1,8 +1,8 @@
"Musik",
+"Pause" => "Pause",
"Songs scanned" => "Lieder gescannt",
"Rescan Collection" => "Sammlung scannen",
-"Pause" => "Pause",
"Artist" => "Künstler",
"Album" => "Album",
"Title" => "Titel"
diff --git a/apps/media/l10n/el.php b/apps/media/l10n/el.php
index 0543dae8b3..6d4b781b78 100644
--- a/apps/media/l10n/el.php
+++ b/apps/media/l10n/el.php
@@ -1,8 +1,13 @@
"Μουσική",
+"Play" => "Αναπαραγωγή",
+"Pause" => "Παύση",
+"Previous" => "Προηγούμενο",
+"Next" => "Επόμενο",
+"Mute" => "Σίγαση",
+"Unmute" => "Επαναφορά ήχου",
"Songs scanned" => "Σαρωμένα τραγούγια",
"Rescan Collection" => "Επανασάρωση συλλογής",
-"Pause" => "Παύση",
"Artist" => "Καλλιτέχνης",
"Album" => "Άλμπουμ",
"Title" => "Τίτλος"
diff --git a/apps/media/l10n/es.php b/apps/media/l10n/es.php
index 2b4044706f..b97fb0bf15 100644
--- a/apps/media/l10n/es.php
+++ b/apps/media/l10n/es.php
@@ -1,8 +1,13 @@
"Música",
+"Play" => "Reproducir",
+"Pause" => "Pausa",
+"Previous" => "Anterior",
+"Next" => "Siguiente",
+"Mute" => "Silenciar",
+"Unmute" => "Sonar",
"Songs scanned" => "Canciones encontradas",
"Rescan Collection" => "Buscar música nueva",
-"Pause" => "Pausa",
"Artist" => "Artista",
"Album" => "Álbum",
"Title" => "Título"
diff --git a/apps/media/l10n/fr.php b/apps/media/l10n/fr.php
index 619ee9bc83..3e4e0f1928 100644
--- a/apps/media/l10n/fr.php
+++ b/apps/media/l10n/fr.php
@@ -1,8 +1,8 @@
"Musique",
+"Pause" => "Pause",
"Songs scanned" => "Pistes scannées",
"Rescan Collection" => "Réanalyser la Collection",
-"Pause" => "Pause",
"Artist" => "Artiste",
"Album" => "Album",
"Title" => "Titre"
diff --git a/apps/media/l10n/id.php b/apps/media/l10n/id.php
new file mode 100644
index 0000000000..7127f85fbf
--- /dev/null
+++ b/apps/media/l10n/id.php
@@ -0,0 +1,9 @@
+ "Musik",
+"Pause" => "Jeda",
+"Songs scanned" => "Lagu-lagu yang telah dipindai",
+"Rescan Collection" => "Pindai ulang Koleksi",
+"Artist" => "Artis",
+"Album" => "Album",
+"Title" => "Judul"
+);
diff --git a/apps/media/l10n/it.php b/apps/media/l10n/it.php
index 9e9b3d151e..f0d9c606e7 100644
--- a/apps/media/l10n/it.php
+++ b/apps/media/l10n/it.php
@@ -1,6 +1,13 @@
"Musica",
+"Play" => "Play",
"Pause" => "Pausa",
+"Previous" => "Precedente",
+"Next" => "Successiva",
+"Mute" => "Disattiva audio",
+"Unmute" => "Riattiva audio",
+"Songs scanned" => "Canzoni analizzate",
+"Rescan Collection" => "Rianalizza colezione",
"Artist" => "Artista",
"Album" => "Album",
"Title" => "Titolo"
diff --git a/apps/media/l10n/nl.php b/apps/media/l10n/nl.php
index 5d4e41ba0d..7ae0a761af 100644
--- a/apps/media/l10n/nl.php
+++ b/apps/media/l10n/nl.php
@@ -1,8 +1,8 @@
"Muziek",
+"Pause" => "Pauze",
"Songs scanned" => "nummers gescanned",
"Rescan Collection" => "Collectie opnieuw scannen",
-"Pause" => "Pauze",
"Artist" => "Artiest",
"Album" => "Album",
"Title" => "Titel"
diff --git a/apps/media/l10n/pl.php b/apps/media/l10n/pl.php
new file mode 100644
index 0000000000..bb74d6d578
--- /dev/null
+++ b/apps/media/l10n/pl.php
@@ -0,0 +1,9 @@
+ "Muzyka",
+"Pause" => "Zatrzymaj",
+"Songs scanned" => "Przeskanowane utwory",
+"Rescan Collection" => "Przeskanuj kolekcję",
+"Artist" => "Artysta",
+"Album" => "Album",
+"Title" => "Tytuł"
+);
diff --git a/apps/media/l10n/pt_BR.php b/apps/media/l10n/pt_BR.php
index 750b86359a..ac5b1c22d7 100644
--- a/apps/media/l10n/pt_BR.php
+++ b/apps/media/l10n/pt_BR.php
@@ -1,8 +1,13 @@
"Música",
+"Play" => "Tocar",
+"Pause" => "Pausa",
+"Previous" => "Anterior",
+"Next" => "Próximo",
+"Mute" => "Mudo",
+"Unmute" => "Não Mudo",
"Songs scanned" => "Músicas encontradas",
"Rescan Collection" => "Atualizar a Coleção",
-"Pause" => "Pausa",
"Artist" => "Artista",
"Album" => "Álbum",
"Title" => "Título"
diff --git a/apps/media/l10n/sv.php b/apps/media/l10n/sv.php
index 8e2e7039c5..b3a7f18f7b 100644
--- a/apps/media/l10n/sv.php
+++ b/apps/media/l10n/sv.php
@@ -1,8 +1,8 @@
"Musik",
+"Pause" => "Paus",
"Songs scanned" => "Skannade låtar",
"Rescan Collection" => "Sök igenom samlingen",
-"Pause" => "Paus",
"Artist" => "Artist",
"Album" => "Album",
"Title" => "Titel"
diff --git a/apps/media/lib_media.php b/apps/media/lib_media.php
index 062672b91e..3086f84a93 100644
--- a/apps/media/lib_media.php
+++ b/apps/media/lib_media.php
@@ -24,10 +24,8 @@
//we need to have the sha256 hash of passwords for ampache
OC_Hook::connect('OC_User','post_login','OC_MEDIA','loginListener');
-//connect to the filesystem for auto updating if configured
-if(OC_Preferences::getValue(OC_User::getUser(),'media','autoupdate',false)){
- OC_Hook::connect('OC_Filesystem','post_write','OC_MEDIA','updateFile');
-}
+//connect to the filesystem for auto updating
+OC_Hook::connect('OC_Filesystem','post_write','OC_MEDIA','updateFile');
//listen for file deletions to clean the database if a song is deleted
OC_Hook::connect('OC_Filesystem','delete','OC_MEDIA','deleteFile');
@@ -56,20 +54,14 @@ class OC_MEDIA{
*/
public static function updateFile($params){
$path=$params['path'];
- $folderNames=explode(PATH_SEPARATOR,OC_Preferences::getValue(OC_User::getUser(),'media','paths',''));
- foreach($folderNames as $folder){
- if(substr($path,0,strlen($folder))==$folder){
- require_once 'lib_scanner.php';
- require_once 'lib_collection.php';
- //fix a bug where there were multiply '/' in front of the path, it should only be one
- while($path[0]=='/'){
- $path=substr($path,1);
- }
- $path='/'.$path;
- error_log($path);
- OC_MEDIA_SCANNER::scanFile($path);
- }
+ require_once 'lib_scanner.php';
+ require_once 'lib_collection.php';
+ //fix a bug where there were multiply '/' in front of the path, it should only be one
+ while($path[0]=='/'){
+ $path=substr($path,1);
}
+ $path='/'.$path;
+ OC_MEDIA_SCANNER::scanFile($path);
}
/**
diff --git a/apps/media/templates/music.php b/apps/media/templates/music.php
index 3cbb1c50a9..9b40faa961 100644
--- a/apps/media/templates/music.php
+++ b/apps/media/templates/music.php
@@ -1,11 +1,11 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -25,23 +25,25 @@
-
0 t('Songs scanned')?>
-
-
+
0 t('Songs scanned')?>
+
+
-
t('Artist')?>
-
t('Album')?>
-
t('Title')?>
+
+
t('Artist')?>
+
t('Album')?>
+
t('Title')?>
+
-
-
-
+
+
+
diff --git a/apps/test_db/appinfo/app.php b/apps/test_db/appinfo/app.php
new file mode 100644
index 0000000000..b1ec4c4639
--- /dev/null
+++ b/apps/test_db/appinfo/app.php
@@ -0,0 +1,17 @@
+ 11,
+ 'id' => 'test_db',
+ 'name' => 'Test' ));
+
+OC_App::addNavigationEntry( array(
+ 'id' => 'test_db_index',
+ 'order' => 11,
+ 'href' => OC_Helper::linkTo( 'test_db', 'index.php' ),
+/*
+ 'icon' => OC_Helper::imagePath( 'openstreetgame', 'icon.svg' ),
+*/
+ 'name' => 'Test DB' ));
+
+?>
diff --git a/apps/test_db/appinfo/info.xml b/apps/test_db/appinfo/info.xml
new file mode 100644
index 0000000000..06c716453c
--- /dev/null
+++ b/apps/test_db/appinfo/info.xml
@@ -0,0 +1,10 @@
+
+
+ test_db
+ Test DB
+ A test of the db
+ 0.1
+ AGPL
+ Côme BERNIGAUD
+ 2
+
diff --git a/apps/test_db/appinfo/install.php b/apps/test_db/appinfo/install.php
new file mode 100644
index 0000000000..034bf35914
--- /dev/null
+++ b/apps/test_db/appinfo/install.php
@@ -0,0 +1,7 @@
+execute(array('bar',42));
+*/
+?>
diff --git a/apps/test_db/index.php b/apps/test_db/index.php
new file mode 100644
index 0000000000..2569aedb9b
--- /dev/null
+++ b/apps/test_db/index.php
@@ -0,0 +1,26 @@
+test1 = "test1";
+ $this->test2 = 2;
+ }
+ public function show() {
+ echo "test1:".$this->test1." test2:".$this->test2." ";
+ }
+};
+
+$tmpl = new OC_Template( 'test_db', 'index', 'user' );
+
+$tmpl->printPage();
+?>
diff --git a/apps/test_db/templates/index.php b/apps/test_db/templates/index.php
new file mode 100644
index 0000000000..3209e4d4b7
--- /dev/null
+++ b/apps/test_db/templates/index.php
@@ -0,0 +1,17 @@
+init();
+$t1->show();
+$testid = OC_DB4App::store('test_db','main',OC_User::getUser(),$t1);
+echo "id in db is $testid \n";
+
+$t2 = OC_DB4App::get_object('test_db','main',$testid);
+$t2->show();
+
+print_r(OC_DB4App::get_objects('test_db','main',OC_User::getUser()));
+
+OC_DB4App::delete_object('test_db','main',$testid);
+
+OC_DB4App::drop('test_db','main');
+?>
diff --git a/apps/user_ldap/appinfo/app.php b/apps/user_ldap/appinfo/app.php
index a6fca41501..7906241f79 100644
--- a/apps/user_ldap/appinfo/app.php
+++ b/apps/user_ldap/appinfo/app.php
@@ -23,6 +23,8 @@
require_once('apps/user_ldap/user_ldap.php');
+OC_APP::registerAdmin('user_ldap','settings');
+
// define LDAP_DEFAULT_PORT
define("OC_USER_BACKEND_LDAP_DEFAULT_PORT", 389);
diff --git a/apps/user_ldap/settings.php b/apps/user_ldap/settings.php
index 696b95c37e..8dbd3c0462 100644
--- a/apps/user_ldap/settings.php
+++ b/apps/user_ldap/settings.php
@@ -20,14 +20,6 @@
* License along with this library. If not, see .
*
*/
-
-require_once('../../lib/base.php');
-
-if( !OC_User::isLoggedIn() || !OC_Group::inGroup( OC_User::getUser(), 'admin' )){
- header( "Location: ".OC_Helper::linkTo( '', "index.php" ));
- exit();
-}
-
$params = array('ldap_host', 'ldap_port', 'ldap_dn', 'ldap_password', 'ldap_base', 'ldap_filter');
foreach($params as $param){
@@ -35,11 +27,9 @@ foreach($params as $param){
OC_Appconfig::setValue('user_ldap', $param, $_POST[$param]);
}
}
-OC_App::setActiveNavigationEntry( "user_ldap_settings" );
-
// fill template
-$tmpl = new OC_Template( 'user_ldap', 'settings', 'admin' );
+$tmpl = new OC_Template( 'user_ldap', 'settings');
foreach($params as $param){
$value = OC_Appconfig::getValue('user_ldap', $param,'');
$tmpl->assign($param, $value);
@@ -48,4 +38,4 @@ foreach($params as $param){
// ldap_port has a default value
$tmpl->assign( 'ldap_port', OC_Appconfig::getValue('user_ldap', 'ldap_port', OC_USER_BACKEND_LDAP_DEFAULT_PORT));
-$tmpl->printPage();
+return $tmpl->fetchPage();
diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php
index 5dddb71a02..32e1b29daf 100644
--- a/apps/user_ldap/templates/settings.php
+++ b/apps/user_ldap/templates/settings.php
@@ -1,27 +1,12 @@
-
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php
index 54fc51fe0c..2d94ef828a 100644
--- a/apps/user_ldap/user_ldap.php
+++ b/apps/user_ldap/user_ldap.php
@@ -63,6 +63,9 @@ class OC_USER_LDAP extends OC_User_Backend {
private function getDs() {
if(!$this->ds) {
$this->ds = ldap_connect( $this->ldap_host, $this->ldap_port );
+ if(ldap_set_option($this->ds, LDAP_OPT_PROTOCOL_VERSION, 3))
+ if(ldap_set_option($this->ds, LDAP_OPT_REFERRALS, 0))
+ ldap_start_tls($this->ds);
}
// login
diff --git a/core/css/styles.css b/core/css/styles.css
index ea8db3544a..d9722fa317 100644
--- a/core/css/styles.css
+++ b/core/css/styles.css
@@ -32,25 +32,25 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#35537a', end
/* INPUTS */
input[type="text"], input[type="password"] { cursor:text; }
-input, select, .button, #quota, div.jp-progress { font-size:1em; width:10em; margin:.3em; padding:.6em .5em .4em; background:#fff; color:#333; border:1px solid #ddd; -moz-box-shadow:0 1px 1px #fff, 0 2px 0 #bbb inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; }
-input[type="text"], input[type="password"] { background:#f8f8f8; color:#555; cursor:text; }
-input[type="text"]:hover, input[type="text"]:focus, input[type="password"]:hover, input[type="password"]:focus { background:#fff; color:#333; outline: none;}
+input, select, .button, #quota, div.jp-progress, .pager li a { font-size:1em; width:10em; margin:.3em; padding:.6em .5em .4em; background:#fff; color:#333; border:1px solid #ddd; -moz-box-shadow:0 1px 1px #fff, 0 2px 0 #bbb inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; outline:none; }
+input[type="text"], input[type="password"], input[type="search"] { background:#f8f8f8; color:#555; cursor:text; }
+input[type="text"]:hover, input[type="text"]:focus, input[type="password"]:hover, input[type="password"]:focus, input[type="search"]:hover, input[type="search"]:focus { background:#fff; color:#333; }
-input[type="submit"], input[type="button"], .button, #quota, div.jp-progress { width:auto; padding:.4em; border:1px solid #ddd; font-weight:bold; cursor:pointer; background:#f8f8f8; color:#555; text-shadow:#fff 0 1px 0; -moz-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; }
-input[type="submit"]:hover, input[type="submit"]:focus, input[type="button"]:hover, input[type="button"]:focus, .button:hover { background:#fff; color:#333; outline: none;}
-input[type="checkbox"] { width:auto; outline: none;}
+input[type="submit"], input[type="button"], .button, #quota, div.jp-progress, .pager li a { width:auto; padding:.4em; border:1px solid #ddd; font-weight:bold; cursor:pointer; background:#f8f8f8; color:#555; text-shadow:#fff 0 1px 0; -moz-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; }
+input[type="submit"]:hover, input[type="submit"]:focus, input[type="button"]:hover, input[type="button"]:focus, .button:hover { background:#fff; color:#333; }
+input[type="checkbox"] { width:auto; }
#body-login input { font-size:1.5em; }
#body-login input[type="submit"] { float:right; margin-right:.8em; }
#remember_login { margin:.8em .2em 0 1em; }
-form.searchbox input[type="search"] { position:fixed; font-size:1.2em; top:.4em; right:4em; padding:.2em .5em .2em 1.5em; background:#f8f8f8 url('../img/actions/search.svg') .5em center no-repeat; border:0; -moz-border-radius:1em; -webkit-border-
-radius:1em; border-radius:1em; }
+form.searchbox input[type="search"] { position:fixed; font-size:1.2em; top:.4em; right:3em; padding:.2em .5em .2em 1.5em; background-image:url('../img/actions/search.svg'); background-repeat:no-repeat; background-position:.5em center; border:0; -moz-border-radius:1em; -webkit-border-radius:1em; border-radius:1em; }
input[type="submit"].enabled { background:#66f866; border:1px solid #5e5; -moz-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #cfc inset; -webkit-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #cfc inset; box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #cfc inset; }
input[type="submit"].highlight{ background:#ffc100; border:1px solid #db0; text-shadow:#ffeedd 0 1px 0; -moz-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #ffeedd inset; -webkit-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #ffeedd inset; box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #ffeedd inset; }
/* CONTENT ------------------------------------------------------------------ */
#controls { width:100%; top:3.5em; height:2.8em; margin:0; background:#f7f7f7; border-bottom:1px solid #eee; position:fixed; z-index:50; -moz-box-shadow:0 -3px 7px #000; -webkit-box-shadow:0 -3px 7px #000; box-shadow:0 -3px 7px #000; }
+#controls .button { display:inline-block; }
#content { margin:3.5em 0 0 12.5em; }
#leftcontent { position:absolute; top:6.4em; width:20em; background:#f8f8f8; height:100%; border-right:1px solid #ddd; }
#leftcontent li { padding:.3em .8em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; -webkit-transition:background-color 500ms; -moz-transition:background-color 500ms; -o-transition:background-color 500ms; transition:background-color 500ms; }
@@ -80,7 +80,7 @@ input[type="submit"].highlight{ background:#ffc100; border:1px solid #db0; text-
/* NAVIGATION ------------------------------------------------------------- */
-#navigation { position:fixed; top:3.5em; float:left; width:12.5em; padding:0; z-index:75; height:100%; background:#eee; border-right: 1px #ccc solid; -moz-box-shadow: -3px 0 7px #000; -webkit-box-shadow: -3px 0 7px #000; box-shadow: -3px 0 7px #000; }
+#navigation { position:fixed; top:3.5em; float:left; width:12.5em; padding:0; z-index:75; height:100%; background:#eee; border-right: 1px #ccc solid; -moz-box-shadow: -3px 0 7px #000; -webkit-box-shadow: -3px 0 7px #000; box-shadow: -3px 0 7px #000; overflow:hidden;}
#navigation a { display:block; padding:.6em .5em .4em 2.5em; background:#eee 1em center no-repeat; border-bottom:1px solid #ddd; border-top:1px solid #fff; text-decoration:none; font-size:1.2em; color:#666; text-shadow:#f8f8f8 0 1px 0; -webkit-transition:background 300ms; -moz-transition:background 300ms; -o-transition:background 300ms; transition:background 300ms; }
#navigation a.active, #navigation a:hover, #navigation a:focus { background-color:#dbdbdb; border-top:1px solid #d4d4d4; border-bottom:1px solid #ccc; color:#333; }
#navigation a.active { background-color:#ddd; }
@@ -101,10 +101,14 @@ input[type="submit"].highlight{ background:#ffc100; border:1px solid #db0; text-
table tr { -webkit-transition:background-color 500ms; -moz-transition:background-color 500ms; -o-transition:background-color 500ms; transition:background-color 500ms; }
tbody tr:hover, tr:active { background-color:#f8f8f8; }
-#body-settings .personalblock { padding:.5em 1em; margin:1em; background:#f8f8f8; color:#555; text-shadow:#fff 0 1px 0; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; }
+#body-settings .personalblock, #body-settings .helpblock { padding:.5em 1em; margin:1em; background:#f8f8f8; color:#555; text-shadow:#fff 0 1px 0; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; }
#body-settings .personalblock#quota { position:relative; margin-top:4.5em; padding:0; }
+#body-settings #controls+.helpblock { position:relative; margin-top:7.3em; }
#quota div, div.jp-play-bar, div.jp-seek-bar { padding:.6em 1em; background:#e6e6e6; font-weight:normal; white-space:nowrap; -moz-border-radius-bottomleft:.4em; -webkit-border-bottom-left-radius:.4em; border-bottom-left-radius:.4em; -moz-border-radius-topleft:.4em; -webkit-border-top-left-radius:.4em; border-top-left-radius:.4em; }
div.jp-play-bar, div.jp-seek-bar { padding:0; }
+.pager { list-style:none; float:right; display:inline; margin:.7em 12.7em 0 0; }
+.pager li { display:inline-block; }
+
li.error { width:640px; margin:4em auto; padding:1em 1em 1em 4em; background:#ffe .8em .8em no-repeat; border:1px solid #ccc; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; }
diff --git a/core/js/js.js b/core/js/js.js
index 9ad9810a7e..9d2b20d10f 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -180,7 +180,56 @@ if (!Array.prototype.indexOf){
* check if the browser support svg images
*/
function SVGSupport() {
- return !!document.createElementNS && !!document.createElementNS('http://www.w3.org/2000/svg', "svg").createSVGRect;
+ return SVGSupport.checkMimeType.correct && !!document.createElementNS && !!document.createElementNS('http://www.w3.org/2000/svg', "svg").createSVGRect;
+}
+SVGSupport.checkMimeType=function(){
+ $.ajax({
+ url: OC.imagePath('core','breadcrumb.svg'),
+ success:function(data,text,xhr){
+ var headerParts=xhr.getAllResponseHeaders().split("\n");
+ var headers={};
+ $.each(headerParts,function(i,text){
+ if(text){
+ var parts=text.split(':',2);
+ var value=parts[1].trim();
+ if(value[0]=='"'){
+ value=value.substr(1,value.length-2);
+ }
+ headers[parts[0]]=value;
+ }
+ });
+ if(headers["Content-Type"]!='image/svg+xml'){
+ replaceSVG();
+ SVGSupport.checkMimeType.correct=false
+ }
+ }
+ });
+}
+SVGSupport.checkMimeType.correct=true;
+
+//replace all svg images with png for browser compatibility
+function replaceSVG(){
+ $('img.svg').each(function(index,element){
+ element=$(element);
+ var src=element.attr('src');
+ element.attr('src',src.substr(0,src.length-3)+'png');
+ });
+ $('.svg').each(function(index,element){
+ element=$(element);
+ var background=element.css('background-image');
+ if(background && background!='none'){
+ background=background.substr(0,background.length-4)+'png)';
+ element.css('background-image',background);
+ }
+ element.find('*').each(function(index,element) {
+ element=$(element);
+ var background=element.css('background-image');
+ if(background && background!='none'){
+ background=background.substr(0,background.length-4)+'png)';
+ element.css('background-image',background);
+ }
+ });
+ });
}
/**
@@ -197,28 +246,10 @@ function object(o) {
$(document).ready(function(){
if(!SVGSupport()){//replace all svg images with png images for browser that dont support svg
- $('img.svg').each(function(index,element){
- element=$(element);
- var src=element.attr('src');
- element.attr('src',src.substr(0,src.length-3)+'png');
- });
- $('.svg').each(function(index,element){
- element=$(element);
- var background=element.css('background-image');
- if(background && background!='none'){
- background=background.substr(0,background.length-4)+'png)';
- element.css('background-image',background);
- }
- element.find('*').each(function(index,element) {
- element=$(element);
- var background=element.css('background-image');
- if(background && background!='none'){
- background=background.substr(0,background.length-4)+'png)';
- element.css('background-image',background);
- }
- });
- });
- };
+ replaceSVG();
+ }else{
+ SVGSupport.checkMimeType();
+ }
$('form.searchbox').submit(function(event){
event.preventDefault();
})
@@ -226,7 +257,7 @@ $(document).ready(function(){
if(event.keyCode==13){//enter
if(OC.search.currentResult>-1){
var result=$('#searchresults tr.result a')[OC.search.currentResult];
- $(result).click();
+ window.location = $(result).attr('href');
}
}else if(event.keyCode==38){//up
if(OC.search.currentResult>0){
@@ -303,9 +334,10 @@ $(document).ready(function(){
$('.jp-controls .jp-previous').tipsy({gravity:'nw', fade:true, live:true});
$('.jp-controls .jp-next').tipsy({gravity:'n', fade:true, live:true});
$('.password .action').tipsy({gravity:'se', fade:true, live:true});
- $('.selectedActions a.delete').tipsy({gravity: 'ne', fade:true, live:true});
- $('.selectedActions a').tipsy({gravity:'n', fade:true, live:true});
$('.file_upload_button_wrapper').tipsy({gravity:'e', fade:true});
+ $('.selectedActions a.delete').tipsy({gravity: 'se', fade:true, live:true});
+ $('.selectedActions a').tipsy({gravity:'s', fade:true, live:true});
+ $('#headerSize').tipsy({gravity:'s', fade:true, live:true});
$('td.filesize').tipsy({gravity:'s', fade:true, live:true});
$('td .modified').tipsy({gravity:'s', fade:true, live:true});
diff --git a/core/l10n/ca.php b/core/l10n/ca.php
index 04c2d5e39f..5d4b67d421 100644
--- a/core/l10n/ca.php
+++ b/core/l10n/ca.php
@@ -1,10 +1,10 @@
"Personal",
"Users" => "Usuaris",
"Apps" => "Aplicacions",
+"Admin" => "Administrador",
"Help" => "Ajuda",
-"Personal" => "Personal",
-"Login failed!" => "L'inici de sessió ha fallat!",
-"remember" => "recorda'm",
+"Cloud not found" => "No s'ha trobat el núvol",
"Create an admin account" => "Crea un compte d'administrador",
"Username" => "Nom d'usuari",
"Password" => "Contrasenya",
@@ -18,10 +18,12 @@
"Table prefix" => "Prefix de les taules",
"Data folder" => "Carpeta de dades",
"Finish setup" => "Acaba la configuració",
-"Cloud not found" => "No s'ha trobat el núvol",
"gives you the freedom to control your own data on the internet" => "us dóna la llibertat per controlar les vostres dades a internet",
-"prev" => "anterior",
-"next" => "següent",
+"Log out" => "Sortir",
+"Settings" => "Arranjament",
+"Login failed!" => "L'inici de sessió ha fallat!",
+"remember" => "recorda'm",
"You are logged out." => "Heu tancat la sessió.",
-"Settings" => "Arranjament"
+"prev" => "anterior",
+"next" => "següent"
);
diff --git a/core/l10n/da.php b/core/l10n/da.php
index 673dac7356..081ee79df9 100644
--- a/core/l10n/da.php
+++ b/core/l10n/da.php
@@ -1,6 +1,10 @@
"Login mislykkedes!",
-"remember" => "husk",
+"Personal" => "Personlig",
+"Users" => "Brugere",
+"Apps" => "Apps",
+"Admin" => "Admin",
+"Help" => "Hjælp",
+"Cloud not found" => "Sky ikke fundet",
"Create an admin account" => "Lav en administrator konto",
"Username" => "Brugernavn",
"Password" => "Kodeord",
@@ -14,9 +18,12 @@
"Table prefix" => "Tabel præfiks",
"Data folder" => "Data mappe",
"Finish setup" => "Afslut installation",
-"Cloud not found" => "Sky ikke fundet",
-"prev" => "forrige",
-"next" => "næste",
+"gives you the freedom to control your own data on the internet" => "giver dig friheden til at kontrollere dine egne data på internettet",
+"Log out" => "Log ud",
+"Settings" => "Indstillinger",
+"Login failed!" => "Login mislykkedes!",
+"remember" => "husk",
"You are logged out." => "Du er nu logget ud",
-"Settings" => "Indstillinger"
+"prev" => "forrige",
+"next" => "næste"
);
diff --git a/core/l10n/de.php b/core/l10n/de.php
index e808ceb297..07634508b1 100644
--- a/core/l10n/de.php
+++ b/core/l10n/de.php
@@ -1,8 +1,9 @@
"Persönlich",
"Users" => "Nutzer",
"Apps" => "Anwendungen",
+"Admin" => "Verwaltung",
"Help" => "Hilfe",
-"Personal" => "Persönlich",
"Login failed!" => "Anmeldung fehlgeschlagen!",
"remember" => "merken",
"Create an admin account" => "Admin-Konto anlegen",
@@ -23,5 +24,6 @@
"prev" => "Zurück",
"next" => "Weiter",
"You are logged out." => "Erfolgreich abgemeldet.",
+"Log out" => "Abmelden",
"Settings" => "Einstellungen"
);
diff --git a/core/l10n/el.php b/core/l10n/el.php
index fb97bf6abd..ab83146c53 100644
--- a/core/l10n/el.php
+++ b/core/l10n/el.php
@@ -1,4 +1,8 @@
"Προσωπικά",
+"Users" => "Χρήστες",
+"Apps" => "Εφαρμογές",
+"Help" => "Βοήθεια",
"Login failed!" => "Η σύνδεση απέτυχε!",
"remember" => "να με θυμάσαι",
"Create an admin account" => "Δημιουργήστε έναν λογαριασμό διαχειριστή",
@@ -19,5 +23,6 @@
"prev" => "προηγούμενο",
"next" => "επόμενο",
"You are logged out." => "Έχετε αποσυνδεθεί.",
+"Log out" => "Αποσύνδεση",
"Settings" => "Ρυθμίσεις"
);
diff --git a/core/l10n/es.php b/core/l10n/es.php
index 70b6b40c09..f53d56c50a 100644
--- a/core/l10n/es.php
+++ b/core/l10n/es.php
@@ -1,6 +1,10 @@
"¡No se pudo iniciar sesión!",
-"remember" => "recuérdame",
+"Personal" => "Personal",
+"Users" => "Usuarios",
+"Apps" => "Aplicaciones",
+"Admin" => "Administrador",
+"Help" => "Ayuda",
+"Cloud not found" => "No se encontró la nube",
"Create an admin account" => "Crear una cuenta de administrador",
"Username" => "Nombre de usuario",
"Password" => "Contraseña",
@@ -13,10 +17,13 @@
"Host" => "Host",
"Table prefix" => "Prefijo de la tabla",
"Data folder" => "Directorio de almacenamiento",
-"Finish setup" => "Completar la instalación",
-"Cloud not found" => "No se encontró la nube",
-"prev" => "anterior",
-"next" => "siguiente",
+"Finish setup" => "Completar instalación",
+"gives you the freedom to control your own data on the internet" => "te da la libertad del control de tus propios datos en internet",
+"Log out" => "Salir",
+"Settings" => "Ajustes",
+"Login failed!" => "¡No se pudo iniciar sesión!",
+"remember" => "recuérdame",
"You are logged out." => "Has cerrado sesión.",
-"Settings" => "Ajustes"
+"prev" => "anterior",
+"next" => "siguiente"
);
diff --git a/core/l10n/fr.php b/core/l10n/fr.php
index 122c8f0050..50ea499071 100644
--- a/core/l10n/fr.php
+++ b/core/l10n/fr.php
@@ -1,6 +1,10 @@
"Échec de la connexion !",
-"remember" => "se souvenir de moi",
+"Personal" => "Personnel",
+"Users" => "Utilisateurs",
+"Apps" => "Applications",
+"Admin" => "Administration",
+"Help" => "Aide",
+"Cloud not found" => "Introuvable",
"Create an admin account" => "Créer un compte administrateur",
"Username" => "Nom d'utilisateur",
"Password" => "Mot de passe",
@@ -14,10 +18,12 @@
"Table prefix" => "Préfixe des tables",
"Data folder" => "Répertoire des données",
"Finish setup" => "Terminer l'installation",
-"Cloud not found" => "Introuvable",
"gives you the freedom to control your own data on the internet" => "vous rend libre de contrôler vos propres données sur internet",
-"prev" => "précédent",
-"next" => "suivant",
+"Log out" => "Se déconnecter",
+"Settings" => "Paramètres",
+"Login failed!" => "Échec de la connexion !",
+"remember" => "se souvenir de moi",
"You are logged out." => "Vous êtes désormais déconnecté.",
-"Settings" => "Paramètres"
+"prev" => "précédent",
+"next" => "suivant"
);
diff --git a/core/l10n/id.php b/core/l10n/id.php
index 51dc4f992c..a8620f3dbf 100644
--- a/core/l10n/id.php
+++ b/core/l10n/id.php
@@ -1,10 +1,29 @@
"Gagal masuk!",
+"Personal" => "Pribadi",
+"Users" => "Pengguna",
+"Apps" => "Aplikasi",
+"Admin" => "Admin",
+"Help" => "Bantuan",
+"Cloud not found" => "Cloud tidak ditemukan",
+"Create an admin account" => "Buat sebuah akun admin",
"Username" => "Username",
"Password" => "Password",
+"Configure the database" => "Konfigurasi database",
+"will be used" => "akan digunakan",
+"Database user" => "Pengguna database",
+"Database password" => "Password database",
+"Database name" => "Nama database",
"Advanced" => "Tingkat Lanjut",
+"Host" => "Host",
+"Table prefix" => "Awalan tabel",
+"Data folder" => "Folder data",
"Finish setup" => "Selesaikan instalasi",
+"gives you the freedom to control your own data on the internet" => "memberikan anda kebebasan dalam mengendalikan data anda di internet",
+"Log out" => "Keluar",
+"Settings" => "Setelan",
+"Login failed!" => "Gagal masuk!",
+"remember" => "selalu login",
+"You are logged out." => "Anda telah keluar.",
"prev" => "sebelum",
-"next" => "selanjutnya",
-"You are logged out." => "Anda telah keluar."
+"next" => "selanjutnya"
);
diff --git a/core/l10n/it.php b/core/l10n/it.php
index 4bd8dfd7b3..68349e17c4 100644
--- a/core/l10n/it.php
+++ b/core/l10n/it.php
@@ -1,4 +1,8 @@
"Personale",
+"Users" => "Utenti",
+"Apps" => "Applicazioni",
+"Help" => "Aiuto",
"Login failed!" => "Login fallito!",
"remember" => "ricorda",
"Create an admin account" => "Crea un <strong>account amministratore</strong>",
@@ -14,8 +18,11 @@
"Table prefix" => "Prefisso tabella",
"Data folder" => "Cartella dati",
"Finish setup" => "Termina",
+"Cloud not found" => "Cloud non trovata",
+"gives you the freedom to control your own data on the internet" => "da la libertà di controllare i tuoi dati su internet",
"prev" => "precedente",
"next" => "successivo",
"You are logged out." => "Sei uscito.",
+"Log out" => "Log out",
"Settings" => "Impostazioni"
);
diff --git a/core/l10n/nl.php b/core/l10n/nl.php
index 84e42ea59a..7dae374a4d 100644
--- a/core/l10n/nl.php
+++ b/core/l10n/nl.php
@@ -1,4 +1,8 @@
"Persoonlijk",
+"Users" => "Gebruikers",
+"Apps" => "Apps",
+"Help" => "Help",
"Login failed!" => "Aanmelden mislukt.",
"remember" => "onthoud gegevens",
"Create an admin account" => "Maak een admin-account",
@@ -19,5 +23,6 @@
"prev" => "vorige",
"next" => "volgende",
"You are logged out." => "U bent afgemeld.",
+"Log out" => "Afmelden",
"Settings" => "Instellingen"
);
diff --git a/core/l10n/pl.php b/core/l10n/pl.php
index 79ba6162df..d63782b873 100644
--- a/core/l10n/pl.php
+++ b/core/l10n/pl.php
@@ -1,8 +1,29 @@
"Nie udało się zalogować!",
+"Personal" => "Ustawienia osobiste",
+"Users" => "Użytkownicy",
+"Apps" => "Aplikacje",
+"Admin" => "Administrator",
+"Help" => "Pomoc",
+"Cloud not found" => "Konta nie znaleziono ",
+"Create an admin account" => "Stwórz jako konto administratora",
+"Username" => "Użytkownik",
+"Password" => "Hasło",
+"Configure the database" => "Konfiguracja bazy danych",
+"will be used" => "zostanie użyte",
+"Database user" => "Użytkownik bazy danych",
+"Database password" => "Hasło do bazy danych",
+"Database name" => "Nazwa bazy danych",
"Advanced" => "Zaawansowane",
+"Host" => "Host",
+"Table prefix" => "Prefiks tablicy",
+"Data folder" => "Katalog danych",
"Finish setup" => "Zakończ instalację",
+"gives you the freedom to control your own data on the internet" => "daje Ci wolność kontroli nad Twoimi danymi w Internecie",
+"Log out" => "Wyloguj się",
+"Settings" => "Ustawienia",
+"Login failed!" => "Nie udało się zalogować!",
+"remember" => "zapamiętaj",
+"You are logged out." => "Zostałeś wylogowany.",
"prev" => "wstecz",
-"next" => "dalej",
-"You are logged out." => "Jesteś wylogowany."
+"next" => "dalej"
);
diff --git a/core/l10n/pt_BR.php b/core/l10n/pt_BR.php
index ca02c4a24b..292f698c08 100644
--- a/core/l10n/pt_BR.php
+++ b/core/l10n/pt_BR.php
@@ -1,6 +1,10 @@
"Login sem sucesso",
-"remember" => "lembrete",
+"Personal" => "Pessoal",
+"Users" => "Usuários",
+"Apps" => "Apps",
+"Admin" => "Admin",
+"Help" => "Ajuda",
+"Cloud not found" => "Cloud não encontrado",
"Create an admin account" => "Criar uma conta de administrador",
"Username" => "Nome de Usuário",
"Password" => "Senha",
@@ -14,9 +18,12 @@
"Table prefix" => "Prefixo da tabela",
"Data folder" => "Pasta de dados",
"Finish setup" => "Concluir configuração",
-"Cloud not found" => "Cloud não encontrado",
-"prev" => "anterior",
-"next" => "próximo",
+"gives you the freedom to control your own data on the internet" => "te dá a liberdade de controlar seus próprios dados na internet",
+"Log out" => "Sair",
+"Settings" => "Configurações",
+"Login failed!" => "Login sem sucesso",
+"remember" => "lembrete",
"You are logged out." => "Você está desconectado.",
-"Settings" => "Configurações"
+"prev" => "anterior",
+"next" => "próximo"
);
diff --git a/core/strings.php b/core/strings.php
index 6fe1cfd536..9b4290db47 100644
--- a/core/strings.php
+++ b/core/strings.php
@@ -1,9 +1,10 @@
t("Personal");
$l->t("Users");
$l->t("Apps");
+$l->t("Admin");
$l->t("Help");
-$l->t("Personal");
-?>
\ No newline at end of file
+?>
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index c8b276bebb..90b1925929 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -31,7 +31,7 @@