Changeset 20531


Ignore:
Timestamp:
02/03/13 16:25:52 (7 years ago)
Author:
mistic100
Message:

bug:2822 editing photo replaces date_creation time to 00:00:00

Location:
trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/picture_modify.php

    r19703 r20531  
    147147      $_POST['date_creation_year'] 
    148148      .'-'.$_POST['date_creation_month'] 
    149       .'-'.$_POST['date_creation_day']; 
     149      .'-'.$_POST['date_creation_day'] 
     150      .' '.$_POST['date_creation_time']; 
    150151  } 
    151152  else 
     
    350351    and 'set' == $_POST['date_creation_action']) 
    351352{ 
    352   foreach (array('day', 'month', 'year') as $varname) 
     353  foreach (array('day', 'month', 'year', 'time') as $varname) 
    353354  { 
    354355    $$varname = $_POST['date_creation_'.$varname]; 
     
    357358else if (isset($row['date_creation']) and !empty($row['date_creation'])) 
    358359{ 
    359   list($year, $month, $day) = explode('-', $row['date_creation']); 
     360  list($year, $month, $day) = explode('-', substr($row['date_creation'],0,10)); 
     361  $time = substr($row['date_creation'],11); 
    360362} 
    361363else 
    362364{ 
    363365  list($year, $month, $day) = array('', 0, 0); 
     366  $time = '00:00:00'; 
    364367} 
    365368 
     
    374377      'DATE_CREATION_MONTH_VALUE' => $month, 
    375378      'DATE_CREATION_YEAR_VALUE' => $year, 
     379      'DATE_CREATION_TIME_VALUE' => $time, 
    376380      'month_list' => $month_list, 
    377381      ) 
  • trunk/admin/themes/default/template/picture_modify.tpl

    r13576 r20531  
    105105      <input id="date_creation_year" name="date_creation_year" type="text" size="4" maxlength="4" value="{$DATE_CREATION_YEAR_VALUE}"> 
    106106      <input id="date_creation_linked_date" name="date_creation_linked_date" type="hidden" size="10" disabled="disabled"> 
    107     <a href="#" id="unset_date_creation" style="display:none">unset</a> 
     107      <input name="date_creation_time" type="hidden" value="{$DATE_CREATION_TIME_VALUE}"> 
     108      <a href="#" id="unset_date_creation" style="display:none">unset</a> 
    108109    </p> 
    109110 
Note: See TracChangeset for help on using the changeset viewer.