diff -Nur knowledgeroot-0.9.8.4/include/class-email-notification.php knowledgeroot-0.9.8.4-ja/include/class-email-notification.php --- knowledgeroot-0.9.8.4/include/class-email-notification.php 2007-06-17 04:33:14.000000000 +0900 +++ knowledgeroot-0.9.8.4-ja/include/class-email-notification.php 2007-08-09 00:04:52.000000000 +0900 @@ -81,14 +81,40 @@ // get pagetitle $pageTitle = $this->CLASS['path']->getTreePageTitle($pageid); + // check custom format + if ($this->CLASS['language']->sys['email'][$elementType.'_text']){ + $fmt = $this->CLASS['language']->sys['email'][$elementType.'_text']; + } else { + $fmt = '#elementType# "#name#" #was# #action#'; + } + $subject_str = $fmt; + $subject_str = str_replace('#elementType#', $this->CLASS['language']->sys['email'][$elementType], $subject_str); + $subject_str = str_replace('#name#', $name, $subject_str); + $subject_str = str_replace('#was#', $this->CLASS['language']->sys['email']['was'], $subject_str); + $subject_str = str_replace('#action#', $this->CLASS['language']->sys['email'][$action], $subject_str); + // set emailsubject - $this->Subject = $this->CLASS['language']->sys['email']['notification'] . ' (' . $this->CLASS['language']->sys['email'][$elementType] . ' "' . $name . '" ' . $this->CLASS['language']->sys['email'][$action] . ')'; + $this->Subject = $this->CLASS['language']->sys['email']['notification'] . ' (' . $subject_str . ')'; // make html mail or not if($this->html == true) { // get path $path = $this->CLASS['path']->getPath($pageid, $this->CLASS['kr_header']->get_base_url()); + // check custom format + if ($this->CLASS['language']->sys['email'][$elementType.'_html']){ + $fmt = $this->CLASS['language']->sys['email'][$elementType.'_html']; + } elseif ($this->CLASS['language']->sys['email'][$elementType.'_text']){ + $fmt = $this->CLASS['language']->sys['email'][$elementType.'_text']; + } else { + $fmt = '#elementType# "#name#" #was# #action#'; + } + $action_str = $fmt; + $action_str = str_replace('#elementType#', $this->CLASS['language']->sys['email'][$elementType], $action_str); + $action_str = str_replace('#name#', $name, $action_str); + $action_str = str_replace('#was#', $this->CLASS['language']->sys['email']['was'], $action_str); + $action_str = str_replace('#action#', $this->CLASS['language']->sys['email'][$action], $action_str); + $mailBody = '