Example #1
0
 /**
  * 書き込み
  * @global boolean $notify
  * @global boolean $notify_diff_only
  * @param string $str
  */
 public function set($diffdata = '', $keeptimestamp = false)
 {
     global $notify, $notify_diff_only, $notify_subject;
     // 差分を作成
     //$diff = new Diff(WikiFactory::Wiki($this->page)->source(true), explode("\n",$postdata));
     //$str = $diff->getDiff();
     if ($notify) {
         $str = $notify_diff_only ? preg_replace('/^[^-+].*\\n/m', '', $diffdata) : $diffdata;
         $summary = array('ACTION' => 'Page update', 'PAGE' => &$page, 'URI' => Router::get_script_uri() . '?' . rawurlencode($page), 'USER_AGENT' => TRUE, 'REMOTE_ADDR' => TRUE);
         Mailer::notify($notify_subject, $str, $summary) or Utility::dieMessage('Mailer::notify(): Failed');
     }
     parent::set($diffdata);
 }
Example #2
0
/**
 * mail.php
 */
function pkwk_mail_notify($subject, $message, $summary = array(), $summary_position = FALSE)
{
    return Mailer::notify($subject, $message, $summary, $summary_position);
}