summaryrefslogtreecommitdiff
path: root/inc/infoutils.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-11-08 23:15:08 +0100
committerAndreas Gohr <andi@splitbrain.org>2012-11-08 23:15:08 +0100
commit04924b7a9d090c0814cfff3e6706263e4d5a46e8 (patch)
treed83fc6b5683fbc9c639bfd1832f96dca2f3c8646 /inc/infoutils.php
parent1ea7a6bada66fc9b7a45f61b4892e4ea23196d89 (diff)
parenta731ed1d6736ca405b3559adfd9500affcc59412 (diff)
downloadrpg-04924b7a9d090c0814cfff3e6706263e4d5a46e8.tar.gz
rpg-04924b7a9d090c0814cfff3e6706263e4d5a46e8.tar.bz2
Merge branch 'master' into proxyconnect
* master: (169 commits) added PCRE UTF-8 checks to do=check FS#2636 avoid multiple paralell update checks fix regression bug in HTTPClient FS#2621 changed PAGEUTILS_ID_HIDEPAGE to has BEFORE/AFTER TarLib code cleanup TarLib: fixed appending in non-dynamic mode fixed third method of adding files in TarLib fix lone zero block in TarLib created archives fix use of constructor in TarLib Slovak language update Korean language update Latvian language update added event PAGEUTILS_ID_HIDEPAGE added test for isHiddenPage() removed redundant variables in tpl_include_page() (because of 3ff8773b) added cut off points for mobile devices as parameters to style.ini Corrected typo: ruke -> rule Persian language update Spanish language update russian language update ...
Diffstat (limited to 'inc/infoutils.php')
-rw-r--r--inc/infoutils.php27
1 files changed, 9 insertions, 18 deletions
diff --git a/inc/infoutils.php b/inc/infoutils.php
index 9ee1a717d..0dc7092ad 100644
--- a/inc/infoutils.php
+++ b/inc/infoutils.php
@@ -25,12 +25,12 @@ function checkUpdateMessages(){
// check if new messages needs to be fetched
if($lm < time()-(60*60*24) || $lm < @filemtime(DOKU_INC.DOKU_SCRIPT)){
+ @touch($cf);
dbglog("checkUpdatesMessages(): downloading messages.txt");
$http = new DokuHTTPClient();
- $http->timeout = 8;
+ $http->timeout = 12;
$data = $http->get(DOKU_MESSAGEURL.$updateVersion);
io_saveFile($cf,$data);
- @touch($cf);
}else{
dbglog("checkUpdatesMessages(): messages.txt up to date");
$data = io_readFile($cf);
@@ -176,6 +176,13 @@ function check(){
msg('mb_string extension not available - PHP only replacements will be used',0);
}
+ if (!preg_match("/^.$/u", "ñ")) {
+ msg('PHP is missing UTF-8 support in Perl-Compatible Regular Expressions (PCRE)', -1);
+ }
+ if (!preg_match("/^\pL$/u", "ñ")) {
+ msg('PHP is missing Unicode properties support in Perl-Compatible Regular Expressions (PCRE)', -1);
+ }
+
$loc = setlocale(LC_ALL, 0);
if(!$loc){
msg('No valid locale is set for your PHP setup. You should fix this',-1);
@@ -213,22 +220,6 @@ function check(){
msg('The current page is not writable by you',0);
}
- $check = wl('','',true).'data/_dummy';
- $http = new DokuHTTPClient();
- $http->timeout = 6;
- $res = $http->get($check);
- if(strpos($res,'data directory') !== false){
- msg('It seems like the data directory is accessible from the web.
- Make sure this directory is properly protected
- (See <a href="http://www.dokuwiki.org/security">security</a>)',-1);
- }elseif($http->status == 404 || $http->status == 403){
- msg('The data directory seems to be properly protected',1);
- }else{
- msg('Failed to check if the data directory is accessible from the web.
- Make sure this directory is properly protected
- (See <a href="http://www.dokuwiki.org/security">security</a>)',-1);
- }
-
// Check for corrupted search index
$lengths = idx_listIndexLengths();
$index_corrupted = false;