function notifyNew($timestamp, &$title, $minor, &$user, $comment, $bot = "default", $ip = '', $size = 0, $newId = 0) { if (!$ip) { global $wgIP; $ip = empty($wgIP) ? '' : $wgIP; } if ($bot == 'default') { $bot = $user->isBot(); } $rc = new RecentChange(); $rc->mAttribs = array('rc_timestamp' => $timestamp, 'rc_cur_time' => $timestamp, 'rc_namespace' => $title->getNamespace(), 'rc_title' => $title->getDBkey(), 'rc_type' => RC_NEW, 'rc_minor' => $minor ? 1 : 0, 'rc_cur_id' => $title->getArticleID(), 'rc_user' => $user->getID(), 'rc_user_text' => $user->getName(), 'rc_comment' => $comment, 'rc_this_oldid' => $newId, 'rc_last_oldid' => 0, 'rc_bot' => $bot ? 1 : 0, 'rc_moved_to_ns' => 0, 'rc_moved_to_title' => '', 'rc_ip' => $ip, 'rc_patrolled' => 0, 'rc_new' => 1); $rc->mExtra = array('prefixedDBkey' => $title->getPrefixedDBkey(), 'lastTimestamp' => 0, 'oldSize' => 0, 'newSize' => $size); $rc->save(); include_once "UserMailer.php"; $wgEnotif = new EmailNotification(); $wgEnotif->notifyOnPageChangeOrNewpage($title, $timestamp, $comment, $minor, 0); }