';
html += '
';
- html += '
';
//html += '
';
html += '
';
- html += '
';
html += '
';
if (filename) {
@@ -56,11 +64,14 @@ function createVersionsDropdown(filename, files) {
//alert("helo "+OC.linkTo('files_versions', 'ajax/getVersions.php'));
if (versions) {
-
$.each( versions, function(index, row ) {
addVersion( row );
});
-
+ $('#found_versions').chosen();
+ } else {
+ $('#found_versions').hide();
+ $('#makelink').hide();
+ $('
No other versions available
').appendTo('#dropdown');
}
$('#found_versions').change(function(){
var revision=parseInt($(this).val());
@@ -80,10 +91,16 @@ function createVersionsDropdown(filename, files) {
success: function(response) {
if (response.status=='error') {
OC.dialogs.alert('Failed to revert '+file+' to revision '+formatDate(revision*1000)+'.','Failed to revert');
+ } else {
+ $('#dropdown').hide('blind', function() {
+ $('#dropdown').remove();
+ $('tr').removeClass('mouseOver');
+ // TODO also update the modified time in the web ui
+ });
}
}
});
-
+
}
function addVersion(revision ) {
@@ -107,6 +124,6 @@ function createVersionsDropdown(filename, files) {
}
$('#dropdown').show('blind');
- $('#share_with').chosen();
+
}
diff --git a/apps/files_versions/templates/history.php b/apps/files_versions/templates/history.php
index 6ef996049f..58fea75a0d 100644
--- a/apps/files_versions/templates/history.php
+++ b/apps/files_versions/templates/history.php
@@ -23,7 +23,7 @@ if( isset( $_['message'] ) ) {
echo ' ';
echo OCP\Util::formatDate( $v );
- echo '
Revert';
+ echo '
Revert';
}
diff --git a/apps/files_versions/versions.php b/apps/files_versions/versions.php
index 6c2e104247..8a88808f54 100644
--- a/apps/files_versions/versions.php
+++ b/apps/files_versions/versions.php
@@ -69,8 +69,15 @@ class Storage {
*/
public static function store($filename) {
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
- $versionsfoldername=\OCP\Config::getSystemValue('datadirectory').'/'. \OCP\USER::getUser() .'/'.\OCP\Config::getSystemValue('files_versionsfolder', Storage::DEFAULTFOLDER);
- $filesfoldername=\OCP\Config::getSystemValue('datadirectory').'/'. \OCP\USER::getUser() .'/files';
+ if (\OCP\App::isEnabled('files_sharing') && $source = \OC_Share::getSource('/'.\OCP\User::getUser().'/files'.$filename)) {
+ $pos = strpos($source, '/files', 1);
+ $uid = substr($source, 1, $pos - 1);
+ $filename = substr($source, $pos + 6);
+ } else {
+ $uid = \OCP\User::getUser();
+ }
+ $versionsfoldername=\OCP\Config::getSystemValue('datadirectory').'/'. $uid .'/'.\OCP\Config::getSystemValue('files_versionsfolder', Storage::DEFAULTFOLDER);
+ $filesfoldername=\OCP\Config::getSystemValue('datadirectory').'/'. $uid .'/files';
Storage::init();
// check if filename is a directory
@@ -94,20 +101,21 @@ class Storage {
}
- // check mininterval
- $matches=glob($versionsfoldername.$filename.'.v*');
- sort($matches);
- $parts=explode('.v',end($matches));
- if((end($parts)+Storage::DEFAULTMININTERVAL)>time()){
- return false;
+ // check mininterval if the file is being modified by the owner (all shared files should be versioned despite mininterval)
+ if ($uid == \OCP\User::getUser()) {
+ $matches=glob($versionsfoldername.$filename.'.v*');
+ sort($matches);
+ $parts=explode('.v',end($matches));
+ if((end($parts)+Storage::DEFAULTMININTERVAL)>time()){
+ return false;
+ }
}
-
+
// create all parent folders
$info=pathinfo($filename);
@mkdir($versionsfoldername.$info['dirname'],0700,true);
-
// store a new version of a file
copy($filesfoldername.$filename,$versionsfoldername.$filename.'.v'.time());
@@ -123,10 +131,16 @@ class Storage {
public static function rollback($filename,$revision) {
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
-
- $versionsfoldername=\OCP\Config::getSystemValue('datadirectory').'/'. \OCP\USER::getUser() .'/'.\OCP\Config::getSystemValue('files_versionsfolder', Storage::DEFAULTFOLDER);
+ if (\OCP\App::isEnabled('files_sharing') && $source = \OC_Share::getSource('/'.\OCP\User::getUser().'/files'.$filename)) {
+ $pos = strpos($source, '/files', 1);
+ $uid = substr($source, 1, $pos - 1);
+ $filename = substr($source, $pos + 6);
+ } else {
+ $uid = \OCP\User::getUser();
+ }
+ $versionsfoldername=\OCP\Config::getSystemValue('datadirectory').'/'.$uid .'/'.\OCP\Config::getSystemValue('files_versionsfolder', Storage::DEFAULTFOLDER);
- $filesfoldername=\OCP\Config::getSystemValue('datadirectory').'/'. \OCP\USER::getUser() .'/files';
+ $filesfoldername=\OCP\Config::getSystemValue('datadirectory').'/'. $uid .'/files';
// rollback
if ( @copy($versionsfoldername.$filename.'.v'.$revision,$filesfoldername.$filename) ) {
@@ -148,7 +162,14 @@ class Storage {
*/
public static function isversioned($filename) {
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
- $versionsfoldername=\OCP\Config::getSystemValue('datadirectory').'/'. \OCP\USER::getUser() .'/'.\OCP\Config::getSystemValue('files_versionsfolder', Storage::DEFAULTFOLDER);
+ if (\OCP\App::isEnabled('files_sharing') && $source = \OC_Share::getSource('/'.\OCP\User::getUser().'/files'.$filename)) {
+ $pos = strpos($source, '/files', 1);
+ $uid = substr($source, 1, $pos - 1);
+ $filename = substr($source, $pos + 6);
+ } else {
+ $uid = \OCP\User::getUser();
+ }
+ $versionsfoldername=\OCP\Config::getSystemValue('datadirectory').'/'. $uid .'/'.\OCP\Config::getSystemValue('files_versionsfolder', Storage::DEFAULTFOLDER);
// check for old versions
$matches=glob($versionsfoldername.$filename.'.v*');
@@ -169,7 +190,14 @@ class Storage {
*/
public static function getversions($filename,$count=0) {
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
- $versionsfoldername=\OCP\Config::getSystemValue('datadirectory').'/'. \OCP\USER::getUser() .'/'.\OCP\Config::getSystemValue('files_versionsfolder', Storage::DEFAULTFOLDER);
+ if (\OCP\App::isEnabled('files_sharing') && $source = \OC_Share::getSource('/'.\OCP\User::getUser().'/files'.$filename)) {
+ $pos = strpos($source, '/files', 1);
+ $uid = substr($source, 1, $pos - 1);
+ $filename = substr($source, $pos + 6);
+ } else {
+ $uid = \OCP\User::getUser();
+ }
+ $versionsfoldername=\OCP\Config::getSystemValue('datadirectory').'/'. $uid .'/'.\OCP\Config::getSystemValue('files_versionsfolder', Storage::DEFAULTFOLDER);
$versions=array();
// fetch for old versions
@@ -200,8 +228,14 @@ class Storage {
*/
public static function expire($filename) {
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
-
- $versionsfoldername=\OCP\Config::getSystemValue('datadirectory').'/'. \OCP\USER::getUser() .'/'.\OCP\Config::getSystemValue('files_versionsfolder', Storage::DEFAULTFOLDER);
+ if (\OCP\App::isEnabled('files_sharing') && $source = \OC_Share::getSource('/'.\OCP\User::getUser().'/files'.$filename)) {
+ $pos = strpos($source, '/files', 1);
+ $uid = substr($source, 1, $pos - 1);
+ $filename = substr($source, $pos + 6);
+ } else {
+ $uid = \OCP\User::getUser();
+ }
+ $versionsfoldername=\OCP\Config::getSystemValue('datadirectory').'/'. $uid .'/'.\OCP\Config::getSystemValue('files_versionsfolder', Storage::DEFAULTFOLDER);
// check for old versions
$matches=glob($versionsfoldername.$filename.'.v*');
diff --git a/apps/gallery/appinfo/info.xml b/apps/gallery/appinfo/info.xml
index 43a22bae07..84f6e96099 100644
--- a/apps/gallery/appinfo/info.xml
+++ b/apps/gallery/appinfo/info.xml
@@ -4,7 +4,8 @@
Pictures
AGPL
Bartek Przybylski
-
2
+
4
+
true
Dedicated pictures application
diff --git a/apps/gallery/lib/album.php b/apps/gallery/lib/album.php
index 27d40cdb91..5f962f12f1 100644
--- a/apps/gallery/lib/album.php
+++ b/apps/gallery/lib/album.php
@@ -21,8 +21,6 @@
*
*/
-require_once('base.php');
-
class OC_Gallery_Album {
public static function create($owner, $name, $path){
$stmt = OCP\DB::prepare('INSERT INTO *PREFIX*gallery_albums (uid_owner, album_name, album_path, parent_path) VALUES (?, ?, ?, ?)');
diff --git a/apps/media/appinfo/info.xml b/apps/media/appinfo/info.xml
index b0f205f8b1..e2d9746708 100644
--- a/apps/media/appinfo/info.xml
+++ b/apps/media/appinfo/info.xml
@@ -5,7 +5,8 @@
Media player and server for ownCloud
AGPL
Robin Appelman
-
2
+
4
+
true
diff --git a/apps/remoteStorage/appinfo/info.xml b/apps/remoteStorage/appinfo/info.xml
index 1875e70a30..fa878762a0 100644
--- a/apps/remoteStorage/appinfo/info.xml
+++ b/apps/remoteStorage/appinfo/info.xml
@@ -5,5 +5,6 @@
Enables you to use ownCloud as their remote storage for unhosted applications. This app requires the Webfinger app to be installed and enabled correctly. More info on the website of the unhosted movement.
AGPL or MIT
Michiel de Jong
- 2
+ 4
+ true
diff --git a/apps/tasks/appinfo/info.xml b/apps/tasks/appinfo/info.xml
index 21ab9a2476..736fc23244 100644
--- a/apps/tasks/appinfo/info.xml
+++ b/apps/tasks/appinfo/info.xml
@@ -5,6 +5,7 @@
0.1
AGPL
Bart Visscher
- 2
+ 4
+ true
Tasks view from calendar
diff --git a/apps/tasks/css/style.css b/apps/tasks/css/style.css
index d78521bc09..3cf175e646 100644
--- a/apps/tasks/css/style.css
+++ b/apps/tasks/css/style.css
@@ -32,7 +32,7 @@
.task .completed {position:absolute;left:3em;top:0.3em;}
-.task .summary{padding-left:4em;}
+.task .summary{padding-left:4em;height:2em;}
.task .summary input{position:relative;left:5px;}
.task.done .summary{text-decoration:line-through;}
diff --git a/apps/user_ldap/appinfo/app.php b/apps/user_ldap/appinfo/app.php
index 79675f940b..330574c1d4 100644
--- a/apps/user_ldap/appinfo/app.php
+++ b/apps/user_ldap/appinfo/app.php
@@ -27,12 +27,6 @@ require_once('apps/user_ldap/group_ldap.php');
OCP\App::registerAdmin('user_ldap','settings');
-// define LDAP_DEFAULT_PORT
-define('OC_USER_BACKEND_LDAP_DEFAULT_PORT', 389);
-
-// define OC_USER_BACKEND_LDAP_DEFAULT_DISPLAY_NAME
-define('OC_USER_BACKEND_LDAP_DEFAULT_DISPLAY_NAME', 'uid');
-
// register user backend
OC_User::useBackend( 'LDAP' );
OC_Group::useBackend( new OC_GROUP_LDAP() );
diff --git a/apps/user_ldap/appinfo/info.xml b/apps/user_ldap/appinfo/info.xml
index fe7e61fb5c..de0daf146e 100644
--- a/apps/user_ldap/appinfo/info.xml
+++ b/apps/user_ldap/appinfo/info.xml
@@ -1,11 +1,12 @@
user_ldap
- LDAP user backend
+ LDAP user and group backend
Authenticate Users by LDAP
AGPL
- Dominik Schmidt
- 2
+ Dominik Schmidt and Arthur Schiwon
+ 4
+ true
diff --git a/apps/user_ldap/appinfo/install.php b/apps/user_ldap/appinfo/install.php
new file mode 100644
index 0000000000..9efc3bb24d
--- /dev/null
+++ b/apps/user_ldap/appinfo/install.php
@@ -0,0 +1,6 @@
+getUsers();
+ $query = OCP\DB::prepare($sqlCleanMap);
+ $query->execute();
+ OCP\Config::setSystemValue('ldapIgnoreNamingRules', false);
+ OC_LDAP::init(true);
+ $users_new = $LDAP_USER->getUsers();
+ $query = OCP\DB::prepare($sqlCleanMap);
+ $query->execute();
+ if($users_old !== $users_new) {
+ //we don't need to check Groups, because they were not supported in 3'
+ OCP\Config::setSystemValue('ldapIgnoreNamingRules', true);
+ }
}
\ No newline at end of file
diff --git a/apps/user_ldap/appinfo/version b/apps/user_ldap/appinfo/version
index 57898bb4c2..2f4536184b 100644
--- a/apps/user_ldap/appinfo/version
+++ b/apps/user_ldap/appinfo/version
@@ -1 +1 @@
-0.1.92
\ No newline at end of file
+0.2
\ No newline at end of file
diff --git a/apps/user_ldap/lib_ldap.php b/apps/user_ldap/lib_ldap.php
index 5252f4cce7..5cd7e0241b 100644
--- a/apps/user_ldap/lib_ldap.php
+++ b/apps/user_ldap/lib_ldap.php
@@ -45,14 +45,21 @@ class OC_LDAP {
static protected $ldapAgentPassword;
static protected $ldapTLS;
static protected $ldapNoCase;
+ static protected $ldapIgnoreNamingRules;
// user and group settings, that are needed in both backends
static protected $ldapUserDisplayName;
static protected $ldapUserFilter;
static protected $ldapGroupDisplayName;
static protected $ldapLoginFilter;
- static public function init() {
- self::readConfiguration();
+ /**
+ * @brief initializes the LDAP backend
+ * @param $force read the config settings no matter what
+ *
+ * initializes the LDAP backend
+ */
+ static public function init($force = false) {
+ self::readConfiguration($force);
self::establishConnection();
}
@@ -527,6 +534,10 @@ class OC_LDAP {
}
static private function sanitizeUsername($name) {
+ if(self::$ldapIgnoreNamingRules) {
+ return $name;
+ }
+
//REPLACEMENTS
$name = str_replace(' ', '_', $name);
@@ -594,21 +605,22 @@ class OC_LDAP {
/**
* Caches the general LDAP configuration.
*/
- static private function readConfiguration() {
- if(!self::$configured) {
- self::$ldapHost = OCP\Config::getAppValue('user_ldap', 'ldap_host', '');
- self::$ldapPort = OCP\Config::getAppValue('user_ldap', 'ldap_port', OC_USER_BACKEND_LDAP_DEFAULT_PORT);
- self::$ldapAgentName = OCP\Config::getAppValue('user_ldap', 'ldap_dn','');
- self::$ldapAgentPassword = base64_decode(OCP\Config::getAppValue('user_ldap', 'ldap_agent_password',''));
- self::$ldapBase = OCP\Config::getAppValue('user_ldap', 'ldap_base', '');
- self::$ldapBaseUsers = OCP\Config::getAppValue('user_ldap', 'ldap_base_users',self::$ldapBase);
- self::$ldapBaseGroups = OCP\Config::getAppValue('user_ldap', 'ldap_base_groups', self::$ldapBase);
- self::$ldapTLS = OCP\Config::getAppValue('user_ldap', 'ldap_tls',0);
- self::$ldapNoCase = OCP\Config::getAppValue('user_ldap', 'ldap_nocase', 0);
- self::$ldapUserDisplayName = strtolower(OCP\Config::getAppValue('user_ldap', 'ldap_display_name', OC_USER_BACKEND_LDAP_DEFAULT_DISPLAY_NAME));
- self::$ldapUserFilter = OCP\Config::getAppValue('user_ldap', 'ldap_userlist_filter','objectClass=person');
- self::$ldapLoginFilter = OCP\Config::getAppValue('user_ldap', 'ldap_login_filter', '(uid=%uid)');
- self::$ldapGroupDisplayName = strtolower(OCP\Config::getAppValue('user_ldap', 'ldap_group_display_name', LDAP_GROUP_DISPLAY_NAME_ATTR));
+ static private function readConfiguration($force = false) {
+ if(!self::$configured || $force) {
+ self::$ldapHost = OCP\Config::getAppValue('user_ldap', 'ldap_host', '');
+ self::$ldapPort = OCP\Config::getAppValue('user_ldap', 'ldap_port', 389);
+ self::$ldapAgentName = OCP\Config::getAppValue('user_ldap', 'ldap_dn','');
+ self::$ldapAgentPassword = base64_decode(OCP\Config::getAppValue('user_ldap', 'ldap_agent_password',''));
+ self::$ldapBase = OCP\Config::getAppValue('user_ldap', 'ldap_base', '');
+ self::$ldapBaseUsers = OCP\Config::getAppValue('user_ldap', 'ldap_base_users',self::$ldapBase);
+ self::$ldapBaseGroups = OCP\Config::getAppValue('user_ldap', 'ldap_base_groups', self::$ldapBase);
+ self::$ldapTLS = OCP\Config::getAppValue('user_ldap', 'ldap_tls',0);
+ self::$ldapNoCase = OCP\Config::getAppValue('user_ldap', 'ldap_nocase', 0);
+ self::$ldapUserDisplayName = strtolower(OCP\Config::getAppValue('user_ldap', 'ldap_display_name', 'uid'));
+ self::$ldapUserFilter = OCP\Config::getAppValue('user_ldap', 'ldap_userlist_filter','objectClass=person');
+ self::$ldapLoginFilter = OCP\Config::getAppValue('user_ldap', 'ldap_login_filter', '(uid=%uid)');
+ self::$ldapGroupDisplayName = strtolower(OCP\Config::getAppValue('user_ldap', 'ldap_group_display_name', LDAP_GROUP_DISPLAY_NAME_ATTR));
+ self::$ldapIgnoreNamingRules = OCP\Config::getSystemValue('ldapIgnoreNamingRules', false);
if(empty(self::$ldapBaseUsers)) {
OCP\Util::writeLog('ldap', 'Base for Users is empty, using Base DN', OCP\Util::INFO);
diff --git a/apps/user_ldap/settings.php b/apps/user_ldap/settings.php
index 835b6a04e2..9c0620578b 100644
--- a/apps/user_ldap/settings.php
+++ b/apps/user_ldap/settings.php
@@ -52,8 +52,8 @@ foreach($params as $param){
}
// settings with default values
-$tmpl->assign( 'ldap_port', OCP\Config::getAppValue('user_ldap', 'ldap_port', OC_USER_BACKEND_LDAP_DEFAULT_PORT));
-$tmpl->assign( 'ldap_display_name', OCP\Config::getAppValue('user_ldap', 'ldap_display_name', OC_USER_BACKEND_LDAP_DEFAULT_DISPLAY_NAME));
+$tmpl->assign( 'ldap_port', OCP\Config::getAppValue('user_ldap', 'ldap_port', '389'));
+$tmpl->assign( 'ldap_display_name', OCP\Config::getAppValue('user_ldap', 'ldap_display_name', 'uid'));
$tmpl->assign( 'ldap_group_member_assoc_attribute', OCP\Config::getAppValue('user_ldap', 'ldap_group_member_assoc_attribute', 'uniqueMember'));
$tmpl->assign( 'ldap_agent_password', base64_decode(OCP\Config::getAppValue('user_ldap', 'ldap_agent_password')));
diff --git a/apps/user_migrate/appinfo/info.xml b/apps/user_migrate/appinfo/info.xml
index 4c3646f770..a128742480 100644
--- a/apps/user_migrate/appinfo/info.xml
+++ b/apps/user_migrate/appinfo/info.xml
@@ -5,6 +5,7 @@
Migrate your user accounts
AGPL
Tom Needham
- 2
+ 4
+ true
diff --git a/apps/user_openid/appinfo/info.xml b/apps/user_openid/appinfo/info.xml
index 6214229c0a..268af23973 100644
--- a/apps/user_openid/appinfo/info.xml
+++ b/apps/user_openid/appinfo/info.xml
@@ -5,7 +5,8 @@
Allow login through OpenID
AGPL
Robin Appelman
- 2
+ 4
+ true
diff --git a/apps/user_openid/user.php b/apps/user_openid/user.php
index 9f751da5ed..392424795f 100644
--- a/apps/user_openid/user.php
+++ b/apps/user_openid/user.php
@@ -36,7 +36,6 @@ if($USERNAME=='' and isset($_SERVER['PHP_AUTH_USER'])){
$RUNTIME_NOAPPS=true;
$RUNTIME_NOAPPS=false;
-require_once '../../lib/base.php';
OCP\App::checkAppEnabled('user_openid');
if(!OCP\User::userExists($USERNAME)){
diff --git a/apps/user_webfinger/appinfo/info.xml b/apps/user_webfinger/appinfo/info.xml
index fe1d437186..4e28814a26 100644
--- a/apps/user_webfinger/appinfo/info.xml
+++ b/apps/user_webfinger/appinfo/info.xml
@@ -5,5 +5,6 @@
Provide WebFinger for all users so they get a user address like user@owncloudinstance which can be used for external applications. Other apps can provide information for webfinger requests, such as remoteStorage compatibility.
AGPL or MIT
Michiel de Jong, Florian Hülsmann
- 2
+ 4
+ true
diff --git a/core/img/filetypes/application-msexcel.png b/core/img/filetypes/application-msexcel.png
new file mode 100644
index 0000000000..abcd93689a
Binary files /dev/null and b/core/img/filetypes/application-msexcel.png differ
diff --git a/core/img/filetypes/application-mspowerpoint.png b/core/img/filetypes/application-mspowerpoint.png
new file mode 100644
index 0000000000..b4aaad9a45
Binary files /dev/null and b/core/img/filetypes/application-mspowerpoint.png differ
diff --git a/core/img/filetypes/application-msword.png b/core/img/filetypes/application-msword.png
new file mode 100644
index 0000000000..6f7bb520f2
Binary files /dev/null and b/core/img/filetypes/application-msword.png differ
diff --git a/core/templates/login.php b/core/templates/login.php
index a40bf5c330..41d6ba41ef 100644
--- a/core/templates/login.php
+++ b/core/templates/login.php
@@ -1,7 +1,7 @@