Ignore:
Timestamp:
Feb 2, 2011, 9:55:58 PM (10 years ago)
Author:
rvelices
Message:

fix admin modification of coordinates (element_set become batch_manager)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/rv_gmaps/trunk/admin/admin_edit.php

    r8683 r9069  
    77  $_GET['cat'] = 'caddie';
    88$_GET['mode'] = 'map';
    9 include (PHPWG_ROOT_PATH.'admin/element_set.php');
     9include (PHPWG_ROOT_PATH.'admin/batch_manager.php');
    1010
    11 $template->concat('TABSHEET_TITLE', ' '.l10n_dec('%d photo', '%d photos', count($page['cat_elements_id'])).' - '.$page['title']);
     11$template->concat('TABSHEET_TITLE', ' '.l10n_dec('%d photo', '%d photos', count($page['cat_elements_id'])));
    1212
    1313if ( isset($_POST['submit']) )
     
    5656}
    5757
    58 
    59 $template->append(
    60   'specials',
    61   array(
    62                 $admin_url.get_query_string_diff(array('start','cat')).'&cat=caddie' => l10n('Caddie')
    63     ),
    64         true
    65   );
     58$specials_selected = null;
     59foreach( array('caddie'=>'Caddie', 'recent'=>'Recent photos') as $k => $v)
     60{
     61        $link = $admin_url.get_query_string_diff(array('start','cat')).'&cat='.$k;
     62        $template->append(
     63                'specials',
     64                array(
     65                        $link => l10n($v),
     66                        ),
     67                true
     68                );
     69        if ($k == $_GET['cat']) $specials_selected = $link;
     70}
     71$template->assign('specials_selected', $specials_selected);
    6672
    6773$query = '
     
    7480if (!empty($result))
    7581{
    76   while ($row = mysql_fetch_assoc($result))
    77   {
    78     $url = $admin_url.get_query_string_diff(array('start','cat')).'&cat='.$row['id'];
    79     if ( $row['id']==$_GET['cat'] ) $selecteds[] = $url;
    80     $row['id']=$url;
    81     array_push($categories, $row);
    82   }
     82        while ($row = mysql_fetch_assoc($result))
     83        {
     84                $url = $admin_url.get_query_string_diff(array('start','cat')).'&cat='.$row['id'];
     85                if ( $row['id']==$_GET['cat'] ) $selecteds[] = $url;
     86                $row['id']=$url;
     87                array_push($categories, $row);
     88        }
    8389}
    8490usort($categories, 'global_rank_compare');
Note: See TracChangeset for help on using the changeset viewer.