summaryrefslogtreecommitdiff
path: root/lib/exe
diff options
context:
space:
mode:
authorDominik Eckelmann <deckelmann@gmail.com>2012-03-14 12:52:36 +0100
committerDominik Eckelmann <deckelmann@gmail.com>2012-03-14 12:52:36 +0100
commit3a6d76070be7220b8e5f7c04443aa923bc8cddf2 (patch)
treedfd00b5d0c5f58ee313eb376a8cb1ee99512bf83 /lib/exe
parent03d7247e047c21d2733f837148a1499f56784ae3 (diff)
parentd0caa5642f6e322a026bd5bdac4585ff1b2f40da (diff)
downloadrpg-3a6d76070be7220b8e5f7c04443aa923bc8cddf2.tar.gz
rpg-3a6d76070be7220b8e5f7c04443aa923bc8cddf2.tar.bz2
Merge branch 'master' of https://github.com/splitbrain/dokuwiki
Conflicts: lib/exe/xmlrpc.php
Diffstat (limited to 'lib/exe')
-rw-r--r--lib/exe/ajax.php9
-rw-r--r--lib/exe/css.php4
-rw-r--r--lib/exe/js.php12
-rw-r--r--lib/exe/opensearch.php4
-rw-r--r--lib/exe/xmlrpc.php8
5 files changed, 14 insertions, 23 deletions
diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php
index f8d62cb57..3d1584244 100644
--- a/lib/exe/ajax.php
+++ b/lib/exe/ajax.php
@@ -6,11 +6,6 @@
* @author Andreas Gohr <andi@splitbrain.org>
*/
-//fix for Opera XMLHttpRequests
-if(!count($_POST) && !empty($HTTP_RAW_POST_DATA)){
- parse_str($HTTP_RAW_POST_DATA, $_POST);
-}
-
if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../');
require_once(DOKU_INC.'inc/init.php');
//close session
@@ -54,6 +49,8 @@ function ajax_qsearch(){
if(empty($query)) $query = $_GET['q'];
if(empty($query)) return;
+ $query = urldecode($query);
+
$data = ft_pageLookup($query, true, useHeading('navigation'));
if(!count($data)) return;
@@ -257,7 +254,7 @@ function ajax_mediaupload(){
$id = $_GET['qqfile'];
}
- $id = cleanID($id, false, true);
+ $id = cleanID($id);
$NS = $_REQUEST['ns'];
$ns = $NS.':'.getNS($id);
diff --git a/lib/exe/css.php b/lib/exe/css.php
index d54e2e46c..69b512205 100644
--- a/lib/exe/css.php
+++ b/lib/exe/css.php
@@ -41,8 +41,8 @@ function css_out(){
$tplinc = DOKU_INC.'lib/tpl/'.$tpl.'/';
$tpldir = DOKU_BASE.'lib/tpl/'.$tpl.'/';
}else{
- $tplinc = DOKU_TPLINC;
- $tpldir = DOKU_TPL;
+ $tplinc = tpl_incdir();
+ $tpldir = tpl_basedir();
}
// The generated script depends on some dynamic options
diff --git a/lib/exe/js.php b/lib/exe/js.php
index b7f2fd222..4b72014b2 100644
--- a/lib/exe/js.php
+++ b/lib/exe/js.php
@@ -32,8 +32,8 @@ function js_out(){
global $config_cascade;
// The generated script depends on some dynamic options
- $cache = new cache('scripts'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],
- '.js');
+ $cache = new cache('scripts'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.js');
+ $cache->_event = 'JS_CACHE_USE';
// load minified version for some files
$min = $conf['compress'] ? '.min' : '';
@@ -65,7 +65,7 @@ function js_out(){
# disabled for FS#1958 DOKU_INC.'lib/scripts/hotkeys.js',
DOKU_INC.'lib/scripts/behaviour.js',
DOKU_INC.'lib/scripts/page.js',
- DOKU_TPLINC.'script.js',
+ tpl_incdir().'script.js',
);
// add possible plugin scripts and userscript
@@ -79,15 +79,15 @@ function js_out(){
// check cache age & handle conditional request
// This may exit if a cache can be used
- http_cached($cache->cache,
- $cache->useCache(array('files' => $cache_files)));
+ $cache_ok = $cache->useCache(array('files' => $cache_files));
+ http_cached($cache->cache, $cache_ok);
// start output buffering and build the script
ob_start();
// add some global variables
print "var DOKU_BASE = '".DOKU_BASE."';";
- print "var DOKU_TPL = '".DOKU_TPL."';";
+ print "var DOKU_TPL = '".tpl_basedir()."';";
// FIXME: Move those to JSINFO
print "var DOKU_UHN = ".((int) useHeading('navigation')).";";
print "var DOKU_UHC = ".((int) useHeading('content')).";";
diff --git a/lib/exe/opensearch.php b/lib/exe/opensearch.php
index 03a1632c4..73939c347 100644
--- a/lib/exe/opensearch.php
+++ b/lib/exe/opensearch.php
@@ -16,9 +16,9 @@ require_once(DOKU_INC.'inc/init.php');
// try to be clever about the favicon location
if(file_exists(DOKU_INC.'favicon.ico')){
$ico = DOKU_URL.'favicon.ico';
-}elseif(file_exists(DOKU_TPLINC.'images/favicon.ico')){
+}elseif(file_exists(tpl_incdir().'images/favicon.ico')){
$ico = DOKU_URL.'lib/tpl/'.$conf['template'].'/images/favicon.ico';
-}elseif(file_exists(DOKU_TPLINC.'favicon.ico')){
+}elseif(file_exists(tpl_incdir().'favicon.ico')){
$ico = DOKU_URL.'lib/tpl/'.$conf['template'].'/favicon.ico';
}else{
$ico = DOKU_URL.'lib/tpl/default/images/favicon.ico';
diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php
index a48ac41b0..93086e891 100644
--- a/lib/exe/xmlrpc.php
+++ b/lib/exe/xmlrpc.php
@@ -4,11 +4,6 @@ if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../');
// fix when '< ?xml' isn't on the very first line
if(isset($HTTP_RAW_POST_DATA)) $HTTP_RAW_POST_DATA = trim($HTTP_RAW_POST_DATA);
-/**
- * Increased whenever the API is changed
- */
-define('DOKU_XMLRPC_API_VERSION', 6);
-
require_once(DOKU_INC.'inc/init.php');
require_once(DOKU_INC.'inc/remote.php');
session_write_close(); //close session
@@ -42,7 +37,7 @@ class dokuwiki_xmlrpc_server extends IXR_Server {
} else {
header('HTTP/1.1 403 Forbidden');
}
- return new IXR_Error(-32603, 'server error. not authorized to call method');
+ return new IXR_Error(-32603, "server error. not authorized to call method $methodname");
} catch (RemoteException $e) {
return new IXR_Error($e->getCode(), $e->getMessage());
}
@@ -55,7 +50,6 @@ class dokuwiki_xmlrpc_server extends IXR_Server {
function toFile($data) {
return new IXR_Base64($data);
}
-
}
$server = new dokuwiki_xmlrpc_server();