diff options
author | Ben Coburn <btcoburn@silicodon.net> | 2006-07-10 13:46:55 +0200 |
---|---|---|
committer | Ben Coburn <btcoburn@silicodon.net> | 2006-07-10 13:46:55 +0200 |
commit | d98d4540790616b0dc0e1f613e4c217d24038a97 (patch) | |
tree | e02577576fade770c991feef98e84d1bef870e67 | |
parent | 039bebbab7964017afd2e53f791f9be9a1620da7 (diff) | |
download | rpg-d98d4540790616b0dc0e1f613e4c217d24038a97.tar.gz rpg-d98d4540790616b0dc0e1f613e4c217d24038a97.tar.bz2 |
fixing undefined variables
Fixing undefined variable notices and sometimes
the underlying error that produced them.
darcs-hash:20060710114655-05dcb-073948171847f1f43f153e96c8382abd421da36a.gz
-rw-r--r-- | doku.php | 1 | ||||
-rw-r--r-- | inc/events.php | 2 | ||||
-rw-r--r-- | inc/html.php | 2 | ||||
-rw-r--r-- | inc/parser/xhtml.php | 3 | ||||
-rw-r--r-- | inc/template.php | 4 | ||||
-rw-r--r-- | lib/exe/ajax.php | 2 |
6 files changed, 10 insertions, 4 deletions
@@ -20,6 +20,7 @@ //import variables $QUERY = trim($_REQUEST['id']); $ID = getID(); + $NS = getNS($ID); $REV = $_REQUEST['rev']; $ACT = $_REQUEST['do']; $IDX = $_REQUEST['idx']; diff --git a/inc/events.php b/inc/events.php index 2e7715352..4563f2c75 100644 --- a/inc/events.php +++ b/inc/events.php @@ -53,7 +53,7 @@ class Doku_Event { function advise_before($enablePreventDefault=true) { global $EVENT_HANDLER; - $this->canPreventDefault = $enablePrevent; + $this->canPreventDefault = $enablePreventDefault; $EVENT_HANDLER->process_event($this,'BEFORE'); return (!$enablePreventDefault || $this->_default); diff --git a/inc/html.php b/inc/html.php index 8906491ef..9fed619a8 100644 --- a/inc/html.php +++ b/inc/html.php @@ -623,6 +623,7 @@ function html_index($ns){ * @author Andreas Gohr <andi@splitbrain.org> */ function html_list_index($item){ + global $ID; $ret = ''; $base = ':'.$item['id']; $base = substr($base,strrpos($base,':')+1); @@ -1014,6 +1015,7 @@ function html_edit($text=null,$include='edit'){ //FIXME: include needed? if($wr){ if ($REV) print p_locale_xhtml('editrev'); print p_locale_xhtml($include); + $ro=false; }else{ // check pseudo action 'source' if(!actionOK('source')){ diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index d7a9a1ef4..9518cd12e 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -721,6 +721,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $link['suf'] = ''; $link['more'] = ''; $link['target'] = $conf['target']['media']; + $noLink = false; $link['title'] = $this->_xmlEntities($src); list($ext,$mime) = mimetype($src); @@ -760,7 +761,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $link['title'] = $this->_xmlEntities($src); $link['url'] = ml($src,array('cache'=>$cache)); $link['name'] = $this->_media ($src, $title, $align, $width, $height, $cache); - + $noLink = false; list($ext,$mime) = mimetype($src); if(substr($mime,0,5) == 'image'){ diff --git a/inc/template.php b/inc/template.php index f14472181..ed887d216 100644 --- a/inc/template.php +++ b/inc/template.php @@ -164,6 +164,7 @@ function tpl_admin(){ */ function tpl_metaheaders($alt=true){ global $ID; + global $REV; global $INFO; global $ACT; global $lang; @@ -291,6 +292,7 @@ function tpl_getparent($id){ function tpl_button($type){ global $ACT; global $ID; + global $REV; global $NS; global $INFO; global $conf; @@ -604,7 +606,7 @@ function tpl_youarehere($sep=' » '){ } // print current page, skipping start page, skipping for namespace index - if($page == $part.$parts[$i]) return; + if(isset($page) && $page==$part.$parts[$i]) return; $page = $part.$parts[$i]; if($page == $conf['start']) return; echo $sep; diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php index 5ae6f4df8..0100f3130 100644 --- a/lib/exe/ajax.php +++ b/lib/exe/ajax.php @@ -80,7 +80,7 @@ function ajax_lock(){ $client = $_SERVER['REMOTE_USER']; if(!$client) $client = clientIP(true); - $draft = array('id' => $ID, + $draft = array('id' => $id, 'prefix' => $_POST['prefix'], 'text' => $_POST['wikitext'], 'suffix' => $_POST['suffix'], |