Changeset 8756 for trunk


Ignore:
Timestamp:
Jan 18, 2011, 9:57:36 PM (13 years ago)
Author:
rvelices
Message:
  • batch manager was not calling invalidate_user_cache
  • batch manager can delete photos added by ftp
  • call sync_users on admin page less often (too many sql queries)
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin.php

    r8728 r8756  
    7070// |                    synchronize user informations                      |
    7171// +-----------------------------------------------------------------------+
    72 
    73 sync_users();
     72if (mt_rand(0,9)==0)
     73{
     74  sync_users();
     75}
    7476
    7577// +-----------------------------------------------------------------------+
     
    198200        'cat_options',  // ?only POST; public/private; lock/unlock
    199201        'cat_perm',     // ?only POST
    200         'element_set',  // ?only POST; associate/dissociate
    201202        'picture_modify', // ?only POST; associate/dissociate
    202203        'user_list',    // ?only POST; group assoc
     
    206207      )
    207208    )
     209    or ( isset($_POST) and in_array($page['page'],
     210        array(
     211          'batch_manager',  // associate/dissociate; delete; set level
     212        )
     213      )
     214    )
    208215  )
    209216{
  • trunk/admin/batch_manager_global.php

    r8728 r8756  
    413413  $query = '
    414414SELECT
    415     COUNT(*)
     415    id
    416416  FROM '.IMAGES_TABLE.'
    417417  WHERE id IN ('.implode(',', $page['cat_elements_id']).')
    418     AND storage_category_id IS NULL
    419 ;';
    420   list($counter) = pwg_db_fetch_row(pwg_query($query));
    421 
    422   if ($counter > 0)
     418    AND file NOT LIKE \'http%\'
     419  LIMIT 1
     420;';
     421  ;
     422
     423  if ( pwg_db_fetch_row(pwg_query($query)) )
    423424  {
    424425    $template->assign('show_delete_form', true);
Note: See TracChangeset for help on using the changeset viewer.