Changeset 0afcc39404e521682a7c5c31d3e230faf192814e

Show
Ignore:
Timestamp:
11/01/11 12:42:50 (7 months ago)
Author:
Xemle <xemle@phtagr.org>
Children:
d707bdc85b777800764971ac7ca09e9f54571598
Parents:
e7234c1259e67fbdaae43224343ef0f925519124
git-committer:
Xemle <xemle@phtagr.org> / 2011-11-01T12:42:50Z+0100
Message:

Fix edit of location

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • models/location.php

    r3ee918f r0afcc39  
    8383  function editMetaSingle(&$media, &$data) { 
    8484    $ids = array(); 
     85    $changed = false; 
    8586    foreach ($this->types as $type => $locationName) { 
    8687      if ($type == LOCATION_ANY || !isset($data['Location'][$locationName])) { 
    8788        continue; 
    8889      } 
     90      $changed = true; 
    8991      $name = trim($data['Location'][$locationName]); 
    9092      if (!$name || $name == '-') { 
     
    104106      } 
    105107    } 
     108    if (!$changed) { 
     109      return false; 
     110    } 
    106111    $ids = array_unique($ids); 
    107112    $oldIds = Set::extract('/Location/id', $media);