Hutchy68 / Purge

MediaWiki Purge Extension
GNU General Public License v2.0
8 stars 7 forks source link

Adaption for new extension loading mechanism #3

Closed ghost closed 4 years ago

ghost commented 8 years ago

I just adapted your code to reflect the new loading mechanism for Mediawiki extension. Shall I send you the code?

kghbln commented 8 years ago

See also this talk. :) Perhaps it will be good to make a last version for the classic mechanism and move on with @sigbert 's changes. I will do a pull request.

Hutchy68 commented 8 years ago

Are we good with this issue. Except %$@* !!! I forgot to pull in @MATsxm PR for the update to fr.json. I'm going to commit that right now.

kghbln commented 8 years ago

@Hutchy68 Well there was a French translation before so this is not so decisive. Will be part of the next release. @sigbert In case you are not so familiar with GitHub you could also send the code to me and I move it in for you, otherwise just to the pull.

kghbln commented 8 years ago

I got the code from @sigbert. Thanks a bunch. This one is however breaking. I am thinking of doing a backwards compatible interim version and move this on in after. Hopefully I will do it tomorrow. Disaster unfolded on a wiki yesterday so I was a bit busy.

kghbln commented 8 years ago

@sigbert I am sorry that it took me so long. After @Hutchy68 merged my pull request https://github.com/Hutchy68/Purge/issues/6 I will move in your changes and make this extension breaking with pre MW 1.25 instances.

Hutchy68 commented 6 years ago

Hmm, unless I'm missing something. I don't see extension.json or the entry point for use of wfLoadExtension in PR #6. I would do this as a v2.0.0 and break compatibility with anything under 1.25.

Entry point would look something like this.

if ( function_exists( 'wfLoadExtension' ) ) {
  wfLoadExtension( 'Purge' );
  $wgMessagesDirs['Purge'] = __DIR__ . '/i18n';
  /* wfWarn(
    'Deprecated PHP entry point used for Purge extension.' .
    'Please use wfLoadExtension instead, ' .
    'see https://www.mediawiki.org/wiki/Extension_registration for more details.'
  ); */
  return;
} else {
  die( 'This version of the Purge extension requires MediaWiki 1.25+' );
}

Could also delete Purge.i18n.php as it is only a shim to load .json files so they appear as the old way of loading messages.

Thoughts?

samwilson commented 6 years ago

Personally, I think breaking compatibility for out-of-date wikis is fine. They can always continue using an older version.

kghbln commented 6 years ago

@sigbert 's proposed changes never made it to here as a pull request since I was waiting for some release still compatible with 1.23 and afterwards make the breaking change for 1.25 and later. To much time has passed in the meantime. I know however that he had a version containing the "extension.json" file.

samwilson commented 6 years ago

I've created a PR for this: #19

Hutchy68 commented 4 years ago

closing as it was merged