Changeset 1653

Show
Ignore:
Timestamp:
05/26/2007 04:08:45 AM (20 months ago)
Author:
robertb
Message:

Bugfixes

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/plugins/CommentCloser.jplug.php

    r1652 r1653  
    33 * @name:        CommentCloser <jeenaparadies.net/projects/jlog/> 
    44 * @author:      Robert Bienert <robertbienert@gmx.net> 
    5  * @version:     1.0 
    6  * @date:        2007-05-25 
     5 * @version:     1.0.1 
     6 * @date:        2007-05-26 
    77 * 
    88 * Dieses Plugin schliesst nach einer bestimmten, festzulegenden 
     
    5050                                        "LIFETIME', $lifeTime);\n"); 
    5151                                @fwrite($f, 'define(\'COMMENT_CLOSER_'. 
    52                                         "TIMEUNIT', $timeUnit);\n"); 
     52                                        "TIMEUNIT', '$timeUnit');\n"); 
    5353                                @fwrite($f, '?>'); 
    5454                                @fclose($f); 
     
    5858                } 
    5959 
     60                # TODO Zeiteinheit selektieren 
    6061                return <<<EOT 
    6162<form action="$self" method="post"> 
     
    8788                } 
    8889 
    89                 $q = new Query('UPDATE kolumne_content SET comments=0 ' . 
     90                $q = new Query('UPDATE ' . JLOG_DB_PREFIX . 
     91                                'content SET comments=0 ' . 
    9092                        'WHERE date < DATE_SUB(NOW(), INTERVAL ' . 
    91                                 COMMENT_CLOSER_LIFETIME . 
     93                                COMMENT_CLOSER_LIFETIME . ' ' . 
    9294                                COMMENT_CLOSER_TIMEUNIT . 
    9395                        ') AND comments=1');