wok-current rev 13570

blazekiss: remove wkp_ToDo.php
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Nov 03 16:23:37 2012 +0100 (2012-11-03)
parents 9f2bd6285998
children 83966e88a5da
files blazekiss/receipt blazekiss/stuff/plugins/wkp_ToDo.php
line diff
     1.1 --- a/blazekiss/receipt	Sat Nov 03 16:17:38 2012 +0100
     1.2 +++ b/blazekiss/receipt	Sat Nov 03 16:23:37 2012 +0100
     1.3 @@ -25,6 +25,5 @@
     1.4  	mkdir -p $fs/var/www
     1.5  	cp -a $src $fs/var/www/blazekiss
     1.6  	rm -f $fs/var/www/blazekiss/historique/*/*.bak
     1.7 -	cp -a $stuff/* $fs/var/www/blazekiss/
     1.8  	chown -R www.www $fs/var/www/blazekiss
     1.9  }
     2.1 --- a/blazekiss/stuff/plugins/wkp_ToDo.php	Sat Nov 03 16:17:38 2012 +0100
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,55 +0,0 @@
     2.4 -<?php # coding: utf-8
     2.5 -
     2.6 -/** Indexe les tags {TODO ...} de pages/*.txt
     2.7 - * Accès via : ?action=todo
     2.8 - */
     2.9 -class Todo
    2.10 -{
    2.11 -   public $description = "Indexe les tags {TODO ...} de la base Wiki";
    2.12 -      
    2.13 -   function action($a)
    2.14 -   {
    2.15 -      global $CONTENT,$PAGE_TITLE,$PAGE_TITLE_link,$editable;
    2.16 -      
    2.17 -      switch ($a) {
    2.18 -      case "todo" :
    2.19 -         $PAGE_TITLE_link = FALSE; // pas de lien sur le titre
    2.20 -         $editable = FALSE; // non editable
    2.21 -         $PAGE_TITLE = "To do"; // titre de la page
    2.22 -         $CONTENT = '
    2.23 -<h2>{TODO ...} tags</h2>
    2.24 -';
    2.25 -
    2.26 -todo_index()
    2.27 -{
    2.28 -	grep -l '{TODO' pages/*.txt | while read file; do
    2.29 -		page=$(basename $file .txt)
    2.30 -		ref="<a href=\"?page=$page#TODO\">$page</a>"
    2.31 -		grep '{TODO' $file | sed "s|.*{TODO\\([^}]*\\)}.*|<p>$ref\\1</p>|"
    2.32 -	done
    2.33 -}
    2.34 -
    2.35 -	 if ($handle = @opendir("pages/data")) {
    2.36 -		while(($item = readdir($handle)) !== false) {
    2.37 -			 if ($item == '..' || $item == '.') continue;
    2.38 -		         $CONTENT .= '<tr><td><input type=checkbox ';
    2.39 -		         exec('grep -qs "pages/data/'.$item.'" pages/*.txt', $tmp, $ret);
    2.40 -		         if ($ret == 0) $CONTENT .= 'checked=checked ';
    2.41 -		         $CONTENT .= 'disabled=disabled /><a href="pages/data/'.
    2.42 -		         	$item.'">'.$item.'</a></td></tr>';
    2.43 -		}
    2.44 -	 }
    2.45 -	 return TRUE;
    2.46 -      }
    2.47 -      return FALSE; // action non traitée
    2.48 -      $CONTENT = preg_replace('#\[(.*)|(pages/.*)\]#','<a href="$1">$2</a>',$CONTENT);
    2.49 -   } // action
    2.50 -
    2.51 -   function formatBegin()
    2.52 -   {
    2.53 -      global $CONTENT;
    2.54 -      $CONTENT = preg_replace('#{TODO[^}]*}#','<a name="TODO"></a>',$CONTENT);
    2.55 -   }
    2.56 -}
    2.57 -
    2.58 -?>