Changeset 17517


Ignore:
Timestamp:
Aug 9, 2012, 10:45:14 PM (8 years ago)
Author:
mistic100
Message:

clean definition of BATCH_DOWNLOAD_PUBLIC
remove warning on admin when a downloaded category was deleted

Location:
extensions/BatchDownloader
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • extensions/BatchDownloader/admin.php

    r17177 r17517  
    44global $template, $page, $conf;
    55
    6 define('BATCH_DOWNLOAD_PUBLIC',  make_index_url(array('section' => 'download')) . '/');
    76
    87// tabsheet
  • extensions/BatchDownloader/include/BatchDownloader.class.php

    r17177 r17517  
    530530      {
    531531        $category = get_cat_info($this->data['type_id']);
    532         $set['NAME'] = l10n('Album').': '.get_cat_display_name($category['upper_names']);
    533         $set['sNAME'] = l10n('Album').': '.trigger_event('render_category_name', $category['name']);
    534         $set['COMMENT'] = trigger_event('render_category_description', $category['comment']);
     532        if ($category == null)
     533        {
     534          $set['NAME'] = l10n('Album').': #'.$this->data['type_id'].' (deleted)';
     535        }
     536        else
     537        {
     538          $set['NAME'] = l10n('Album').': '.get_cat_display_name($category['upper_names']);
     539          $set['sNAME'] = l10n('Album').': '.trigger_event('render_category_name', $category['name']);
     540          $set['COMMENT'] = trigger_event('render_category_description', $category['comment']);
     541        }
    535542        break;
    536543      }
  • extensions/BatchDownloader/include/events.inc.php

    r17318 r17517  
    1818{
    1919  global $tokens, $page, $conf;
    20  
    21   define('BATCH_DOWNLOAD_PUBLIC', make_index_url(array('section' => 'download')) . '/');
    2220 
    2321  if ($tokens[0] == 'download')
     
    151149  $block = $menu->get_block('mbBatchDownloader');
    152150 
    153   if (!defined('BATCH_DOWNLOAD_PUBLIC')) define('BATCH_DOWNLOAD_PUBLIC', make_index_url(array('section' => 'download')) . '/');
    154  
    155151  if ($block != null)
    156152  {
  • extensions/BatchDownloader/main.inc.php

    r17177 r17517  
    1818define('BATCH_DOWNLOAD_LOCAL',   PHPWG_ROOT_PATH . $conf['data_location'] . 'download_archives/');
    1919define('BATCH_DOWNLOAD_ADMIN',   get_root_url() . 'admin.php?page=plugin-' . basename(dirname(__FILE__)));
     20define('BATCH_DOWNLOAD_PUBLIC',  get_absolute_root_url() . make_index_url(array('section' => 'download')) . '/');
    2021
    2122
  • extensions/BatchDownloader/template/init_zip.tpl

    r17492 r17517  
    5050{/if}
    5151
    52 {if $clear}<div style="clear: both;"></div>{/if}
     52{if $clear}<div style="clear: both;"></div>
     53</div>{/if}
    5354</div>{* <!-- content --> *}
  • extensions/BatchDownloader/template/themes/simple.tpl

    r17492 r17517  
    66<div id="content">
    77{$MENUBAR}
     8<div>
  • extensions/BatchDownloader/template/themes/stripped.tpl

    r17492 r17517  
    88<div id="content" {if !$stripped.hideMenu}class="menuShown"{/if}>
    99{$MENUBAR}
     10<div id="content_cell">
  • extensions/BatchDownloader/template/view.tpl

    r17492 r17517  
    3636{/if}
    3737
    38 {if $clear}<div style="clear: both;"></div>{/if}
     38{if $clear}<div style="clear: both;"></div>
     39</div>{/if}
    3940</div>{* <!-- content --> *}
Note: See TracChangeset for help on using the changeset viewer.