|
From: Sebastian D. <se...@us...> - 2006-03-06 15:24:30
|
Update of /cvsroot/wackofork/wiki/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17190 Modified Files: include.php Log Message: - default ist nun nomark=2 (smooth) - clean up Index: include.php =================================================================== RCS file: /cvsroot/wackofork/wiki/actions/include.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** include.php 6 Mar 2006 00:23:28 -0000 1.4 --- include.php 6 Mar 2006 15:24:21 -0000 1.5 *************** *** 1,51 **** <?php foreach (explode(',', $vars[0]) as $vars[0]) { ! $includeActionOutput = ""; ! $vars[0] = $this->UnwrapLink($vars[0]); ! if ($_SESSION["linktracking"] && $track) ! $this->TrackLinkTo($vars[0]); ! if (in_array($vars[0],$this->context)) return; ! if ($vars[0] == $this->tag) return; ! if (! $this->HasAccess("read",$vars[0])){ ! if ($nowarning!=1) ! $includeActionOutput .= $this->GetResourceValue("NoAccessToSourcePage"); ! }else{ ! if (!$inc_page = $this->LoadPage($vars[0], $_GET["time"])){ ! $includeActionOutput .= "<em> ".$this->GetResourceValue("SourcePageDoesntExist")."(".$this->Link("/".$vars[0]).")</em>"; ! }else{ ! if ($inc_page["body_r"]) $strings = $inc_page["body_r"]; ! else $strings = $this->Format($inc_page["body"], "wacko"); ! $strings = preg_replace("/\¡\¡toc[^\¡]*\¡\¡/i","",$strings); ! $strings = preg_replace("/\¡\¡tableofcontents[^\¡]*\¡\¡/i","",$strings); ! $strings = preg_replace("/\¡\¡p[^\¡]*\¡\¡/i","",$strings); ! $strings = preg_replace("/\¡\¡showparagraphs[^\¡]*\¡\¡/i","",$strings); ! $strings = preg_replace("/\¡\¡redirect[^\¡]*\¡\¡/i","",$strings); ! $strings = preg_replace("/.*\¡\¡a name=\"?$first_anchor\"?\¡\¡(.*)\¡\¡a name=\"?$last_anchor\"?\¡\¡.*$/is","\$1",$strings); ! if (($nomark!=1) && ($nomark!=2 || $this->HasAccess("write", $vars[0]))) ! $includeActionOutput .= "<div class=\"include\">"."<div class=\"name\">".$this->Link("/".$vars[0])." :: ". ! "<a href=\"".$this->Href("edit", $vars[0])."\">".$this->GetResourceValue("EditIcon")."</a></div>"; ! ! $this->context[++$this->current_context] = $vars[0]; ! $includeActionOutput .= $this->Format($strings, "post_wacko"); ! $this->current_context--; ! ! if (($nomark!=1) && ($nomark!=2 || $this->HasAccess("write", $vars[0]))) ! $includeActionOutput .= "<div class=\"name\">".$this->Link("/".$vars[0])." :: ". ! "<a href=\"".$this->Href("edit", $vars[0])."\">".$this->GetResourceValue("EditIcon")."</a></div></div>"; ! }; ! } ! if ($divclass != "") $includeActionOutput = "<div class='$divclass'><div class='inner'>\n".$includeActionOutput."</div></div>\n"; ! print $includeActionOutput; ! #print "<br />\n"; } ?> --- 1,63 ---- <?php + if (!isset($nomark)) $nomark=2; # default to dynamic edit buttons + foreach (explode(',', $vars[0]) as $vars[0]) { + $includeActionOutput = ""; ! $vars[0] = $this->UnwrapLink($vars[0]); ! if ($_SESSION["linktracking"] && $track) ! $this->TrackLinkTo($vars[0]); ! if (in_array($vars[0],$this->context)) return; ! if ($vars[0] == $this->tag) return; ! if (! $this->HasAccess("read",$vars[0])) ! { ! if ($nowarning!=1) ! $includeActionOutput .= $this->GetResourceValue("NoAccessToSourcePage"); ! } ! else ! { ! if (!$inc_page = $this->LoadPage($vars[0], $_GET["time"])) ! { ! $includeActionOutput .= "<em> ".$this->GetResourceValue("SourcePageDoesntExist")."(".$this->Link("/".$vars[0]).")</em>"; ! } ! else ! { ! if ($inc_page["body_r"]) $strings = $inc_page["body_r"]; ! else $strings = $this->Format($inc_page["body"], "wacko"); ! $strings = preg_replace("/\¡\¡toc[^\¡]*\¡\¡/i","",$strings); ! $strings = preg_replace("/\¡\¡tableofcontents[^\¡]*\¡\¡/i","",$strings); ! $strings = preg_replace("/\¡\¡p[^\¡]*\¡\¡/i","",$strings); ! $strings = preg_replace("/\¡\¡showparagraphs[^\¡]*\¡\¡/i","",$strings); ! $strings = preg_replace("/\¡\¡redirect[^\¡]*\¡\¡/i","",$strings); ! $strings = preg_replace("/.*\¡\¡a name=\"?$first_anchor\"?\¡\¡(.*)\¡\¡a name=\"?$last_anchor\"?\¡\¡.*$/is","\$1",$strings); ! if (($nomark!=1) && ($nomark!=2 || $this->HasAccess("write", $vars[0]))) ! $includeActionOutput .= "<div class=\"name\">".$this->Link("/".$vars[0])." :: ". ! "<a href=\"".$this->Href("edit", $vars[0])."\">".$this->GetResourceValue("EditIcon")."</a></div>"; ! $this->context[++$this->current_context] = $vars[0]; ! $includeActionOutput .= $this->Format($strings, "post_wacko"); ! $this->current_context--; ! if (($nomark!=1) && ($nomark!=2 || $this->HasAccess("write", $vars[0]))) ! $includeActionOutput .= "<div class=\"name\">".$this->Link("/".$vars[0])." :: ". ! "<a href=\"".$this->Href("edit", $vars[0])."\">".$this->GetResourceValue("EditIcon")."</a></div>"; ! } ! } ! ! if ($divclass != "") ! $includeActionOutput = "<div class='$divclass'><div class='inner'>\n".$includeActionOutput."</div></div>\n"; ! else ! $includeActionOutput = "<div class='include'>\n".$includeActionOutput."</div>\n"; + print $includeActionOutput; + #print "<br />\n"; } + unset($nomark); + ?> |