setup/lib should be protected same way as libraries
[phpmyadmin/crack.git] / changelog.php
blob2066b2c1bc071f831919c117eb9afdb1ebb3cd18
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Simple script to set correct charset for changelog
6 * @version $Id$
7 * @package phpMyAdmin
8 */
10 /**
11 * Whole changelog in variable.
13 $changelog = htmlspecialchars(file_get_contents('ChangeLog'));
15 $replaces = array(
16 '@(http://[./a-zA-Z0-9.-]*[/a-zA-Z0-9])@'
17 => '<a href="\\1">\\1</a>',
19 // sourceforge users
20 '/([0-9]{4}-[0-9]{2}-[0-9]{2}) (.+[^ ]) +&lt;(.*)@users.sourceforge.net&gt;/i'
21 => '\\1 <a href="https://sourceforge.net/users/\\3/">\\2</a>',
22 '/thanks to ([^\(\r\n]+) \(([-\w]+)\)/i'
23 => 'thanks to <a href="https://sourceforge.net/users/\\2/">\\1</a>',
24 '/thanks to ([^\(\r\n]+) -\s+([-\w]+)/i'
25 => 'thanks to <a href="https://sourceforge.net/users/\\2/">\\1</a>',
27 // mail adresse
28 '/([0-9]{4}-[0-9]{2}-[0-9]{2}) (.+[^ ]) +&lt;(.*@.*)&gt;/i'
29 => '\\1 <a href="mailto:\\3">\\2</a>',
31 // linking patches
32 '/patch\s*#?([0-9]{6,})/i'
33 => '<a href="https://sourceforge.net/support/tracker.php?aid=\\1">patch #\\1</a>',
35 // linking RFE
36 '/(?:rfe|feature)\s*#?([0-9]{6,})/i'
37 => '<a href="https://sourceforge.net/support/tracker.php?aid=\\1">RFE #\\1</a>',
39 // linking files
40 '/(\s+)([\\/a-z_0-9\.]+\.(?:php3?|html|pl|js|sh))/i'
41 => '\\1<a href="http://phpmyadmin.svn.sourceforge.net/viewvc/phpmyadmin/trunk/phpMyAdmin/\\2?annotate=HEAD">\\2</a>',
43 // FAQ entries
44 '/FAQ ([0-9]+)\.([0-9a-z]+)/i'
45 => '<a href="http://localhost/phpMyAdmin/Documentation.html#faq\\1_\\2">FAQ \\1.\\2</a>',
47 // linking bugs
48 '/bug\s*#?([0-9]{6,})/i'
49 => '<a href="https://sourceforge.net/support/tracker.php?aid=\\1">bug #\\1</a>',
51 // all other 6+ digit numbers are treated as bugs
52 '/(?<!BUG|RFE|patch) #?([0-9]{6,})/i'
53 => ' <a href="https://sourceforge.net/support/tracker.php?aid=\\1">bug #\\1</a>',
55 // CVE/CAN entries
56 '/((CAN|CVE)-[0-9]+-[0-9]+)/'
57 => '<a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=\\1">\\1</a>',
59 // Highlight releases (with links)
60 '/(( ### )(([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+) (.*)))/'
61 => '<a name="\\4_\\5_\\6_\\7"></a>\\2<a href="http://svn.sourceforge.net/viewvc/phpmyadmin/tags/RELEASE_\\4_\\5_\\6_\\7/phpMyAdmin">\\4.\\5.\\6.\\7 \\8</a>',
62 '/(( ### )(([0-9]+)\.([0-9]+)\.([0-9]+) (.*)))/'
63 => '<a name="\\4_\\5_\\6_\\7"></a>\\2<a href="http://svn.sourceforge.net/viewvc/phpmyadmin/tags/RELEASE_\\4_\\5_\\6/phpMyAdmin">\\4.\\5.\\6 \\7</a>',
65 // Highlight releases (not linkable)
66 '/( ### )(.*)/'
67 => '\\1<b>\\2</b>',
71 header('Content-type: text/html; charset=utf-8');
72 echo '<?xml version="1.0" encoding="utf-8"?'.'>';
74 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
75 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
76 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
77 <head>
78 <link rel="icon" href="./favicon.ico" type="image/x-icon" />
79 <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
80 <title>phpMyAdmin - ChangeLog</title>
81 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
82 </head>
83 <body>
84 <h1>phpMyAdmin - ChangeLog</h1>
85 <?php
86 echo '<pre>';
87 echo preg_replace(array_keys($replaces), $replaces, $changelog);
88 echo '</pre>';
90 </body>
91 </html>