Commit Graph

143 Commits

Author SHA1 Message Date
Thomas Müller 40b2889785 shipped apps are now defined in core/shipped.json - the shipped tag in info.xml is ignored from now on - never trust an app 🙊 2015-03-13 11:18:39 +01:00
Lukas Reschke d5a8225c0e Fix totally broken AppStore code...
As it turned out the AppStore code was completely broken when it came from apps delivered from the appstore, this meant:

1. You could not disable and then re-enable an application that was installed from the AppStore. It simply failed hard.
2. You could not disable apps from the categories but only from the "Activated" page
3. It did not show the activation state from any category page

This code is completely static and thus testing it is impossible. We really have to stop with "let's add yet another feature in already existing static code". Such stuff has to get refactored first.

That said, this code works from what I can say when clicking around in the AppStore page GUI. However, it may easily be that it does not work with updates or whatsever as I have no chance to test that since the AppStore code is not open-source and it is impossible to write unit-tests for that.

Fixes https://github.com/owncloud/core/issues/14711
2015-03-06 00:16:17 +01:00
Morris Jobke ac10441600 Merge pull request #14326 from owncloud/remove-unnessary-backslashes-from-translation
Remove unnecessary backslashes from translations
2015-03-04 09:58:42 +01:00
Morris Jobke 06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00
Thomas Müller bbf7f56f94 3rd-party apps are disabled on upgrade - refs #14026 2015-02-24 12:02:36 +01:00
Thomas Müller 39d8406933 don't allow installation of already installed apps - fixes #14004 2015-02-23 23:16:28 +01:00
Vincent Petry 4290e1990e Merge pull request #13829 from owncloud/appmanager-list
Better caching for enabled apps
2015-02-23 16:03:32 +01:00
Jenkins for ownCloud 6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Joas Schilling eaccd2a72a Remove unnecessary backslashes from translations 2015-02-18 14:17:53 +01:00
Robin Appelman e672f8cc8f Use appmanager in OC_App::enable/disable 2015-02-17 15:05:29 +01:00
Robin Appelman 04628cf368 better name for getAppsEnabledForUser 2015-02-17 15:05:29 +01:00
Lukas Reschke 886bda5f81 Refactor OC_Request into TrustedDomainHelper and IRequest
This changeset removes the static class `OC_Request` and moves the functions either into `IRequest` which is accessible via `\OC::$server::->getRequest()` or into a separated `TrustedDomainHelper` class for some helper methods which should not be publicly exposed.

This changes only internal methods and nothing on the public API. Some public functions in `util.php` have been deprecated though in favour of the new non-static functions.

Unfortunately some part of this code uses things like `__DIR__` and thus is not completely unit-testable. Where tests where possible they ahve been added though.

Fixes https://github.com/owncloud/core/issues/13976 which was requested in https://github.com/owncloud/core/pull/13973#issuecomment-73492969
2015-02-16 22:13:00 +01:00
Robin Appelman 23ab25e93a Use the app manager from oc_app 2015-02-16 15:16:13 +01:00
Lukas Reschke 7e45f5d27b Remove unused function and correct PHPDoc 2015-02-16 13:46:45 +01:00
Morris Jobke 1bb6de7c1b Merge pull request #13425 from owncloud/phpdoc_cleanup
Cleanup of PHPDoc return types
2015-02-10 01:14:00 +01:00
Vincent Petry 605e2357a1 Merge pull request #13852 from owncloud/cache-app-versions
Cache app versions
2015-02-09 18:03:19 +01:00
Robin Appelman 6f118d7f8d clear app version cache on upgrade 2015-02-03 15:23:51 +01:00
Robin Appelman 70fd3a267f Cache app versions 2015-02-03 14:13:44 +01:00
Morris Jobke d70160c607 enabled disabled files app in repair step 2015-02-03 14:03:43 +01:00
Morris Jobke a7eedf0149 Disallow disabling of files app 2015-02-03 00:39:01 +01:00
Lukas Reschke 744cf713f7 Merge pull request #13319 from owncloud/replace-line-breaks-in-app-description
replace line breaks in the app description by spaces - fixes #13315
2015-01-17 01:03:41 +01:00
Robin McCorkell 2b99fc76ec Cleanup of PHPDoc return types 2015-01-16 20:30:43 +00:00
Lukas Reschke a1e92d61b3 Fix PHPDoc 2015-01-15 22:50:42 +01:00
Morris Jobke 520d8ec53b OC_App::parseAppInfo
* replace line breaks (on non empty lines) in the app description by spaces
* fixes #13315
* includes unit tests
2015-01-14 13:58:31 +01:00
Joas Schilling 4b3a3dc0bb Check new and old ways of required oC version for app compatibility 2015-01-14 13:02:02 +01:00
Thomas Müller dcb88e395b rework api of DependencyAnalyzer 2014-12-12 12:34:53 +01:00
Thomas Müller d94c1731d7 check app dependencies on installation as well 2014-12-11 17:02:07 +01:00
Thomas Müller 1354cee18e translate labels properly 2014-12-04 11:40:33 +01:00
Thomas Müller c503ecd544 Introduce app info xml parser including basic unit test - necessary for #10777 2014-11-25 11:53:28 +01:00
Lukas Reschke 5f8fb8d1ee Run preupdate before an update
The update routine tries to test the database migration before actually performing the update.

