Ignore:
Timestamp:
Jul 10, 2012, 3:39:01 PM (12 years ago)
Author:
mistic100
Message:

-compatiblity with UserCollections
-don't crash for non-admin users (sic)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/BatchDownloader/include/BatchDownloader.class.php

    r16400 r16592  
    3939      $query = '
    4040SELECT
     41    user_id,
    4142    date_creation,
    4243    type,
     
    5859        $this->data['set_id'] = $set_id;
    5960        list(
     61          $this->data['user_id'],
    6062          $this->data['date_creation'],
    6163          $this->data['type'],
     
    6870          ) = pwg_db_fetch_row($result);
    6971       
    70         // make sur all pictures of the set exists
     72        // make sur all pictures of the set exist
    7173        $query = '
    7274DELETE FROM '.BATCH_DOWNLOAD_TIMAGES.'
     
    606608      }
    607609     
    608       // selection
    609       // case 'selection':
    610       // {
    611         // $set['NAME'] = '';
    612         // $set['COMMENT'] = '';
    613         // break;
    614       // }
     610      // collection
     611      case 'collection':
     612      {
     613        try
     614        {
     615          $UserCollection = new UserCollection($this->data['type_id']);
     616          $set['NAME'] = l10n('Collection').': <a href="'.USER_COLLEC_PUBLIC.'view/'.$UserCollection->getParam('col_id').'">'.$UserCollection->getParam('name').'</a>';
     617        }
     618        catch (Exception $e)
     619        {
     620          $set['NAME'] = l10n('Collection').': #'.$this->data['type_id'].' (deleted)';
     621        }
     622        break;
     623      }
    615624    }
    616625   
Note: See TracChangeset for help on using the changeset viewer.