Dotclear

Changeset 1086


Ignore:
Timestamp:
04/27/09 11:12:29 (14 years ago)
Author:
Tomtom33
Message:

notifications 0.4.3 :

  • Fixed bugs to get notifications
Location:
plugins/notifications
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • plugins/notifications/_define.php

    r1073 r1086  
    1717          /* Description */        'Displays few notifications on administration pages', 
    1818          /* Author */             'Tomtom (http://blog.zenstyle.fr/)', 
    19           /* Version */            '0.4.2', 
     19          /* Version */            '0.4.3', 
    2020          /* Permissions */        'usage', 
    2121                                   null, 
  • plugins/notifications/_services.php

    r1073 r1086  
    2727          'WHERE N.notification_dt > ('. 
    2828          'SELECT MAX(L.log_dt) FROM '.$core->prefix.'log L '. 
    29           "WHERE 'Tomtom' = L.user_id AND L.log_table = '".$core->prefix."notifications') ". 
     29          "WHERE '".$core->auth->userID()."' = L.user_id AND L.log_table = '".$core->prefix."notifications') ". 
    3030          "AND N.blog_id = '".$core->blog->id."'"; 
    3131 
  • plugins/notifications/inc/class.notifications.behaviors.php

    r1057 r1086  
    115115 
    116116          if ($config['404'] && $core->url->type == '404') { 
    117                $msg = sprintf(__('New 404 error page displayed about %s'),'<a href="'.$core->blog->url.$_SERVER['REQUEST_URI'].'">'.__('this URL').'</a>'); 
     117               $msg = sprintf(__('New 404 error page displayed about %s'),'<a href="'.$core->blog->url.$_SERVER['QUERY_STRING'].'">'.__('this URL').'</a>'); 
    118118               $core->blog->notifications->add('err',$msg); 
    119119          } 
     
    137137     public static function update(&$core,$ref = '') 
    138138     { 
    139           $strReq = 'SELECT MAX(log_id) as max FROM '.$core->prefix.'log'; 
     139          $strReq = 'SELECT MAX(log_id) as max, log_table FROM '.$core->prefix.'log '. 
     140          "WHERE log_table = '".$core->prefix."notifications'"; 
    140141 
    141142          $id = $core->con->select($strReq)->f(0) + 1; 
     
    143144          $strReq = 
    144145          'SELECT log_id, log_dt FROM '.$core->prefix."log WHERE user_id = '". 
    145           $core->auth->userID()."' GROUP BY log_id"; 
     146          $core->auth->userID()."' AND log_table = '".$core->prefix."notifications' ". 
     147          "GROUP BY log_id"; 
    146148 
    147149          $rs = $core->con->select($strReq); 
     
    163165          } 
    164166          elseif ($rs->log_dt != $ref) { 
    165                $cur->update("WHERE user_id = '".$core->auth->userID()."'"); 
     167               $cur->update("WHERE user_id = '".$core->auth->userID()."' AND log_table = '".$core->prefix."notifications'"); 
    166168          } 
    167169     } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map