However, this will fail hard if the schema has changed (for example an unique key has been added). App developers can convert the DB in preupdate.php, however it is not called before and therefore the update fails.

This actually breaks ownCloud updates from ownCloud 6 to ownCloud 7 when the files_antivirus app is enabled.
2014-11-13 12:07:49 +01:00
Thomas Müller 99921489cf prevent PHP notice 2014-10-30 17:24:25 +01:00
Robin Appelman 1e69f5e7ac Log some basic events 2014-10-20 13:38:38 +02:00
Vincent Petry 27c22f071d Encapsulate require_once to avoid name space bleedind
The script required by require_once might use variable names like $app
which will conflict with the code that follows.

This fix encapsulates require_once into its own function to avoid such
issues.
2014-10-17 12:45:45 +02:00
Lukas Reschke 53e0cf2f74 Add a try catch block
This function might also be called before ownCloud is setup which results in a PHP fatal error. We therefore should gracefully catch errors in there.
2014-10-16 21:45:09 +02:00
Thomas Müller b091394a90 introduce new app page layout
filter installed and not-installed apps properly

kill unneeded file

load category 'Installed' on page load

adding documentation links

new apps mgmt: first style adjustment

apps mgmt: only show license and preview if they exist

adding buttons

new apps mgmt: fix for mobile

use app icon if available

new apps mgmt: position enable/disable toggle to the right

new apps mgmt: proper display of icons or previews

new apps mgmt: fix loading spinner

reenable group selection for apps

new apps mgmt: position enable button normally again

new apps mgmt: clarify wording from 'Installed' to 'Enabled'

reintroduce enable/disable

Move rating image path generation to client-side

Move expression outside of l10n

fix group handling

add buttons for 'More apps' and 'Add your app' again

disable changed date of app for now

adding recommended label

style 'Recommended' app tag

fixing php warning

sort by rating

adding meta-category 'Recommended'

 Only show existing documentation links

lacy loading of screenshots

making group based app activation work again

adding support to get the app icon not only by the app name but also simply by the fixed name 'app.svg'

adding app.svg for all core apps

query string '?installed' is not longer needed

update and uninstall is back + error feedback

remove unneeded parameter

fix alignment of 'recommended' label
2014-10-15 15:21:40 +02:00
Vincent Petry c82e310e20 Merge pull request #11495 from owncloud/apps-clearenableappscacheafterloadingauthapp
Clear enabled apps cache after loading authentication app
2014-10-09 17:20:05 +02:00
Lukas Reschke 16cd749065 Add support for keys in the info.xml
This allows to have links to different doc base URLs

