migrate changelog
authorx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 8 Jul 2006 14:52:52 +0000 (14:52 +0000)
committerx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 8 Jul 2006 14:52:52 +0000 (14:52 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@392 839d8a87-29fc-0310-9880-83ba4fa771e5

htdocs/changeLog.php [deleted file]
modules/core.php
templates/skin/common.footer.tpl

diff --git a/htdocs/changeLog.php b/htdocs/changeLog.php
deleted file mode 100644 (file)
index 87f35ff..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-/***************************************************************************
- *  Copyright (C) 2003-2006 Polytechnique.org                              *
- *  http://opensource.polytechnique.org/                                   *
- *                                                                         *
- *  This program is free software; you can redistribute it and/or modify   *
- *  it under the terms of the GNU General Public License as published by   *
- *  the Free Software Foundation; either version 2 of the License, or      *
- *  (at your option) any later version.                                    *
- *                                                                         *
- *  This program is distributed in the hope that it will be useful,        *
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
- *  GNU General Public License for more details.                           *
- *                                                                         *
- *  You should have received a copy of the GNU General Public License      *
- *  along with this program; if not, write to the Free Software            *
- *  Foundation, Inc.,                                                      *
- *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
- ***************************************************************************/
-require_once 'xorg.inc.php';
-
-new_skinned_page('changeLog.tpl', AUTH_PUBLIC);
-
-function bugize($list)
-{
-    $list = split(',', $list);
-    $ans  = array();
-    
-    foreach ($list as $bug) {
-        $clean = str_replace('#', '', $bug);
-        $ans[] = "<a href='http://trackers.polytechnique.org/task/$clean'>$bug</a>";
-    }
-
-    return join(',', $ans);
-}
-
-$clog = htmlentities(file_get_contents($globals->spoolroot.'/ChangeLog'));
-$clog = preg_replace('!(#[0-9]+(,[0-9]+)*)!e', 'bugize("\1")', $clog);
-$page->assign('ChangeLog', $clog);
-$page->run();
-?>
index 367acfe..e627078 100644 (file)
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
+function bugize($list)
+{
+    $list = split(',', $list);
+    $ans  = array();
+
+    foreach ($list as $bug) {
+        $clean = str_replace('#', '', $bug);
+        $ans[] = "<a href='http://trackers.polytechnique.org/task/$clean'>$bug</a>";
+    }
+
+    return join(',', $ans);
+}
+
+
 class CoreModule extends PLModule
 {
     function handlers()
@@ -28,6 +42,7 @@ class CoreModule extends PLModule
             '404'         => $this->make_hook('404', AUTH_PUBLIC),
             'exit'        => $this->make_hook('exit', AUTH_PUBLIC),
             'cacert.pem'  => $this->make_hook('cacert', AUTH_PUBLIC),
+            'changelog'   => $this->make_hook('changelog', AUTH_PUBLIC),
             'purge_cache' => $this->make_hook('purge_cache', AUTH_COOKIE, 'admin')
         );
     }
@@ -50,6 +65,15 @@ class CoreModule extends PLModule
         exit;
     }
 
+    function handler_changelog(&$page)
+    {
+        $page->changeTpl('changeLog.tpl');
+
+        $clog = htmlentities(file_get_contents(dirname(__FILE__).'/../ChangeLog'));
+        $clog = preg_replace('!(#[0-9]+(,[0-9]+)*)!e', 'bugize("\1")', $clog);
+        $page->assign('ChangeLog', $clog);
+    }
+
     function handler_exit(&$page, $level = null)
     {
         if (Session::has('suid')) {
index e698e42..97315b0 100644 (file)
@@ -22,7 +22,7 @@
 
 
 <div>
-  Plat/al <a href="{rel}/changeLog.php">{version}</a> - Copyright © 1999-2006 <a href="http://x-org.polytechnique.org/">Polytechnique.org</a>
+  Plat/al <a href="{rel}/changelog">{version}</a> - Copyright © 1999-2006 <a href="http://x-org.polytechnique.org/">Polytechnique.org</a>
   &nbsp;-&nbsp;
   <a href="{rel}/Docs/ConventionAX">Lien avec l'AX</a>
   &nbsp;-&nbsp;