Skip to content

Commit

Permalink
Fix DokuWiki deprecation warnings
Browse files Browse the repository at this point in the history
- action/editcommit.php:
  - remove obsolete require_once for action.php
  - comment dbglog(...) code lines
    Note: These did not yet have been replaced by DW Logger::debug(...)
          since this would break compatibility to DW releases before Igor

- closes #86
  • Loading branch information
mhoffrog committed May 7, 2023
1 parent 23da58a commit dd477e3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions action/editcommit.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
if (!defined('DOKU_TAB')) define('DOKU_TAB', "\t");
if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');

require_once DOKU_PLUGIN.'action.php';
require_once dirname(__FILE__).'/../lib/Git.php';
require_once dirname(__FILE__).'/../lib/GitBackedUtil.php';

Expand Down Expand Up @@ -296,7 +295,7 @@ public function notify_command_success($repo_path, $cwd, $command) {
*/
public function notifyByMail($subject_id, $template_id, $template_replacements) {
$ret = false;
dbglog("GitBacked - notifyByMail: [subject_id=".$subject_id.", template_id=".$template_id.", template_replacements=".$template_replacements."]");
//dbglog("GitBacked - notifyByMail: [subject_id=".$subject_id.", template_id=".$template_id.", template_replacements=".$template_replacements."]");
if (!$this->isNotifyByEmailOnGitCommandError()) {
return $ret;
}
Expand All @@ -307,9 +306,9 @@ public function notifyByMail($subject_id, $template_id, $template_replacements)

$mailer = new \Mailer();
$mailer->to($this->getEmailAddressOnErrorConfigured());
dbglog("GitBacked - lang check['".$subject_id."']: ".$this->getLang($subject_id));
dbglog("GitBacked - template text['".$template_id."']: ".$template_text);
dbglog("GitBacked - template html['".$template_id."']: ".$template_html);
//dbglog("GitBacked - lang check['".$subject_id."']: ".$this->getLang($subject_id));
//dbglog("GitBacked - template text['".$template_id."']: ".$template_text);
//dbglog("GitBacked - template html['".$template_id."']: ".$template_html);
$mailer->subject($this->getLang($subject_id));
$mailer->setBody($template_text, $template_replacements, null, $template_html);
$ret = $mailer->send();
Expand Down

0 comments on commit dd477e3

Please sign in to comment.