diff options
author | Seb Sauvage <sebsauvage@sebsauvage.net> | 2011-09-18 22:49:32 +0200 |
---|---|---|
committer | Emilien Klein <emilien@klein.st> | 2011-09-18 22:49:32 +0200 |
commit | 9bad8f4e0b46256465b001033b004d33554d560e (patch) | |
tree | cd7e8f8480e11b299beb3d827e910fa350503b5c | |
parent | 1e49378a27c151e54f90979860fee450aaf6a164 (diff) | |
download | Shaarli-9bad8f4e0b46256465b001033b004d33554d560e.tar.gz Shaarli-9bad8f4e0b46256465b001033b004d33554d560e.tar.zst Shaarli-9bad8f4e0b46256465b001033b004d33554d560e.zip |
Version 0.0.11 beta
-rw-r--r-- | index.php | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | <?php | 1 | <?php |
2 | // Shaarli 0.0.10 beta - Shaare your links... | 2 | // Shaarli 0.0.11 beta - Shaare your links... |
3 | // The personal, minimalist, super-fast, no-database delicious clone. By sebsauvage.net | 3 | // The personal, minimalist, super-fast, no-database delicious clone. By sebsauvage.net |
4 | // http://sebsauvage.net/wiki/doku.php?id=php:shaarli | 4 | // http://sebsauvage.net/wiki/doku.php?id=php:shaarli |
5 | // Licence: http://www.opensource.org/licenses/zlib-license.php | 5 | // Licence: http://www.opensource.org/licenses/zlib-license.php |
@@ -15,6 +15,12 @@ define('LINKS_PER_PAGE',20); // Default links per page. | |||
15 | define('IPBANS_FILENAME',DATADIR.'/ipbans.php'); // File storage for failures and bans. | 15 | define('IPBANS_FILENAME',DATADIR.'/ipbans.php'); // File storage for failures and bans. |
16 | define('BAN_AFTER',4); // Ban IP after this many failures. | 16 | define('BAN_AFTER',4); // Ban IP after this many failures. |
17 | define('BAN_DURATION',1800); // Ban duration for IP address after login failures (in seconds) (1800 sec. = 30 minutes) | 17 | define('BAN_DURATION',1800); // Ban duration for IP address after login failures (in seconds) (1800 sec. = 30 minutes) |
18 | if (get_magic_quotes_gpc()) | ||
19 | { | ||
20 | header('Content-Type: text/plain; charset=utf-8'); | ||
21 | echo "ERROR: magic_quotes_gpc is ON in your php config. This is *BAD*. You *MUST* disable it, either by changing the value in php.ini,\n"; | ||
22 | echo "or by adding the following line in .htaccess: php_flag magic_quotes_gpc Off"; exit; | ||
23 | } | ||
18 | checkphpversion(); | 24 | checkphpversion(); |
19 | 25 | ||
20 | // ----------------------------------------------------------------------------------------------- | 26 | // ----------------------------------------------------------------------------------------------- |
@@ -28,7 +34,7 @@ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); | |||
28 | header("Cache-Control: no-store, no-cache, must-revalidate"); | 34 | header("Cache-Control: no-store, no-cache, must-revalidate"); |
29 | header("Cache-Control: post-check=0, pre-check=0", false); | 35 | header("Cache-Control: post-check=0, pre-check=0", false); |
30 | header("Pragma: no-cache"); | 36 | header("Pragma: no-cache"); |
31 | define('shaarli_version','0.0.10 beta'); | 37 | define('shaarli_version','0.0.11 beta'); |
32 | if (!is_dir(DATADIR)) { mkdir(DATADIR,0705); chmod(DATADIR,0705); } | 38 | if (!is_dir(DATADIR)) { mkdir(DATADIR,0705); chmod(DATADIR,0705); } |
33 | if (!is_file(DATADIR.'/.htaccess')) { file_put_contents(DATADIR.'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files. | 39 | if (!is_file(DATADIR.'/.htaccess')) { file_put_contents(DATADIR.'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files. |
34 | if (!is_file(CONFIG_FILE)) install(); | 40 | if (!is_file(CONFIG_FILE)) install(); |