From dfd5a9759c591ed92d5e55c59ca98afbb35eed7d Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Fri, 25 May 2012 11:31:46 +0200 Subject: [PATCH 1/7] only enable compatible apps --- lib/app.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/app.php b/lib/app.php index 04fc264d11a..658aba92904 100644 --- a/lib/app.php +++ b/lib/app.php @@ -189,8 +189,16 @@ class OC_App{ } } if($app!==false){ - OC_Appconfig::setValue( $app, 'enabled', 'yes' ); - return true; + // check if the app is compatible with this version of ownCloud + $info=OC_App::getAppInfo($app); + $version=OC_Util::getVersion(); + if(!isset($info['require']) or ($version[0]>$info['require'])){ + OC_Log::write('core','App can\'t be installed because it is not compatible with this version of ownCloud',OC_Log::ERROR); + return false; + }else{ + OC_Appconfig::setValue( $app, 'enabled', 'yes' ); + return true; + } }else{ return false; } From 85dbfc8165f4249ec0cdf3ab6f8b203ed512b6ca Mon Sep 17 00:00:00 2001 From: Brice Maron Date: Fri, 25 May 2012 22:17:38 +0000 Subject: [PATCH 2/7] Correct small typo to Crypt_Blowfish 3drparty fix oc-810 --- 3rdparty/Crypt_Blowfish/Blowfish.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty/Crypt_Blowfish/Blowfish.php b/3rdparty/Crypt_Blowfish/Blowfish.php index a7b8948f043..4ccacb963e3 100644 --- a/3rdparty/Crypt_Blowfish/Blowfish.php +++ b/3rdparty/Crypt_Blowfish/Blowfish.php @@ -221,7 +221,7 @@ class Crypt_Blowfish function decrypt($cipherText) { if (!is_string($cipherText)) { - PEAR::raiseError('Chiper text must be a string', 1, PEAR_ERROR_DIE); + PEAR::raiseError('Cipher text must be a string', 1, PEAR_ERROR_DIE); } if (extension_loaded('mcrypt')) { From a1c9191006a4dada8adbd00193f95392b36e41b4 Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Sat, 26 May 2012 15:23:46 +0200 Subject: [PATCH 3/7] fix share for users with a point within their name --- apps/calendar/js/calendar.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/calendar/js/calendar.js b/apps/calendar/js/calendar.js index 243ce1798bc..e27fe49c54f 100644 --- a/apps/calendar/js/calendar.js +++ b/apps/calendar/js/calendar.js @@ -506,10 +506,11 @@ Calendar={ }, dropdown:function(userid, calid){ $('.calendar_share_dropdown').remove(); - $('
').appendTo('#'+userid+'_'+calid); + var element = document.getElementById(userid+'_'+calid); + $('
').appendTo(element); $.get(OC.filePath('calendar', 'ajax/share', 'dropdown.php') + '?calid=' + calid, function(data){ - $('#'+userid+'_'+calid+' > .calendar_share_dropdown').html(data); - $('#'+userid+'_'+calid+' > .calendar_share_dropdown').show('blind'); + $('.calendar_share_dropdown').html(data); + $('.calendar_share_dropdown').show('blind'); $('#share_user').chosen(); $('#share_group').chosen(); }); From d2369b6e964f9bc757ce0fed000bf50a03c9d2dc Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Sat, 26 May 2012 16:38:37 +0200 Subject: [PATCH 4/7] LDAP: support for 'member' as group-member-association --- apps/user_ldap/group_ldap.php | 3 ++- apps/user_ldap/templates/settings.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php index 01aa2220df5..b3ff6c53881 100644 --- a/apps/user_ldap/group_ldap.php +++ b/apps/user_ldap/group_ldap.php @@ -85,7 +85,8 @@ class OC_GROUP_LDAP extends OC_Group_Backend { } //uniqueMember takes DN, memberuid the uid, so we need to distinguish - if(strtolower($this->ldapGroupMemberAssocAttr) == 'uniquemember') { + if((strtolower($this->ldapGroupMemberAssocAttr) == 'uniquemember') + || (strtolower($this->ldapGroupMemberAssocAttr) == 'member')) { $uid = $userDN; } else if(strtolower($this->ldapGroupMemberAssocAttr) == 'memberuid') { $result = OC_LDAP::readAttribute($userDN, 'uid'); diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php index d6c1a8ec0ec..ac263ed68c3 100644 --- a/apps/user_ldap/templates/settings.php +++ b/apps/user_ldap/templates/settings.php @@ -17,7 +17,7 @@

-

+

>

>

From a945fa10a639cdee9e5e712cd48e8c911a8d9821 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Sat, 26 May 2012 19:14:24 +0200 Subject: [PATCH 5/7] update copyright --- apps/external/ajax/setsites.php | 2 +- apps/external/appinfo/app.php | 2 +- apps/external/index.php | 2 +- apps/files/appinfo/remote.php | 2 +- apps/files_encryption/lib/crypt.php | 2 +- apps/files_versions/history.php | 2 +- apps/remoteStorage/WebDAV.php | 2 +- apps/remoteStorage/ajax/revokeToken.php | 2 +- apps/remoteStorage/auth.php | 2 +- core/lostpassword/index.php | 2 +- core/lostpassword/resetpassword.php | 2 +- files/webdav.php | 2 +- index.php | 3 ++- lib/app.php | 2 +- lib/appconfig.php | 2 +- lib/base.php | 2 +- lib/config.php | 2 +- lib/db.php | 2 +- lib/files.php | 2 +- lib/filestorage.php | 2 +- lib/filesystem.php | 2 +- lib/filesystemview.php | 2 +- lib/group.php | 2 +- lib/group/backend.php | 2 +- lib/group/database.php | 2 +- lib/group/dummy.php | 2 +- lib/group/example.php | 2 +- lib/helper.php | 2 +- lib/installer.php | 2 +- lib/l10n.php | 2 +- lib/ocs.php | 2 +- lib/ocsclient.php | 2 +- lib/preferences.php | 2 +- lib/public/app.php | 2 +- lib/public/config.php | 2 +- lib/public/db.php | 2 +- lib/public/files.php | 2 +- lib/public/json.php | 2 +- lib/public/response.php | 2 +- lib/public/template.php | 2 +- lib/public/user.php | 2 +- lib/public/util.php | 2 +- lib/search.php | 2 +- lib/template.php | 2 +- lib/updater.php | 2 +- lib/user.php | 2 +- lib/user/backend.php | 2 +- lib/user/database.php | 2 +- lib/user/dummy.php | 2 +- lib/user/example.php | 2 +- ocs/providers.php | 2 +- ocs/v1.php | 2 +- settings/apps.php | 2 +- settings/help.php | 2 +- settings/templates/help.php | 2 +- status.php | 2 +- webapps.php | 2 +- 57 files changed, 58 insertions(+), 57 deletions(-) mode change 100644 => 100755 index.php diff --git a/apps/external/ajax/setsites.php b/apps/external/ajax/setsites.php index c14daa258c1..c758a3508c5 100644 --- a/apps/external/ajax/setsites.php +++ b/apps/external/ajax/setsites.php @@ -1,7 +1,7 @@ + * 2012 Frank Karlitschek frank@owncloud.org * This file is licensed under the Affero General Public License version 3 or later. * See the COPYING-README file. */ diff --git a/apps/external/appinfo/app.php b/apps/external/appinfo/app.php index b569fc305ba..ee5437782cd 100644 --- a/apps/external/appinfo/app.php +++ b/apps/external/appinfo/app.php @@ -4,7 +4,7 @@ * ownCloud - External plugin * * @author Frank Karlitschek - * @copyright 2011 Frank Karlitschek karlitschek@kde.org + * @copyright 2012 Frank Karlitschek frank@owncloud.org * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE diff --git a/apps/external/index.php b/apps/external/index.php index d63be3ad1d5..81819e76e2f 100644 --- a/apps/external/index.php +++ b/apps/external/index.php @@ -4,7 +4,7 @@ * ownCloud - External plugin * * @author Frank Karlitschek - * @copyright 2011 Frank Karlitschek karlitschek@kde.org + * @copyright 2012 Frank Karlitschek frank@owncloud.org * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE diff --git a/apps/files/appinfo/remote.php b/apps/files/appinfo/remote.php index b66843556bb..a84216b61b7 100644 --- a/apps/files/appinfo/remote.php +++ b/apps/files/appinfo/remote.php @@ -5,7 +5,7 @@ * * @author Frank Karlitschek * @author Jakob Sack - * @copyright 2010 Frank Karlitschek karlitschek@kde.org + * @copyright 2012 Frank Karlitschek frank@owncloud.org * @copyright 2011 Jakob Sack kde@jakobsack.de * * This library is free software; you can redistribute it and/or diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php index 37eaedc3fc9..ec27900cbc6 100644 --- a/apps/files_encryption/lib/crypt.php +++ b/apps/files_encryption/lib/crypt.php @@ -3,7 +3,7 @@ * ownCloud * * @author Frank Karlitschek - * @copyright 2010 Frank Karlitschek karlitschek@kde.org + * @copyright 2012 Frank Karlitschek frank@owncloud.org * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE diff --git a/apps/files_versions/history.php b/apps/files_versions/history.php index f12dc618f23..11c07ef86ce 100644 --- a/apps/files_versions/history.php +++ b/apps/files_versions/history.php @@ -4,7 +4,7 @@ * ownCloud - History page of the Versions App * * @author Frank Karlitschek - * @copyright 2011 Frank Karlitschek karlitschek@kde.org + * @copyright 2012 Frank Karlitschek frank@owncloud.org * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE diff --git a/apps/remoteStorage/WebDAV.php b/apps/remoteStorage/WebDAV.php index ab498db07da..7a81c18e0af 100644 --- a/apps/remoteStorage/WebDAV.php +++ b/apps/remoteStorage/WebDAV.php @@ -5,7 +5,7 @@ * * Original: * @author Frank Karlitschek -* @copyright 2010 Frank Karlitschek karlitschek@kde.org +* @copyright 2012 Frank Karlitschek frank@owncloud.org * * Adapted: * @author Michiel de Jong, 2011 diff --git a/apps/remoteStorage/ajax/revokeToken.php b/apps/remoteStorage/ajax/revokeToken.php index 699b9e9aeec..322d9ed7279 100644 --- a/apps/remoteStorage/ajax/revokeToken.php +++ b/apps/remoteStorage/ajax/revokeToken.php @@ -5,7 +5,7 @@ * * Original: * @author Frank Karlitschek -* @copyright 2010 Frank Karlitschek karlitschek@kde.org +* @copyright 2012 Frank Karlitschek frank@owncloud.org * * Adapted: * @author Michiel de Jong, 2012 diff --git a/apps/remoteStorage/auth.php b/apps/remoteStorage/auth.php index a54be37b2e6..ac0e83bb373 100644 --- a/apps/remoteStorage/auth.php +++ b/apps/remoteStorage/auth.php @@ -5,7 +5,7 @@ * * Original: * @author Frank Karlitschek -* @copyright 2010 Frank Karlitschek karlitschek@kde.org +* @copyright 2012 Frank Karlitschek frank@owncloud.org * * Adapted: * @author Michiel de Jong, 2012 diff --git a/core/lostpassword/index.php b/core/lostpassword/index.php index 2b87a1eb111..6a4748588fc 100644 --- a/core/lostpassword/index.php +++ b/core/lostpassword/index.php @@ -1,6 +1,6 @@ diff --git a/status.php b/status.php index 81f339fa53f..2d31702ecb3 100644 --- a/status.php +++ b/status.php @@ -4,7 +4,7 @@ * ownCloud status page. usefull if you want to check from the outside if an owncloud installation exists * * @author Frank Karlitschek -* @copyright 2010 Frank Karlitschek karlitschek@kde.org +* @copyright 2012 Frank Karlitschek frank@owncloud.org * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE diff --git a/webapps.php b/webapps.php index 99553fa8ef0..b5fee9bf85f 100644 --- a/webapps.php +++ b/webapps.php @@ -4,7 +4,7 @@ * ownCloud status page. usefull if you want to check from the outside if an owncloud installation exists * * @author Frank Karlitschek -* @copyright 2010 Frank Karlitschek karlitschek@kde.org +* @copyright 2012 Frank Karlitschek frank@owncloud.org * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE From 982cde0bb1a9230b793f7341eba5d8117c48ca0b Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Sat, 26 May 2012 20:37:10 +0200 Subject: [PATCH 6/7] check during ownCloud upgrade if all the installed apps are compatible with the new ownCloud version. Disable them if not --- lib/app.php | 24 ++++++++++++++++++++++-- settings/js/apps.js | 4 ++-- 2 files changed, 24 insertions(+), 4 deletions(-) mode change 100644 => 100755 lib/app.php diff --git a/lib/app.php b/lib/app.php old mode 100644 new mode 100755 index c639d2c4a5b..78de0fa21b6 --- a/lib/app.php +++ b/lib/app.php @@ -189,11 +189,11 @@ class OC_App{ } } if($app!==false){ - // check if the app is compatible with this version of ownCloud + // check if the app is compatible with this version of ownCloud $info=OC_App::getAppInfo($app); $version=OC_Util::getVersion(); if(!isset($info['require']) or ($version[0]>$info['require'])){ - OC_Log::write('core','App can\'t be installed because it is not compatible with this version of ownCloud',OC_Log::ERROR); + OC_Log::write('core','App "'.$info['name'].'" can\'t be installed because it is not compatible with this version of ownCloud',OC_Log::ERROR); return false; }else{ OC_Appconfig::setValue( $app, 'enabled', 'yes' ); @@ -525,6 +525,26 @@ class OC_App{ } } } + + // check if the current enabled apps are compatible with the current ownCloud version. disable them if not. + // this is important if you upgrade ownCloud and have non ported 3rd party apps installed + $apps =OC_App::getEnabledApps(); + $version=OC_Util::getVersion(); + foreach($apps as $app) { + + // check if the app is compatible with this version of ownCloud + $info=OC_App::getAppInfo($app); + if(!isset($info['require']) or ($version[0]>$info['require'])){ + OC_Log::write('core','App "'.$info['name'].'" can\'t be used because it is not compatible with this version of ownCloud',OC_Log::ERROR); + OC_App::disable( $app ); + } + + + + } + + + } /** diff --git a/settings/js/apps.js b/settings/js/apps.js index 8aa54463b3b..f6e08b608bd 100644 --- a/settings/js/apps.js +++ b/settings/js/apps.js @@ -41,7 +41,7 @@ $(document).ready(function(){ if(active){ $.post(OC.filePath('settings','ajax','disableapp.php'),{appid:app},function(result){ if(!result || result.status!='success'){ - OC.dialogs.alert('Error','Error while disabling app'); + OC.dialogs.alert('Error while disabling app','Error'); } else { element.data('active',false); @@ -54,7 +54,7 @@ $(document).ready(function(){ }else{ $.post(OC.filePath('settings','ajax','enableapp.php'),{appid:app},function(result){ if(!result || result.status!='success'){ - OC.dialogs.alert('Error','Error while enabling app'); + OC.dialogs.alert('Error while enabling app','Error'); } else { element.data('active',true); From 143287738ad9415b910240563de71cc7dbd6f2da Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sat, 26 May 2012 21:50:36 +0200 Subject: [PATCH 7/7] allow longer paths for gallery --- apps/gallery/appinfo/database.xml | 6 +++--- apps/gallery/appinfo/version | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/gallery/appinfo/database.xml b/apps/gallery/appinfo/database.xml index e3b13f7e93c..f370e1521e4 100644 --- a/apps/gallery/appinfo/database.xml +++ b/apps/gallery/appinfo/database.xml @@ -31,13 +31,13 @@ album_path text true - 100 + 256 parent_path text true - 100 + 256 @@ -63,7 +63,7 @@ file_path text true - 100 + 256 diff --git a/apps/gallery/appinfo/version b/apps/gallery/appinfo/version index 2b7c5ae0184..17b2ccd9bf9 100644 --- a/apps/gallery/appinfo/version +++ b/apps/gallery/appinfo/version @@ -1 +1 @@ -0.4.2 +0.4.3