Commit Graph

587 Commits

Author SHA1 Message Date
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
Yahnis Elsts 7a3527ce55
Merge pull request #263 from Tofandel/patch-1
Add a `puc_get_vcs_service` filter
2019-02-26 12:36:10 +02:00
Adrien Foulon 02592c7fc4
Add a filter to getVcsService
The filter 'puc_get_vcs_service' will then allow user to add their self hosted gitlab or bitbucket as a recognised service
like so
add_filter('puc_get_vcs_service', function($service, $host) {
    if ($host == 'gitlab.mydomain.com') {
        return 'GitLab';
    }
    return $service;
}, 10, 2);
2019-02-25 19:03:46 +01:00
Yahnis Elsts 57a25d905a Update the docs to more clearly separate usage instructions for GitLab.com and self-hosted GitLab instances. 2019-01-04 19:13:39 +02:00
Yahnis Elsts 9d087b7d9c Add a workaround for realpath() failing to process the mu-plugins path.
Probably fixes #251
2018-12-30 13:36:24 +02:00
Yahnis Elsts d98d6bc6ca Bump version to 4.5 - step 2
Rename files and update file paths.
2018-12-30 12:38:32 +02:00
Yahnis Elsts d460807de8 Bump version to 4.5 - step #1
Renaming all of the clases and updating version numbers.
2018-12-30 12:35:16 +02:00
Yahnis Elsts e4536b4efa
Merge pull request #246 from YahnisElsts/gitlab-subgroups
Add support for Gitlab subgroups
2018-12-11 20:30:05 +02:00
Yahnis Elsts 5a6b4f9878 Merge branch 'master' into gitlab-subgroups 2018-12-11 20:14:59 +02:00
Yahnis Elsts e1570305b0
Merge pull request #245 from YahnisElsts/issue-240-patch
Fix GitLab download URLs
2018-12-11 20:09:52 +02:00
Yahnis Elsts c5036b620f Fix outdated API syntax in getRemoteFile 2018-12-09 11:02:54 +02:00
Yahnis Elsts 2dba97ecfb Don't encode slashes unnecessarily 2018-12-05 21:51:15 +02:00
Yahnis Elsts ee677e2e5b Potential fix for #240.
Props to @froger-me
2018-12-05 21:40:54 +02:00
Yahnis Elsts 871c1006c5 Added support for GitLab subgroups as described in #241
(Untested.)
2018-12-03 15:21:45 +02:00
Yahnis Elsts 14bd39a492
Merge pull request #243 from meszarosrob/master
Set $repositoryHost visibility to protected
2018-12-02 15:45:07 +02:00
Meszaros Robert 98ab02dbda
Set $repositoryHost visibility to protected 2018-11-29 17:53:27 +02:00
Yahnis Elsts ea633a91b3 Use random_bytes() when generating OAuth nonces.
mt_rand() is not cryptographically secure. This probably doesn't matter that much in most cases because it only affects BitBucket API interactions that already happen over HTTPS, but why not use a better option when it's available?

Closes #233
2018-10-23 13:23:48 +03:00
Yahnis Elsts f11ffce720 Fix the parser ignoring the last readme.txt section when it's empty. 2018-09-26 11:18:00 +03:00
Yahnis Elsts e2da891646
Merge pull request #229 from Tofandel/patch-1
Fix PHP notice "Undefined offset: 1 in readme-parser.php on line 124".
2018-09-26 11:00:31 +03:00
Adrien Foulon 89e8849957
Fix PHP notice "Undefined offset: 1 in readme-parser.php on line 124".
The for loop was iterating including the count index of the $_sections, it should be excluding
2018-09-23 16:47:42 +02:00
Yahnis Elsts c9a7d2a7da Add a note about where to post ideas on license management features 2018-08-09 15:47:20 +03:00
Yahnis Elsts 1cb79bcdce Minor: Refactor the plugin UI callback permission checks.
Let's only add our UI hooks if the user has the required permissions. This way we can avoid duplicating the permission checks in each individual callback.
2018-07-17 13:58:17 +03:00
Yahnis Elsts 4f6afa95cd Extract file parsing and lookup as a separate "Package" class. 2018-07-17 13:03:03 +03:00
Yahnis Elsts 98ac49406c Fix: Remove UI hooks when uninstalling the plugin.
It looks like I forgot to move that code when extracting the UI class.
2018-07-14 12:38:32 +03:00
Yahnis Elsts 68f4865b31 Extract plugin-specific UI as a separate class.
This includes the "View details" and "Check for updates" links that appear on the "Plugins -> Installed Plugins" page.
2018-07-14 12:15:50 +03:00
Yahnis Elsts 01863da0e8 Minor: Adjust code spacing. 2018-06-27 15:28:34 +03:00