Changeset 27480


Ignore:
Timestamp:
02/24/14 12:37:21 (5 years ago)
Author:
ddtddt
Message:

[extensions] - change_who_added_photo - sectect in user list

Location:
extensions/change_who_added_photo
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/change_who_added_photo/initadmin.php

    r22073 r27480  
    1212function CWAP_loc_end_element_set_global() 
    1313 { 
    14         global $template; 
    15         $template->append('element_set_global_plugins_actions', array( 
     14        global $template; 
     15  $userslist = array();  
     16  $query = ' 
     17SELECT id, username 
     18  FROM '.USERS_TABLE.' 
     19  ORDER BY username ASC 
     20;'; 
     21  $result = pwg_query($query); 
     22  while ($row = pwg_db_fetch_assoc($result)) 
     23  { 
     24    $userslist[$row['username']] = $row['username']; 
     25  } 
     26$template->set_filename('CWAPPP', realpath(CWAP_PATH.'cwap.tpl')); 
     27$template->assign('userslist', $userslist); 
     28$template->append('element_set_global_plugins_actions', array( 
    1629    'ID' => 'CWAP',  
    1730    'NAME' => l10n('Change who added photo'),  
    18     'CONTENT' => ' 
    19                                         <input type="text" name="CWAP"> 
    20                                         <input type="checkbox" name="check_CWAP"> '.l10n('confirm').' 
    21         ', 
     31    'CONTENT' => $template->parse('CWAPPP', true) 
    2232        )); 
    2333 } 
    2434 
     35 
     36  
    2537function CWAP_element_set_global_action($action, $collection) 
    2638 { 
     
    4456$row = pwg_db_fetch_assoc($result); 
    4557$CWAP=$row['id']; 
    46         if ($row['id'] == 0) 
    47                 { 
    48         array_push($page['warnings'], l10n('This user doesn\'t exist')); 
    49                 } 
    50         else 
    51                 { 
    5258$datas = array(); 
    5359    foreach ($collection as $image_id) 
     
    6773      $datas 
    6874      ); 
    69                 } 
    7075    } 
    7176  } 
  • extensions/change_who_added_photo/language/en_UK/plugin.lang.php

    r22073 r27480  
    22$lang['You need to confirm'] = 'You need to confirm'; 
    33$lang['Change who added photo'] = 'Change who added photo'; 
    4 $lang['This user doesn\'t exist'] = 'This user doesn\'t exist'; 
    54?> 
Note: See TracChangeset for help on using the changeset viewer.