summaryrefslogtreecommitdiff
path: root/lib/exe
diff options
context:
space:
mode:
authorAnika Henke <anika@selfthinker.org>2012-06-29 17:51:09 +0100
committerAnika Henke <anika@selfthinker.org>2012-06-29 17:51:09 +0100
commit0c06a181819249c6a4a2a6c60e13f739df1f2253 (patch)
tree859377c572d0acbfc520b02304ef515bf3aebbe0 /lib/exe
parentef7e36e4fd2a168977754f0aac1d855fb651f104 (diff)
parent5d0aaf958325f500ce69cfb79e69eb0d8f83fdeb (diff)
downloadrpg-0c06a181819249c6a4a2a6c60e13f739df1f2253.tar.gz
rpg-0c06a181819249c6a4a2a6c60e13f739df1f2253.tar.bz2
Merge branch 'master' of github.com:splitbrain/dokuwiki into frontend_improvements
Conflicts: lib/tpl/dokuwiki/css/basic.css
Diffstat (limited to 'lib/exe')
-rw-r--r--lib/exe/indexer.php13
-rw-r--r--lib/exe/js.php10
-rw-r--r--lib/exe/xmlrpc.php3
3 files changed, 21 insertions, 5 deletions
diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php
index 95e2af05b..738a29503 100644
--- a/lib/exe/indexer.php
+++ b/lib/exe/indexer.php
@@ -55,6 +55,8 @@ exit;
function runTrimRecentChanges($media_changes = false) {
global $conf;
+ echo "runTrimRecentChanges($media_changes): started".NL;
+
$fn = ($media_changes ? $conf['media_changelog'] : $conf['changelog']);
// Trim the Recent Changes
@@ -70,6 +72,7 @@ function runTrimRecentChanges($media_changes = false) {
if (count($lines)<=$conf['recent']) {
// nothing to trim
io_unlock($fn);
+ echo "runTrimRecentChanges($media_changes): finished".NL;
return false;
}
@@ -91,6 +94,7 @@ function runTrimRecentChanges($media_changes = false) {
// nothing to trim
@unlink($fn.'_tmp');
io_unlock($fn);
+ echo "runTrimRecentChanges($media_changes): finished".NL;
return false;
}
@@ -114,10 +118,12 @@ function runTrimRecentChanges($media_changes = false) {
} else {
io_unlock($fn);
}
+ echo "runTrimRecentChanges($media_changes): finished".NL;
return true;
}
// nothing done
+ echo "runTrimRecentChanges($media_changes): finished".NL;
return false;
}
@@ -160,11 +166,12 @@ function runSitemapper(){
* @author Adrian Lang <lang@cosmocode.de>
*/
function sendDigest() {
- echo 'sendDigest(): start'.NL;
+ echo 'sendDigest(): started'.NL;
global $ID;
global $conf;
if (!$conf['subscribers']) {
- return;
+ echo 'sendDigest(): disabled'.NL;
+ return false;
}
$subscriptions = subscription_find($ID, array('style' => '(digest|list)',
'escaped' => true));
@@ -243,6 +250,8 @@ function sendDigest() {
// restore current user info
$USERINFO = $olduinfo;
$_SERVER['REMOTE_USER'] = $olduser;
+ echo 'sendDigest(): finished'.NL;
+ return true;
}
/**
diff --git a/lib/exe/js.php b/lib/exe/js.php
index 4b72014b2..7c54f3e2e 100644
--- a/lib/exe/js.php
+++ b/lib/exe/js.php
@@ -307,7 +307,10 @@ function js_compress($s){
$j += 1;
}
}
- $result .= substr($s,$i,$j+1);
+ $string = substr($s,$i,$j+1);
+ // remove multiline markers:
+ $string = str_replace("\\\n",'',$string);
+ $result .= $string;
$i = $i + $j + 1;
continue;
}
@@ -322,7 +325,10 @@ function js_compress($s){
$j += 1;
}
}
- $result .= substr($s,$i,$j+1);
+ $string = substr($s,$i,$j+1);
+ // remove multiline markers:
+ $string = str_replace("\\\n",'',$string);
+ $result .= $string;
$i = $i + $j + 1;
continue;
}
diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php
index cf3682f11..5e6c197d0 100644
--- a/lib/exe/xmlrpc.php
+++ b/lib/exe/xmlrpc.php
@@ -30,10 +30,11 @@ class dokuwiki_xmlrpc_server extends IXR_Server {
} catch (RemoteAccessDeniedException $e) {
if (!isset($_SERVER['REMOTE_USER'])) {
header('HTTP/1.1 401 Unauthorized');
+ return new IXR_Error(-32603, "server error. not authorized to call method $methodname");
} else {
header('HTTP/1.1 403 Forbidden');
+ return new IXR_Error(-32604, "server error. forbidden to call the method $methodname");
}
- return new IXR_Error(-32603, "server error. not authorized to call method $methodname");
} catch (RemoteException $e) {
return new IXR_Error($e->getCode(), $e->getMessage());
}