a.
2014-10-09 15:48:30 +02:00
Vincent Petry 36d22825e0 Clear enabled apps cache after loading authentication app
Since getEnabledApps() depends on an authentication app to be loaded,
especially in the case of LDAP, the cache from getEnabledApps() is now
cleared to make sure that subsequent calls will properly return apps
that were enabled for groups.
This is because getEnabledApps() uses the inGroups() function from the
group manager provided by LDAP or any other authentication app.
2014-10-09 14:34:41 +02:00
Vincent Petry e05b95636b Fix upgrade process when apps enabled for specific groups
Fix issue where the currently logged user was causing side-effects when
upgrading.
Now setting incognito mode (no user) on update to make sure the whole
apps list is taken into account with getEnabledApps() or isEnabled().
2014-09-02 17:16:14 +02:00
Robin Appelman d0266c0bf8 Use public api for getting l10n 2014-08-31 10:08:22 +02:00
Robin Appelman fdfc5c67f8 Merge pull request #9866 from owncloud/app-upgrade
Don't do app upgrades in the background
2014-08-19 13:33:38 +02:00
Georg Ehrke 7347174636 check if array index ocsid is set before accessing it 2014-08-17 22:26:14 +02:00
Vincent Petry a32eac1477 Fix issue when no apps are enabled
Properly initialize $apps array
2014-08-11 20:36:51 +02:00
Robin Appelman ae263da69a Also set the app version when updating from app store 2014-08-04 13:41:05 +02:00
Robin Appelman 776cc45a5a Allow loading app without checking the upgrade 2014-08-04 13:41:05 +02:00
Robin Appelman 4608f8a3b5 Throw an exception when we try to load an app that needs to be upgraded 2014-08-04 13:41:04 +02:00
Vincent Petry e58dce2ee0 Merge pull request #9571 from owncloud/fix_appstore_update_issue
Fix update to button issue
2014-07-14 10:00:39 +02:00
Georg Ehrke fb685b0856 improve check for duplicate apps 2014-07-10 17:18:10 +02:00
Thomas Müller 5d2a3c83ac adding 'groups' entry to remote apps 2014-07-09 11:23:17 +02:00
Thomas Müller 1ae6e1bcf8 fixing typos 2014-07-09 10:20:17 +02:00
Georg Ehrke e5e8e28ae7 add ocsids to info.xml 2014-07-07 17:11:50 +02:00
Georg Ehrke 1565089c02 fix phpDocBlock for OC_App::getAppInfo 2014-07-05 13:32:21 +02:00
Georg Ehrke 042ec984bd better validation: cadd extra check if appinfo/info.xml exists 2014-07-05 13:28:47 +02:00
Vincent Petry 7c17452028 Added unit test for default app URL 2014-07-01 16:55:29 +02:00
Georg Ehrke 09356bc5b3 better validation for OC_App::getAppPath() 2014-06-25 16:24:55 +02:00
Robin Appelman 2547945779 Add comment 2014-06-23 15:14:35 +02:00
Robin Appelman 8b41689fe6 Only cache enabled apps when logged in 2014-06-23 13:55:21 +02:00
Georg Ehrke 602404c631 fix php doc block 2014-06-10 13:58:41 +02:00
Georg Ehrke 6bf06890e7 always return a bool in OC_App::updateApp 2014-06-10 13:56:05 +02:00
Georg Ehrke 5d4f3baf56 fix php doc block 2014-06-10 13:51:20 +02:00
Georg Ehrke 1ab9bdcaa0 remove unnecessary @return 2014-06-10 13:01:10 +02:00
Georg Ehrke a110973b3a some additional type checks 2014-06-06 09:41:53 +02:00
Georg Ehrke 0fe8f77c17 Merge branch 'master' into update_shipped_apps_from_appstore
Conflicts:
	lib/private/app.php
	settings/templates/apps.php
2014-06-05 22:54:27 +02:00
Vincent Petry 5b97369b00 Simulate apps database schema update on upgrade
When upgrade, also simulate the database schema update for apps before
doing the actual upgrade.
2014-06-04 17:16:44 +02:00
Robin Appelman 3b1f291c60 Fix sorting of apps 2014-06-03 12:42:35 +02:00
Robin Appelman c09852e006 Fix phpdoc 2014-06-03 12:42:35 +02:00
Robin Appelman 53dc30af4f Add option to enable app for specific groups 2014-06-03 12:42:35 +02:00
Robin Appelman b4025b3174 Allow enabling apps by group by setting the config value to a json encoded array of groups 2014-06-03 12:42:35 +02:00
Georg Ehrke eea501b847 various fixes as requested by pr reviewers 2014-06-02 21:39:15 +02:00
Georg Ehrke 020255b4e5 add button for properly uninstalling apps 2014-05-31 17:50:39 +02:00
Georg Ehrke c8636ca4d9 Merge branch 'master' into update_shipped_apps_from_appstore
Conflicts:
	lib/private/app.php
	lib/private/installer.php
