Ignore:
Timestamp:
Jul 27, 2012, 4:44:19 PM (8 years ago)
Author:
mistic100
Message:

rewrite all urls to be compatible with "question_mark_in_urls"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/BatchDownloader/include/download.inc.php

    r16626 r17177  
    2323        pwg_query('DELETE FROM '.BATCH_DOWNLOAD_TSETS.' WHERE id = '.$_GET['set_id'].';');
    2424        $_SESSION['page_infos'][] = l10n('Download set deleted');
    25         redirect('index.php');
     25        redirect(get_root_url());
    2626      }
    2727     
     
    3636      if (isset($next_file))
    3737      {
    38         $set['U_DOWNLOAD'] = BATCH_DOWNLOAD_PATH . 'download.php?set_id='.$_GET['set_id'].'&zip='.$_GET['zip'];
     38        $set['U_DOWNLOAD'] = get_root_url().BATCH_DOWNLOAD_PATH . 'download.php?set_id='.$_GET['set_id'].'&zip='.$_GET['zip'];
    3939        array_push($page['infos'], sprintf(l10n('The archive is downloading, if the download doesn\'t start automatically please <a href="%s">click here</a>'), $set['U_DOWNLOAD']));
    4040      }
     
    4242      if ($BatchDownloader->getParam('status') == 'new' and $BatchDownloader->getParam('nb_images') > 0)
    4343      {
    44         $set['U_EDIT_SET'] = BATCH_DOWNLOAD_PUBLIC . 'view&amp;set_id='.$_GET['set_id'];
     44        $set['U_EDIT_SET'] = add_url_params(BATCH_DOWNLOAD_PUBLIC . 'view', array('set_id'=>$_GET['set_id']));
    4545      }
    4646     
     
    5555      }
    5656     
    57       $set['U_CANCEL'] = BATCH_DOWNLOAD_PUBLIC . 'init_zip&amp;set_id='.$_GET['set_id'].'&amp;cancel';
     57      $set['U_CANCEL'] = add_url_params(BATCH_DOWNLOAD_PUBLIC . 'init_zip', array('set_id'=>$_GET['set_id'], 'cancel'=>'true'));
    5858     
    5959      $template->assign(array(
     
    7373  case 'view':
    7474  {
    75     $self_url = BATCH_DOWNLOAD_PUBLIC . 'view&amp;set_id='.$_GET['set_id'];
     75    $self_url = add_url_params(BATCH_DOWNLOAD_PUBLIC . 'view', array('set_id'=>$_GET['set_id']));
    7676   
    7777    $template->set_filename('index', dirname(__FILE__).'/../template/view.tpl');
     
    7979      'BATCH_DOWNLOAD_PATH' => BATCH_DOWNLOAD_PATH,
    8080      'U_VIEW' => $self_url,
    81       'U_INIT_ZIP' => BATCH_DOWNLOAD_PUBLIC . 'init_zip&amp;set_id='.$_GET['set_id'],
     81      'U_INIT_ZIP' => add_url_params(BATCH_DOWNLOAD_PUBLIC . 'init_zip', array('set_id'=>$_GET['set_id'])),
    8282      'SET_ID' => $_GET['set_id'],
    8383      ));
     
    137137  $replace = $search.'
    138138{strip}<a class="removeSet" href="{$U_VIEW}&amp;remove={$thumbnail.id}" data-id="{$thumbnail.id}" rel="nofollow">
    139 {\'Remove from download set\'|@translate}&nbsp;<img src="{$BATCH_DOWNLOAD_PATH}template/image_delete.png" title="{\'Remove from download set\'|@translate}">
     139{\'Remove from download set\'|@translate}&nbsp;<img src="{$ROOT_URL}{$BATCH_DOWNLOAD_PATH}template/image_delete.png" title="{\'Remove from download set\'|@translate}">
    140140</a>{/strip}';
    141141
Note: See TracChangeset for help on using the changeset viewer.