+ if (S::logged()) {
+ pl_redirect('events');
+ } else if (!@$GLOBALS['IS_XNET_SITE']) {
+ pl_redirect('review');
+ }
+ }
+
+ function handler_cacert(&$page)
+ {
+ $data = file_get_contents("/etc/ssl/xorgCA/cacert.pem","r");
+ header("Pragma:");
+ header("Set-Cookie:");
+ header("Cache-Control:");
+ header("Expires:");
+ header("Content-Type: application/x-x509-ca-cert");
+ header("Content-Length: ".strlen($data));
+ echo $data;
+ exit;
+ }
+
+ function handler_changelog(&$page)
+ {
+ $page->changeTpl('platal/changeLog.tpl');
+
+ $clog = pl_entities(file_get_contents(dirname(__FILE__).'/../ChangeLog'));
+ $clog = preg_replace('/=+\s*/', '</pre><hr /><pre>', $clog);
+ // url catch only (not all wiki syntax)
+ $clog = preg_replace(array(
+ '/((?:https?|ftp):\/\/(?:\.*,*[\w@~%$£µ&i#\-+=_\/\?;])*)/ui',
+ '/(\s|^)www\.((?:\.*,*[\w@~%$£µ&i#\-+=_\/\?;])*)/iu',
+ '/(?:mailto:)?([a-z0-9.\-+_]+@([\-.+_]?[a-z0-9])+)/i'),
+ array(
+ '<a href="\\0">\\0</a>',
+ '\\1<a href="http://www.\\2">www.\\2</a>',
+ '<a href="mailto:\\0">\\0</a>'),
+ $clog);
+ $clog = preg_replace('!(#[0-9]+(,[0-9]+)*)!e', 'bugize("\1")', $clog);
+ $clog = preg_replace('!vim:.*$!', '', $clog);
+ $clog = preg_replace("!(<hr />(\\s|\n)*)?<pre>(\s|\n)*</pre>((\\s|\n)*<hr />)?!m", "", "<pre>$clog</pre>");
+ $page->assign('ChangeLog', $clog);
+ }