Changeset 27480 for extensions
- Timestamp:
- Feb 24, 2014, 12:37:21 PM (11 years ago)
- Location:
- extensions/change_who_added_photo
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/change_who_added_photo/initadmin.php
r22073 r27480 12 12 function CWAP_loc_end_element_set_global() 13 13 { 14 global $template; 15 $template->append('element_set_global_plugins_actions', array( 14 global $template; 15 $userslist = array(); 16 $query = ' 17 SELECT 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( 16 29 'ID' => 'CWAP', 17 30 '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) 22 32 )); 23 33 } 24 34 35 36 25 37 function CWAP_element_set_global_action($action, $collection) 26 38 { … … 44 56 $row = pwg_db_fetch_assoc($result); 45 57 $CWAP=$row['id']; 46 if ($row['id'] == 0)47 {48 array_push($page['warnings'], l10n('This user doesn\'t exist'));49 }50 else51 {52 58 $datas = array(); 53 59 foreach ($collection as $image_id) … … 67 73 $datas 68 74 ); 69 }70 75 } 71 76 } -
extensions/change_who_added_photo/language/en_UK/plugin.lang.php
r22073 r27480 2 2 $lang['You need to confirm'] = 'You need to confirm'; 3 3 $lang['Change who added photo'] = 'Change who added photo'; 4 $lang['This user doesn\'t exist'] = 'This user doesn\'t exist';5 4 ?>
Note: See TracChangeset
for help on using the changeset viewer.