示例#1
0
SDV($NotifyBodyFmt, 
  "Recent \$WikiTitle posts:\n" 
  . "  \$ScriptUrl/$[{\$SiteGroup}/AllRecentChanges]\n\n\$NotifyItems\n");
SDV($NotifyTimeFmt, $TimeFmt);
SDV($NotifyItemFmt, 
  ' * {$FullName} . . . $PostTime by {$LastModifiedBy}');
SDV($NotifyHeaders, '');
SDV($NotifyParameters, '');

if (@$NotifyFrom)
  $NotifyHeaders = "From: $NotifyFrom\r\n$NotifyHeaders";

$EditFunctions[] = 'PostNotify';

##   check if we need to do notifications
if ($action != 'edit') NotifyCheck($pagename);


function NotifyCheck($pagename) {
  global $NotifyFile, $Now, $LastModTime;
  $nfp = @fopen($NotifyFile, 'r');
  if (!$nfp) return;
  $nextevent = fgets($nfp);
  fclose($nfp);
  if ($Now < $nextevent && $LastModTime < filemtime($NotifyFile)) return;
  register_shutdown_function('NotifyUpdate', $pagename, getcwd());
}

    
function PostNotify($pagename, &$page, &$new) {
  global $IsPagePosted;
示例#2
0
SDV($NotifySquelch, 10800);
SDV($NotifyFile, "{$WorkDir}/.notifylist");
SDV($NotifyListPageFmt, '$SiteAdminGroup.NotifyList');
SDV($NotifySubjectFmt, '[$WikiTitle] recent notify posts');
SDV($NotifyBodyFmt, "Recent \$WikiTitle posts:\n" . "  \$ScriptUrl/\$[{\$SiteGroup}/AllRecentChanges]\n\n\$NotifyItems\n");
SDV($NotifyTimeFmt, $TimeFmt);
SDV($NotifyItemFmt, ' * {$FullName} . . . $PostTime by {$LastModifiedBy}');
SDV($NotifyHeaders, '');
SDV($NotifyParameters, '');
if (@$NotifyFrom) {
    $NotifyHeaders = "From: {$NotifyFrom}\r\n{$NotifyHeaders}";
}
$EditFunctions[] = 'PostNotify';
##   check if we need to do notifications
if ($action != 'edit') {
    NotifyCheck($pagename);
}
function NotifyCheck($pagename)
{
    global $NotifyFile, $Now, $LastModTime;
    $nfp = @fopen($NotifyFile, 'r');
    if (!$nfp) {
        return;
    }
    $nextevent = fgets($nfp);
    fclose($nfp);
    if ($Now < $nextevent && $LastModTime < filemtime($NotifyFile)) {
        return;
    }
    register_shutdown_function('NotifyUpdate', $pagename, getcwd());
}
示例#3
0
SDV($NotifyBodyFmt, 
  "Recent \$WikiTitle posts:\n" 
  . "  \$ScriptUrl/$[{\$SiteGroup}/AllRecentChanges]\n\n\$NotifyItems\n");
SDV($NotifyTimeFmt, $TimeFmt);
SDV($NotifyItemFmt, 
  ' * {$FullName} . . . $PostTime by {$Author}');
SDV($NotifyHeaders, '');
SDV($NotifyParameters, '');

if (@$NotifyFrom)
  $NotifyHeaders = "From: $NotifyFrom\r\n$NotifyHeaders";

$EditFunctions[] = 'PostNotify';

##   check if we need to do notifications
if ($action != 'edit' && $action != 'postupload') NotifyCheck($pagename);


function NotifyCheck($pagename) {
  global $NotifyFile, $Now, $LastModTime;
  $nfp = @fopen($NotifyFile, 'r');
  if (!$nfp) return;
  $nextevent = fgets($nfp);
  fclose($nfp);
  if ($Now < $nextevent && $LastModTime < filemtime($NotifyFile)) return;
  register_shutdown_function('NotifyUpdate', $pagename, getcwd());
}

    
function PostNotify($pagename, &$page, &$new) {
  global $IsPagePosted;