Skip to content

Conversation

@mhoffrog
Copy link
Collaborator

@mhoffrog mhoffrog commented Apr 1, 2021

This pull request implements Issue#55.
Fixes #55

Note: This pull request builds upon pull request #54

NOTE: The commit comments contain details on all the changes made starting with the 3rd line of each comment.

…cking conf and php code in dedicated repos

- default.php, metadata.php, settings.php:
  - added optional settings for 'repoPathMedia', 'repoWorkDirMedia', 'repoPathConf', 'repoPathCode'
  - improved labels and translations of settings.php

- plugin.info.txt:
  - updated date to 2021-03-28

Signed-off-by: Markus Hoffrogge <[email protected]>
…cking conf and php code in dedicated repos

- editcommit.php:
  - registered additional hooks to get triggered when admin changes config or plugin/extensions installed
  - initRepo(...):
    - added arguments $repoPathConfigKey, $repoWorkDirConfigKey to support multiple repos
    - add --work-tree $repoWorkDirConfigKey only, if the effective repoWorkDir is set
  - pullRepo($repoPathConfigKey,$repoWorkDirConfigKey):
    - added this method
  - commitFile(...):
    - added arguments $repoPathConfigKey, $repoWorkDirConfigKey
  - commitAll($repoPathConfigKey,$repoWorkDirConfigKey,$message):
    - added this method
  - handle_periodic_pull(...):
    - updated to pull from pages and media repo
  - handle_media_deletion(...), handle_media_upload(...):
    - consider probable separate repo for media
  - handle_code_or_config_on_start(...), handle_code_or_config_on_done(...), handle_code_or_config_on_ajax(...):
    - additional handlers for changes on config and installed plugin extensions

- Git.php:
  - status(...):
    - added argument for the status command
  - addAll():
    - added this method

Signed-off-by: Markus Hoffrogge <[email protected]>
…cking conf and php code in dedicated repos

- editcommit.php:
  - handle_code_or_config_on_start(...):
    - added support for template style changes

Signed-off-by: Markus Hoffrogge <[email protected]>
…cking conf and php code in dedicated repos

- editcommit.php:
  - added method pageID($nameSpace,$pageName) to provide page with namespace for the commit message of a page change

Signed-off-by: Markus Hoffrogge <[email protected]>
@woolfg
Copy link
Owner

woolfg commented Jun 16, 2021

thank @mhoffrog , on what dokuwiki version did you test it?

@mhoffrog
Copy link
Collaborator Author

@woolfg - It was tested on recent DokuWiki Release 2020-07-29 “Hogfather”.

mhoffrog added 5 commits November 28, 2021 09:37
…cking conf and php code in dedicated repos

- Git.php:
  - bugfix for PHP <7.4 compatibility: '?...' type declarations are supported by PHP >= 7.4 only

Signed-off-by: Markus Hoffrogge <[email protected]>
…cking conf and php code in dedicated repos

- Git.php:
  - bugfix for PHP <= 7.3 compatibility: class property type declarations are supported by PHP >= 7.4 only

Signed-off-by: Markus Hoffrogge <[email protected]>
…cking conf and php code in dedicated repos

- Git.php:
  - precised bugfix code comment

Signed-off-by: Markus Hoffrogge <[email protected]>
…cking conf and php code in dedicated repos

- conf/default.php:
  - improved wording of commit comment default config
  - default config for additional git commit parameters set to reflect
    the Wiki user name and the Wiki users eMail as git committing author

Signed-off-by: Markus Hoffrogge <[email protected]>
…cking conf and php code in dedicated repos

- Git.php:
  - fixed code editing copy issue

Signed-off-by: Markus Hoffrogge <[email protected]>
@mhoffrog
Copy link
Collaborator Author

@woolfg - Did fix the PHP 7.3 incompatibility issue and made some improvements to the default config.

@mhoffrog
Copy link
Collaborator Author

mhoffrog commented Jan 9, 2022

After installing the update, this line is causing an error:

2021-12-23 17:14:02: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Parse error:  syntax error, unexpected '?', expecting function (T_FUNCTION) or const (T_CONST) in /dokuwiki/lib/plugins/gitbacked/lib/Git.php on line 141

I suspect this is due to the version of PHP. I am running dokuwiki in mprasil's dokuwiki container, which is built with ubuntu 18.04 that has PHP version 7.2.24

This error was also mentioned in this posting: https://gitmemory.cn/repo/woolfg/dokuwiki-plugin-gitbacked/issues/57

This issue has been fixed by the most recent commits (28-Nov-2021) on this pull request.
@fama - regardless of this pull request it has been fixed on master by 20-Jan-2022.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support optionally a) separated repos for pages and media and b) additional repos for core php runtime and for conf

2 participants