logo       
Google Custom Search
    AddThis Social Bookmark Button

CVS: phpwiki/lib/plugin CreateToc.php,1.22,1.23: msg#00360

Subject: CVS: phpwiki/lib/plugin CreateToc.php,1.22,1.23
Update of /cvsroot/phpwiki/phpwiki/lib/plugin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5812/plugin

Modified Files:
        CreateToc.php 
Log Message:
CreateToc disabled for old markup

Index: CreateToc.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/plugin/CreateToc.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -2 -b -p -d -r1.22 -r1.23
--- CreateToc.php       15 Jun 2004 14:56:37 -0000      1.22
+++ CreateToc.php       28 Jun 2004 13:13:58 -0000      1.23
@@ -31,4 +31,5 @@ rcs_id('$Id$');
  * Known problems: 
  * - MacIE will not work with jshide.
+ * - it will crash with old markup!
  * - Certain corner-edges will not work with TOC_FULL_SYNTAX. 
  *   I believe I fixed all of them now, but who knows?
@@ -197,4 +198,8 @@ extends WikiPlugin
         $page = $dbi->getPage($pagename);
         $current = $page->getCurrentRevision();
+        if (!$current->get('markup') or $current->get('markup') < 2) {
+            trigger_error(_("CreateToc disabled for old markup"), 
E_USER_WARNING);
+            return '';
+        }
         $content = $current->getContent();
         $html = HTML::div(array('class' => 'toc','align' => $align));
@@ -269,4 +274,7 @@ function toggletoc(a) {
 
 // $Log$
+// Revision 1.23  2004/06/28 13:13:58  rurban
+// CreateToc disabled for old markup
+//
 // Revision 1.22  2004/06/15 14:56:37  rurban
 // more allow_call_time_pass_reference false fixes



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>