Commit Graph

512 Commits

Author SHA1 Message Date
Yahnis Elsts 760225bbfe Fix fatal error "Call to a member function isMuPlugin() on null"
In certain configurations, PUC could call a method that uses the $package property before calling the parent class constructor that initialises that property. This has now been fixed by moving the parent constructor call a few lines up.

Fixes #335
2020-01-24 19:05:40 +02:00
Yahnis Elsts 8212c5235e
Add link to the metadata format reference table 2019-12-03 17:55:04 +02:00
Yahnis Elsts 7014c9d9fd Randomly offset the update check schedule within $checkPeriod
This helps spread out update requests over all hours of the day and may prevent the update server from being hit with daily traffic spikes.
See #323 for discussion.
2019-11-03 12:33:09 +02:00
Yahnis Elsts 908249c92e Minor: Remove redundant autoloading mechanism 2019-10-08 15:15:30 +03:00
Yahnis Elsts 2a7c818f18 Alternative fix to Composer autoloading issues.
It may be possible to overcome the limitations of the "files" autoloading mechanism by changing the file name in every version.
2019-10-08 15:06:40 +03:00
Yahnis Elsts 66472c5f16 Hopefully fixed a crash when loading Puc_v4_Factory with a Composer autoloader.
See #321 for details.
2019-10-08 14:45:29 +03:00
Yahnis Elsts 8ad3ff2769
Merge pull request #320 from DaveMoran/update-readme-links
Update links to readme.txt documentation
2019-10-03 12:37:04 +03:00
Dave Moran 18331fae68 Final link to readme.txt 2019-10-02 12:34:25 -04:00
Dave Moran 5ec9acf7ed Update link to proper location 2019-10-02 12:26:26 -04:00
Dave Moran 3387ed0585 Revert doctoc section 2019-10-02 12:23:28 -04:00
Dave Moran 890e581d25 Add links to new wordpress readme standards 2019-10-02 12:19:08 -04:00
Yahnis Elsts 0a0142f1ae Fixed a bug where Puc_v4_Factory was not loaded by the custom autoloader.
This could cause a fatal error in PUC 4.8 when not using the Composer autoloader.
2019-10-02 13:47:16 +03:00
Yahnis Elsts 17e1c90598 Minor: Removed another unnecessary condition 2019-10-01 14:47:45 +03:00
Yahnis Elsts a3ff7ada08 Fixed a potential bug with multiple plugins using GitHub release assets.
To allow WP to download a release asset from GitHub, the update checker needs to add an "Accept: application/octet-stream" header to the HTTP request. We use the "http_request_args" filter for that. 

