summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--feed.php5
-rw-r--r--inc/HTTPClient.php3
-rw-r--r--inc/SimplePie.php2
-rw-r--r--inc/TarLib.class.php76
-rw-r--r--inc/actions.php4
-rw-r--r--inc/changelog.php2
-rw-r--r--inc/common.php1
-rw-r--r--inc/feedcreator.class.php6
-rw-r--r--inc/lang/tr/install.html2
-rw-r--r--inc/media.php2
-rw-r--r--inc/pageutils.php1
-rw-r--r--inc/search.php3
-rw-r--r--inc/template.php2
-rw-r--r--inc/toolbar.php2
-rw-r--r--lib/plugins/plugin/classes/ap_info.class.php2
-rw-r--r--lib/plugins/plugin/classes/ap_manage.class.php1
-rw-r--r--lib/plugins/revert/admin.php1
-rw-r--r--lib/scripts/media.js2
18 files changed, 18 insertions, 99 deletions
diff --git a/feed.php b/feed.php
index 50786dd3a..0980dfaa8 100644
--- a/feed.php
+++ b/feed.php
@@ -248,7 +248,6 @@ function rss_buildItems(&$rss,&$data,$opt){
// add user
# FIXME should the user be pulled from metadata as well?
- $user = null;
$user = @$ditem['user']; // the @ spares time repeating lookup
$item->author = '';
if($user && $conf['useacl'] && $auth){
@@ -309,9 +308,6 @@ function rss_buildItems(&$rss,&$data,$opt){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function rssRecentChanges($opt){
- global $conf;
- global $auth;
-
$flags = RECENTS_SKIP_DELETED;
if(!$opt['show_minor']) $flags += RECENTS_SKIP_MINORS;
@@ -347,7 +343,6 @@ function rssSearch($opt){
if(!$opt['search_query']) return;
require_once(DOKU_INC.'inc/fulltext.php');
- $data = array();
$data = ft_pageSearch($opt['search_query'],$poswords);
$data = array_keys($data);
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php
index eea01f9d5..4e64668d5 100644
--- a/inc/HTTPClient.php
+++ b/inc/HTTPClient.php
@@ -276,7 +276,7 @@ class HTTPClient {
// open socket
$socket = @fsockopen($server,$port,$errno, $errstr, $this->timeout);
if (!$socket){
- $resp->status = '-100';
+ $this->status = -100;
$this->error = "Could not connect to $server:$port\n$errstr ($errno)";
return false;
}
@@ -560,6 +560,7 @@ class HTTPClient {
* @author Andreas Gohr <andi@splitbrain.org>
*/
function _postEncode($data){
+ $url = '';
foreach($data as $key => $val){
if($url) $url .= '&';
$url .= urlencode($key).'='.urlencode($val);
diff --git a/inc/SimplePie.php b/inc/SimplePie.php
index 276a654ee..99c9f3226 100644
--- a/inc/SimplePie.php
+++ b/inc/SimplePie.php
@@ -9120,7 +9120,7 @@ class SimplePie_Misc
}
else
{
- trigger_error('Unknown class passed as parameter', E_USER_WARNNG);
+ trigger_error('Unknown class passed as parameter', E_USER_WARNING);
}
}
return false;
diff --git a/inc/TarLib.class.php b/inc/TarLib.class.php
index 3e9e81234..3da3c72c2 100644
--- a/inc/TarLib.class.php
+++ b/inc/TarLib.class.php
@@ -457,82 +457,6 @@ class TarLib {
return isset($ecodes[$i]) ? $ecodes[$i] : $ecodes[0];
}
- /**
- * Display informations about the MaxgTar Class.
- *
- * This function will display vaious informations about the server
- * MaxgTar is running on.
- *
- * The optional parameter DispHeaders is used to generate a full page with
- * HTML headers (TRUE by default) or just the table with the informations
- * (FALSE). Note that the HTML page generated is verified compatible XHTML
- * 1.0, but not HTML 4.0 compatible.
- */
- function TarInfo($headers = true) {
- if($headers) {
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html>
-
- <head>
- <title>MaxgComp TAR</title>
- <style type="text/css">
- body{margin: 20px;}
- body,td{font-size:10pt;font-family: arial;}
- </style>
- <meta name="Author" content="The Maxg Network, http://maxg.info" />
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- </head>
-
- <body bgcolor="#EFEFEF">
- <?php
- }
- ?>
- <table border="0" align="center" width="500" cellspacing="4" cellpadding="5" style="border:1px dotted black;">
- <tr>
- <td align="center" bgcolor="#DFDFEF" colspan="3" style="font-size:15pt;font-color:#330000;border:1px solid black;">MaxgComp TAR</td>
- </tr>
- <tr>
- <td colspan="2" bgcolor="#EFEFFE" style="border:1px solid black;">This software was created by the Maxg Network, <a href="http://maxg.info" target="_blank" style="text-decoration:none;color:#333366;">http://maxg.info</a>
- <br />It is distributed under the GNU <a href="http://www.gnu.org/copyleft/lesser.html" target="_blank" style="text-decoration:none;color:#333366;">Lesser General Public License</a>
- <br />You can find the documentation of this class <a href="http://docs.maxg.info" target="_blank" style="text-decoration:none;color:#333366;">here</a></td>
- <td width="60" bgcolor="#EFEFFE" style="border:1px solid black;" align="center"><img src="http://img.maxg.info/menu/tar.gif" border="0" alt="MaxgComp TAR" /></td>
- </tr>
- <tr>
- <td width="50%" align="center" style="border:1px solid black;" bgcolor="#DFDFEF">MaxgComp TAR version</td>
- <td colspan="2" align="center" bgcolor="#EFEFFE" style="border:1px solid black;"><?=TARLIB_VERSION?></td>
- </tr>
- <tr>
- <td width="50%" align="center" style="border:1px solid black;" bgcolor="#DFDFEF">ZLIB extensions</td>
- <td colspan="2" align="center" bgcolor="#EFEFFE" style="border:1px solid black;"><?=(extension_loaded('zlib') ? '<b>Yes</b>' : '<i>No</i>')?></td>
- </tr>
- <tr>
- <td width="50%" align="center" style="border:1px solid black;" bgcolor="#DFDFEF">BZ2 extensions</td>
- <td colspan="2" align="center" bgcolor="#EFEFFE" style="border:1px solid black;"><?=(extension_loaded('bz2') ? '<b>Yes</b>' : '<i>No</i>')?></td>
- </tr>
- <tr>
- <td width="50%" align="center" style="border:1px solid black;" bgcolor="#DFDFEF">Allow URL fopen</td>
- <td colspan="2" align="center" bgcolor="#EFEFFE" style="border:1px solid black;"><?=(ini_get('allow_url_fopen') ? '<b>Yes</b>' : '<i>No</i>')?></td>
- </tr>
- <tr>
- <td width="50%" align="center" style="border:1px solid black;" bgcolor="#DFDFEF">Time limit</td>
- <td colspan="2" align="center" bgcolor="#EFEFFE" style="border:1px solid black;"><?=ini_get('max_execution_time')?></td>
- </tr>
- <tr>
- <td width="50%" align="center" style="border:1px solid black;" bgcolor="#DFDFEF">PHP Version</td>
- <td colspan="2" align="center" bgcolor="#EFEFFE" style="border:1px solid black;"><?=phpversion()?></td>
- </tr>
- <tr>
- <td colspan="3" align="center" bgcolor="#EFEFFE" style="border:1px solid black;">
- <i>Special thanks to &laquo; Vincent Blavet &raquo; for his PEAR::Archive_Tar class</i>
- </td>
- </tr>
- </table>
- <?php
- if($headers) echo '</body></html>';
- }
-
function _seek($p_flen, $tell=0) {
if($this->_nomf === TarLib::ARCHIVE_DYNAMIC)
$this->_memdat=substr($this->_memdat,0,($tell ? strlen($this->_memdat) : 0) + $p_flen);
diff --git a/inc/actions.php b/inc/actions.php
index 3e0cb1207..d9f5d017c 100644
--- a/inc/actions.php
+++ b/inc/actions.php
@@ -16,13 +16,10 @@ if(!defined('DOKU_INC')) die('meh.');
* @triggers ACTION_HEADERS_SEND
*/
function act_dispatch(){
- global $INFO;
global $ACT;
global $ID;
global $QUERY;
global $lang;
- global $conf;
- global $license;
$preact = $ACT;
@@ -57,7 +54,6 @@ function act_dispatch(){
$ACT = act_permcheck($ACT);
//register
- $nil = array();
if($ACT == 'register' && $_POST['save'] && register()){
$ACT = 'login';
}
diff --git a/inc/changelog.php b/inc/changelog.php
index d5cd8308c..bb00df76c 100644
--- a/inc/changelog.php
+++ b/inc/changelog.php
@@ -104,7 +104,7 @@ function addLogEntry($date, $id, $type=DOKU_CHANGE_TYPE_EDIT, $summary='', $extr
* @author Ben Coburn <btcoburn@silicodon.net>
*/
function addMediaLogEntry($date, $id, $type=DOKU_CHANGE_TYPE_EDIT, $summary='', $extra='', $flags=null){
- global $conf, $INFO;
+ global $conf;
$id = cleanid($id);
diff --git a/inc/common.php b/inc/common.php
index bf5987c28..003546409 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -97,7 +97,6 @@ function pageinfo(){
global $REV;
global $RANGE;
global $USERINFO;
- global $conf;
global $lang;
// include ID & REV not redundant, as some parts of DokuWiki may temporarily change $ID, e.g. p_wiki_xhtml
diff --git a/inc/feedcreator.class.php b/inc/feedcreator.class.php
index e7b8d7afc..68b9bdd2b 100644
--- a/inc/feedcreator.class.php
+++ b/inc/feedcreator.class.php
@@ -685,7 +685,8 @@ class FeedDate {
$months = Array("Jan"=>1,"Feb"=>2,"Mar"=>3,"Apr"=>4,"May"=>5,"Jun"=>6,"Jul"=>7,"Aug"=>8,"Sep"=>9,"Oct"=>10,"Nov"=>11,"Dec"=>12);
$this->unix = mktime($matches[4],$matches[5],$matches[6],$months[$matches[2]],$matches[1],$matches[3]);
if (substr($matches[7],0,1)=='+' OR substr($matches[7],0,1)=='-') {
- $tzOffset = (substr($matches[7],0,3) * 60 + substr($matches[7],-2)) * 60;
+ $tzOffset = (((int) substr($matches[7],0,3) * 60) +
+ (int) substr($matches[7],-2)) * 60;
} else {
if (strlen($matches[7])==1) {
$oneHour = 3600;
@@ -709,7 +710,8 @@ class FeedDate {
if (preg_match("~(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(.*)~",$dateString,$matches)) {
$this->unix = mktime($matches[4],$matches[5],$matches[6],$matches[2],$matches[3],$matches[1]);
if (substr($matches[7],0,1)=='+' OR substr($matches[7],0,1)=='-') {
- $tzOffset = (substr($matches[7],0,3) * 60 + substr($matches[7],-2)) * 60;
+ $tzOffset = (((int) substr($matches[7],0,3) * 60) +
+ (int) substr($matches[7],-2)) * 60;
} else {
if ($matches[7]=="Z") {
$tzOffset = 0;
diff --git a/inc/lang/tr/install.html b/inc/lang/tr/install.html
index 59e7f57a7..d479ca4e8 100644
--- a/inc/lang/tr/install.html
+++ b/inc/lang/tr/install.html
@@ -1,6 +1,6 @@
<p>Bu sayfa <a href="http://dokuwiki.org">Dokuwiki</a> kurmanıza yardımcı olmaktadır. Kurulum hakkında bilgi sahibi olmak için <a href="http://dokuwiki.org/installer">bu sayfayı</a> ziyaret edebilirsiniz.</p>
-<p>DokuWiki wiki sayfalarını ve wiki sayfalarına ilişkin verileri (resimler, arama indeksi, geçmiş sürümler) dosyalarda tutar. DokuWikiyi sorunsuz olarak kullanmak için bu dosyaların bulunduğu dizinlere <b>mutlaka</b> yazma izniniz olması gereklidir. Bu kurulum betiği yazma izinlerini ayarlayamamaktadır. İzinleri shell, FTP veya kontrol paneliniz (CPanel, Plesk vs.) aracılığı ile düzenleyebilirsiniz.</p>
+<p>DokuWiki wiki sayfalarını ve wiki sayfalarına ilişkin verileri (resimler, arama indeksi, geçmiş sürümler) dosyalarda tutar. DokuWikiyi sorunsuz olarak kullanmak için bu dosyaların bulunduğu dizinlere <strong>mutlaka</strong> yazma izniniz olması gereklidir. Bu kurulum betiği yazma izinlerini ayarlayamamaktadır. İzinleri shell, FTP veya kontrol paneliniz (CPanel, Plesk vs.) aracılığı ile düzenleyebilirsiniz.</p>
<p>Kurulum betiği <acronym title="access control list">ACL</acronym>'yi otomatik olarak ayarlamaktadır. Böylece yönetici izinleri belirlenip, DokuWiki kullanımı kolaylaştırılmaktadır.</p>
diff --git a/inc/media.php b/inc/media.php
index 668f42d6a..3dacd12b7 100644
--- a/inc/media.php
+++ b/inc/media.php
@@ -391,6 +391,7 @@ function media_contentcheck($file,$mime){
function media_notify($id,$file,$mime){
global $lang;
global $conf;
+ global $INFO;
if(empty($conf['notify'])) return; //notify enabled?
$ip = clientIP();
@@ -729,6 +730,7 @@ function media_nstree($ns){
// currently selected namespace
$ns = cleanID($ns);
if(empty($ns)){
+ global $ID;
$ns = dirname(str_replace(':','/',$ID));
if($ns == '.') $ns ='';
}
diff --git a/inc/pageutils.php b/inc/pageutils.php
index 969a6ea0d..42a485bdf 100644
--- a/inc/pageutils.php
+++ b/inc/pageutils.php
@@ -96,7 +96,6 @@ function getID($param='id',$clean=true){
*/
function cleanID($raw_id,$ascii=false,$media=false){
global $conf;
- global $lang;
static $sepcharpat = null;
global $cache_cleanid;
diff --git a/inc/search.php b/inc/search.php
index ea8897662..8273eef8c 100644
--- a/inc/search.php
+++ b/inc/search.php
@@ -322,6 +322,7 @@ function search_backlinks(&$data,$base,$file,$type,$lvl,$opts){
$instructions = p_cached_instructions($base.$file,true);
if(is_null($instructions)) return false;
+ global $conf;
//check all links for match
foreach($instructions as $ins){
if($ins[0] == 'internallink' || ($conf['camelcase'] && $ins[0] == 'camelcaselink') ){
@@ -595,7 +596,7 @@ function search_universal(&$data,$base,$file,$type,$lvl,$opts){
if(!$opts['listfiles']) return $return;
if(!$opts['skipacl'] && $item['perm'] < AUTH_READ) return $return;
if($opts['pagesonly'] && (substr($file,-4) != '.txt')) return $return;
- if(!$conf['showhidden'] && isHiddenPage($id)) return $return;
+ if(!$opts['showhidden'] && isHiddenPage($item['id'])) return $return;
if($opts['filematch'] && !preg_match('/'.$opts['filematch'].'/',$file)) return $return;
if($opts['idmatch'] && !preg_match('/'.$opts['idmatch'].'/',$item['id'])) return $return;
}
diff --git a/inc/template.php b/inc/template.php
index f7c104cdb..4eed30591 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -1169,7 +1169,7 @@ function tpl_actiondropdown($empty='',$button='&gt;'){
global $lang;
global $auth;
- echo '<form method="post" accept-charset="utf-8">'; #FIXME action
+ echo '<form action="' . DOKU_SCRIPT . '" method="post" accept-charset="utf-8">';
echo '<input type="hidden" name="id" value="'.$ID.'" />';
if($REV) echo '<input type="hidden" name="rev" value="'.$REV.'" />';
echo '<input type="hidden" name="sectok" value="'.getSecurityToken().'" />';
diff --git a/inc/toolbar.php b/inc/toolbar.php
index a07bfb93d..8bcf6f030 100644
--- a/inc/toolbar.php
+++ b/inc/toolbar.php
@@ -16,8 +16,6 @@ if(!defined('DOKU_INC')) die('meh.');
* @author Andreas Gohr <andi@splitbrain.org>
*/
function toolbar_JSdefines($varname){
- global $ID;
- global $conf;
global $lang;
$menu = array();
diff --git a/lib/plugins/plugin/classes/ap_info.class.php b/lib/plugins/plugin/classes/ap_info.class.php
index cebbf090a..44926c035 100644
--- a/lib/plugins/plugin/classes/ap_info.class.php
+++ b/lib/plugins/plugin/classes/ap_info.class.php
@@ -15,7 +15,7 @@ class ap_info extends ap_manage {
foreach ($component_list as $component) {
- if ($obj = & plugin_load($component['type'],$component['name'],false,true) === NULL) continue;
+ if (($obj = &plugin_load($component['type'],$component['name'],false,true)) === NULL) continue;
$compname = explode('_',$component['name']);
if($compname[1]){
diff --git a/lib/plugins/plugin/classes/ap_manage.class.php b/lib/plugins/plugin/classes/ap_manage.class.php
index eb5348672..656b4762b 100644
--- a/lib/plugins/plugin/classes/ap_manage.class.php
+++ b/lib/plugins/plugin/classes/ap_manage.class.php
@@ -120,6 +120,7 @@ class ap_manage {
@touch(reset($config_cascade['main']['local']));
// update latest plugin date - FIXME
+ global $ID;
send_redirect(wl($ID,array('do'=>'admin','page'=>'plugin'),true));
}
diff --git a/lib/plugins/revert/admin.php b/lib/plugins/revert/admin.php
index 1a327ca8a..8a2cd5553 100644
--- a/lib/plugins/revert/admin.php
+++ b/lib/plugins/revert/admin.php
@@ -126,6 +126,7 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin {
*/
function _list($filter){
global $conf;
+ global $lang;
echo '<hr /><br />';
echo '<form action="" method="post"><div class="no">';
echo '<input type="hidden" name="filter" value="'.hsc($filter).'" />';
diff --git a/lib/scripts/media.js b/lib/scripts/media.js
index 95b1ab69e..dcd692f42 100644
--- a/lib/scripts/media.js
+++ b/lib/scripts/media.js
@@ -1,5 +1,5 @@
/**
- * JavaScript functionalitiy for the media management popup
+ * JavaScript functionality for the media management popup
*
* @author Andreas Gohr <andi@splitbrain.org>
*/