Ignore:
Timestamp:
May 17, 2014, 2:11:47 PM (10 years ago)
Author:
mistic100
Message:

feature 3077 : use Selectize with AJAX load/cache on picture_modify

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/picture_modify.php

    r27896 r28494  
    4343  WHERE representative_picture_id = '.$_GET['image_id'].'
    4444;';
    45 $represent_options_selected = array_from_query($query, 'id');
     45$represent_options_selected = query2array($query, null, 'id');
    4646
    4747// +-----------------------------------------------------------------------+
     
    128128{
    129129  $data = array();
    130   $data{'id'} = $_GET['image_id'];
    131   $data{'name'} = $_POST['name'];
    132   $data{'author'} = $_POST['author'];
     130  $data['id'] = $_GET['image_id'];
     131  $data['name'] = $_POST['name'];
     132  $data['author'] = $_POST['author'];
    133133  $data['level'] = $_POST['level'];
    134134
    135135  if ($conf['allow_html_descriptions'])
    136136  {
    137     $data{'comment'} = @$_POST['description'];
     137    $data['comment'] = @$_POST['description'];
    138138  }
    139139  else
    140140  {
    141     $data{'comment'} = strip_tags(@$_POST['description']);
     141    $data['comment'] = strip_tags(@$_POST['description']);
    142142  }
    143143
    144144  if (!empty($_POST['date_creation_year']))
    145145  {
    146     $data{'date_creation'} =
     146    $data['date_creation'] =
    147147      $_POST['date_creation_year']
    148148      .'-'.$_POST['date_creation_month']
     
    152152  else
    153153  {
    154     $data{'date_creation'} = null;
     154    $data['date_creation'] = null;
    155155  }
    156156
     
    470470  WHERE image_id = '.$_GET['image_id'].'
    471471;';
    472 $associate_options_selected = array_from_query($query, 'id');
    473 
    474 $query = '
    475 SELECT id,name,uppercats,global_rank
    476   FROM '.CATEGORIES_TABLE.'
    477 ;';
    478 display_select_cat_wrapper($query, $associate_options_selected, 'associate_options');
    479 display_select_cat_wrapper($query, $represent_options_selected, 'represent_options');
     472$associate_options_selected = query2array($query, null, 'id');
     473
     474$template->assign(compact('associate_options_selected', 'represent_options_selected'));
    480475
    481476trigger_action('loc_end_picture_modify');
Note: See TracChangeset for help on using the changeset viewer.