Previously, we used a static variable to ensure that the filter callback is added only once. However, in PHP, static variables defined in a method are shared by all instances of the class that the method belongs to. This means that if one plugin enables release assets, adds a "http_request_args" filter, and sets ``$filterAdded` to `true`, then the next plugin that enables release assets won't add its own filter because the variable will already be `true`.

Fixed by using an instance variable (`$downloadFilterAdded`) instead of a static variable.
2019-10-01 14:35:16 +03:00
Yahnis Elsts 969f8adf21 Minor: Remove a few unneeded conditions 2019-10-01 14:25:04 +03:00
Yahnis Elsts 92f43145e7 Minor: Rephrase stuff in docs 2019-10-01 13:33:00 +03:00
Yahnis Elsts c30528c55c Minor: Fixed some spacing and style 2019-10-01 13:29:51 +03:00
Yahnis Elsts 2f81129b47
Merge pull request #319 from muensmedia/gitlab-subgroups
Allow subgroups for self hosted GitLab instances
2019-10-01 13:24:11 +03:00
Malte Müns 474a9e806b [DOCS] Improve docs how to use subgroups with self hosted GitLab
https://docs.gitlab.com/ce/user/group/subgroups/index.html
2019-09-30 11:02:43 +02:00
Malte Müns 05c76ef07d [FEATURE] Allow subgroups for self hosted GitLab instances
https://docs.gitlab.com/ce/user/group/subgroups/index.html
2019-09-30 11:02:00 +02:00
Yahnis Elsts a78cbb71d3 Bump version number to 4.8 2019-09-28 15:47:47 +03:00
Yahnis Elsts f4167ca36c Another attempt to fix the Composer autoloader 2019-09-27 17:27:54 +03:00
Yahnis Elsts bbe88a70d6 Attempt to fix errors caused by using Composer-generated autoloaders when multiple versions of the library are loaded at the same time.
See #300. Apparently, when using the `files` autoloading mechanism, Composer will only include the files for one version of the library (i.e. the first one loaded). Let's see if we can fix that by switching to a `psr-0` autoloader. This requires a bunch of changes to the standalone autoloader and the factory registration process.
2019-09-27 17:06:01 +03:00
Yahnis Elsts 0f490e940c
Merge pull request #315 from jorditarrida/master
Add Catalan (ca) and Spanish-Spain (es_ES) translations
2019-09-26 20:22:10 +03:00
Jordi Tarrida 286598b1d2 add Catalan (ca) and Spanish-Spain (es_ES) translations 2019-09-25 18:18:17 +02:00
Yahnis Elsts ee8ccd4181 Adjust the "tested" version shown in the "View details" pop-up.
PUC automatically changes "tested up to" version numbers that are in the major.minor format to major.minor.latest-patch to prevent WP from showing "this update hasn't been tested with your WP version" warnings. (This was implemented because WordPress.org does something similar.) Previously, this adjustment didn't happen when the user clicked the "view details" link in a plugin update notification, so they would still see a compatibility warning there. That has now been fixed.

Fixes #307
2019-08-19 14:09:54 +03:00
Yahnis Elsts 902e0946a0
Minor: Fixed link to metadata field definitions 2019-08-15 17:40:42 +03:00
Yahnis Elsts 6355072b9f Minor: Add a newline to the end of file because it's recommended by some code style checkers. 2019-07-15 17:58:23 +03:00
Yahnis Elsts 21fb85c931
Merge pull request #295 from GoodMorningCall/update-Japanese-POT-for-v4.7-_x
Update Japanese translation, this time with _x()
2019-07-15 17:36:51 +03:00
Yahnis Elsts 4f236b3176 Revert "Update for v4.7"
This reverts commit ab87374e8c.
2019-07-15 17:34:53 +03:00
tak b592f72fe2 Update for _x()
Update Japanese translation to support for _x().
2019-07-15 17:25:52 +09:00
Yahnis Elsts 6b4d250cbf
Merge pull request #293 from GoodMorningCall/update-Japanese-POT-for-v4.7
Update Japanese translation for v4.7
2019-07-13 12:33:52 +03:00
tak ab87374e8c Update for v4.7
Update Japanese translations to adapt to v4.7
2019-07-13 06:59:40 +09:00
Yahnis Elsts 6da68b1192 Changed version number to 4.7 2019-07-05 21:39:53 +03:00
Yahnis Elsts ce61132533 Added Slovenian translation.
Translation was provided by Igor Funa.
2019-07-02 14:25:15 +03:00
Yahnis Elsts 3f5a340ded Fully upgraded to BitBucket API 2.0.
Previously the update checker used a mix of 2.0 and 1.0. Version 1.0 was deprecated a while ago and has now stopped working for at least some users.

This should fix the errors reported in #289.
2019-06-13 16:11:05 +03:00
Yahnis Elsts 3ad92e3135 Minor: Change line endings from \r\n to \n for consistency with the rest of the project. 2019-04-18 23:11:33 +03:00
Yahnis Elsts 4643dec114 Minor: Add newlines to the end of each file.
Some code analysers require this.
2019-04-18 22:53:23 +03:00
Yahnis Elsts 5f856d8d80 Removed warning suppression from parse_url().
PUC uses parse_url() in a number of places to parse the metadata URL or repository URL. If someone provides an invalid URL then that's already a configuration error so it's not necessary to hide the warnings emitted by parse_url(). 

Also, as of PHP 5.3.3, parse_url() no longer emits warnings when it fails to parse something, so anyone using an actively supported PHP version (7.2+) wouldn't see any warnings anyway.
2019-04-18 22:30:53 +03:00
Yahnis Elsts 45374e3c02 Bump version number to 4.6 2019-04-02 20:56:11 +03:00
Yahnis Elsts 006bb9394f Probably fixed a bug where, if an older version of PUC 4.x is loaded first, the more recent version's factory (Puc_v4pN_Factory) won't be able to instantiate any classes.
This bug was caused by a combination of two facts:

1) The version that gets loaded first takes the Puc_v4_Factory alias.
2) All other versions register their class names with the existing Puc_v4_Factory, not their own factory class.

We can't really do much about the first one, but we can work around the second one by also registering each class with the version-specific factory.

See also #279
2019-03-29 19:17:36 +02:00
Yahnis Elsts 8499f5c429 GitLab: Use the protocol specified in the repository URL instead of always defaulting to HTTPS.
A user reports that some GitLab servers use plain HTTP for their APIs. See #270.
2019-03-18 14:11:42 +02:00
Yahnis Elsts 49c0fbd6b5 Minor code style adjustments. 2019-03-14 20:28:41 +02:00
Yahnis Elsts 2a51e7222b
Merge pull request #269 from DavidAnderson684/patch-13
Added missing type check
2019-03-14 20:24:06 +02:00
David Anderson d9011e1a49
Added missing type check 2019-03-14 18:21:01 +00:00
Yahnis Elsts b6e84c36ee
Merge pull request #268 from DavidAnderson684/patch-12
Ignore irrelevant updates in the upgrader_process_complete hook
2019-03-14 20:15:41 +02:00
David Anderson b26dbf8eb3
Extra check 2019-03-14 16:13:08 +00:00
David Anderson 8d3aa30f3e
Modify behaviour on upgrader_process_complete action
Won't call `maybeCheckForUpdates()` if it's not an update for this entity.
2019-03-14 16:01:09 +00:00
Yahnis Elsts 857ee82041
Merge pull request #264 from pierre-r/master
Fix wrong function name: apply_filter(s)
2019-02-27 16:00:12 +02:00
Pierre e8422cdf42 Fix wrong function name 2019-02-27 14:03:43 +01:00