aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSeb Sauvage <sebsauvage@sebsauvage.net>2011-09-18 22:49:32 +0200
committerEmilien Klein <emilien@klein.st>2011-09-18 22:49:32 +0200
commit9bad8f4e0b46256465b001033b004d33554d560e (patch)
treecd7e8f8480e11b299beb3d827e910fa350503b5c
parent1e49378a27c151e54f90979860fee450aaf6a164 (diff)
downloadShaarli-9bad8f4e0b46256465b001033b004d33554d560e.tar.gz
Shaarli-9bad8f4e0b46256465b001033b004d33554d560e.tar.zst
Shaarli-9bad8f4e0b46256465b001033b004d33554d560e.zip
Version 0.0.11 beta
-rw-r--r--index.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/index.php b/index.php
index 499243bd..d1f31609 100644
--- a/index.php
+++ b/index.php
@@ -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.
15define('IPBANS_FILENAME',DATADIR.'/ipbans.php'); // File storage for failures and bans. 15define('IPBANS_FILENAME',DATADIR.'/ipbans.php'); // File storage for failures and bans.
16define('BAN_AFTER',4); // Ban IP after this many failures. 16define('BAN_AFTER',4); // Ban IP after this many failures.
17define('BAN_DURATION',1800); // Ban duration for IP address after login failures (in seconds) (1800 sec. = 30 minutes) 17define('BAN_DURATION',1800); // Ban duration for IP address after login failures (in seconds) (1800 sec. = 30 minutes)
18if (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}
18checkphpversion(); 24checkphpversion();
19 25
20// ----------------------------------------------------------------------------------------------- 26// -----------------------------------------------------------------------------------------------
@@ -28,7 +34,7 @@ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
28header("Cache-Control: no-store, no-cache, must-revalidate"); 34header("Cache-Control: no-store, no-cache, must-revalidate");
29header("Cache-Control: post-check=0, pre-check=0", false); 35header("Cache-Control: post-check=0, pre-check=0", false);
30header("Pragma: no-cache"); 36header("Pragma: no-cache");
31define('shaarli_version','0.0.10 beta'); 37define('shaarli_version','0.0.11 beta');
32if (!is_dir(DATADIR)) { mkdir(DATADIR,0705); chmod(DATADIR,0705); } 38if (!is_dir(DATADIR)) { mkdir(DATADIR,0705); chmod(DATADIR,0705); }
33if (!is_file(DATADIR.'/.htaccess')) { file_put_contents(DATADIR.'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files. 39if (!is_file(DATADIR.'/.htaccess')) { file_put_contents(DATADIR.'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files.
34if (!is_file(CONFIG_FILE)) install(); 40if (!is_file(CONFIG_FILE)) install();