2014-05-31 14:55:00 +02:00
Georg Ehrke 2bcfd8e084 make it possible to update shipped apps via the appstore 2014-05-31 12:17:54 +02:00
Vincent Petry 02f682b156 Now showing disabled apps as upgrade status line
- Added app id in update overview.
- Added status message for disabled app for CLI upgrade and web upgrade
2014-05-27 15:20:33 +02:00
Vincent Petry d43a7c5f6e Added requiremin/requiremax fields for apps
Apps can now specify a minimum and maximum version of ownCloud in which
they are supported.
2014-05-27 11:54:12 +02:00
Morris Jobke dc36d30953 Remove all occurences of @brief and @returns from PHPDoc
* test case added to avoid adding them later
2014-05-19 17:50:53 +02:00
Robin McCorkell b5bc37d2e4 Fix @return array PHPDocs, in /lib 2014-05-13 19:08:14 +01:00
Lukas Reschke e88731a477 Some more PHPDoc fixes 2014-04-21 15:44:54 +02:00
Bart Visscher a4b7f5155f Fix PHPdoc in lib/private
using scrutinizer patch
2014-04-15 22:55:20 +02:00
Myles McNamara 195bdff91f move replace to inside isset 2014-02-28 11:19:19 -05:00
Myles McNamara 4ab7f58745 replace spaces in download link without encoding entire URL 2014-02-28 11:15:49 -05:00
Thomas Müller fbea02bebb kill $coreStyles and $coreScripts 2014-02-20 14:18:01 +01:00
Scrutinizer Auto-Fixer adaee6a5a1 Scrutinizer Auto-Fixes
This patch was automatically generated as part of the following inspection:
https://scrutinizer-ci.com/g/owncloud/core/inspections/cdfecc4e-a37e-4233-8025-f0d7252a8720

Enabled analysis tools:
 - PHP Analyzer
 - JSHint
 - PHP Copy/Paste Detector
 - PHP PDepend
2014-02-19 09:31:54 +01:00
Jörn Friedrich Dreyer 2a6a9a8cef polish documentation based on scrutinizer patches 2014-02-06 17:02:21 +01:00
Robin Appelman 0d9fe770f3 Mark an app as loaded before we start loading it 2014-01-31 15:12:21 +01:00
Bjoern Schiessle bf0471a92e show link to app documentation 2014-01-17 14:56:25 +01:00
Vincent Petry c6377e9125 Fixed apps loading order
On SQLite the app order can be arbitrary and cause strange bugs.
On MySQL, the app order seems to be always alphabetical.

This fix enforces alphabetical order to make sure that all environments
behave the same and to reduce bugs related to app loading order.

Fixes #6442
2013-12-20 17:16:57 +01:00
Bjoern Schiessle bd450d6f6b add post_enable hook if a app gets enabled 2013-10-22 16:15:19 +02:00
Morris Jobke 793ccfd1df fix undefined "shipped" 2013-10-17 11:35:13 +02:00
Frank Karlitschek 258ccdfabe case insensitive sort 2013-10-14 11:15:04 +02:00
Frank Karlitschek a201a66878 fix style 2013-10-14 10:57:00 +02:00
Frank Karlitschek f06df170cb finally fix the app sorting 2013-10-14 10:54:38 +02:00
Markus Goetz e564a3a266 OC_App: Cache list of enabled apps
In my test here 1 SELECT instead of 5 (when doing a DAV request,
probably similar for other requests)
2013-10-05 19:18:18 +02:00
Thomas Müller 9c9dc276b7 move the private namespace OC into lib/private - OCP will stay in lib/public
Conflicts:
	lib/private/vcategories.php
2013-09-30 16:36:59 +02:00