Changeset 29729


Ignore:
Timestamp:
09/22/14 11:29:00 (5 years ago)
Author:
plg
Message:

feature 3083: return the upload_file_types in pwg.session.getStatus (list of file extension, comma separated)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/ws_functions/pwg.php

    r27371 r29729  
    315315function ws_session_getStatus($params, &$service) 
    316316{ 
    317   global $user; 
     317  global $user, $conf; 
    318318 
    319319  $res['username'] = is_a_guest() ? 'guest' : stripslashes($user['username']); 
     
    328328  $res['current_datetime'] = $dbnow; 
    329329  $res['version'] = PHPWG_VERSION; 
     330 
     331  if (is_admin()) 
     332  { 
     333    $res['upload_file_types'] = implode( 
     334      ',', 
     335      array_unique( 
     336        array_map( 
     337          'strtolower', 
     338          $conf['upload_form_all_types'] ? $conf['file_ext'] : $conf['picture_ext'] 
     339          ) 
     340        ) 
     341      ); 
     342  } 
     343   
    330344  return $res; 
    331345} 
Note: See TracChangeset for help on using the changeset viewer.