Dotclear


Ignore:
Timestamp:
11/25/12 15:24:29 (13 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Children:
1036:4374df1baa97, 1041:ffd8fd14003c
Message:

Add user id completion in posts actions. Fixes #1022. The user's list is limited to the 100 biggest contributors (in nb of posts), but this should be enhanced with some Ajax if possible.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/posts_actions.php

    r1030 r1035  
    163163/* DISPLAY 
    164164-------------------------------------------------------- */ 
     165// Get current users list 
     166$usersList = ''; 
     167if ($action == 'author' && $core->auth->check('admin',$core->blog->id)) { 
     168     $params = array( 
     169          'limit' => 100, 
     170          'order' => 'nb_post DESC' 
     171          ); 
     172     $rs = $core->getUsers($params); 
     173     while ($rs->fetch()) 
     174     { 
     175          $usersList .= ($usersList != '' ? ',' : '').'"'.$rs->user_id.'"'; 
     176     } 
     177} 
    165178dcPage::open( 
    166179     __('Entries'), 
     180     '<script type="text/javascript">'."\n". 
     181     "//<![CDATA[\n". 
     182     'usersList = ['.$usersList.']'."\n". 
     183     "\n//]]>\n". 
     184     "</script>\n". 
     185     dcPage::jsLoad('js/jquery/jquery.autocomplete.js'). 
     186     dcPage::jsLoad('js/_posts_actions.js'). 
    167187     dcPage::jsMetaEditor(). 
    168188     # --BEHAVIOR-- adminBeforePostDelete 
Note: See TracChangeset for help on using the changeset viewer.

Sites map