Ejemplo n.º 1
0
 /**
  * Maybe import some meta data to the database. The functions checks the flag 'saved'
  * and if based on compat reason (pre V0.40) we save then some meta datas to the database
  * 
  * @param int $id
  * @return mixed  result
  */
 function maybe_import_meta($id)
 {
     require_once FLAG_ABSPATH . 'lib/meta.php';
     $meta_obj = new flagMeta($id);
     if ($meta_obj->image->meta_data['saved'] != true) {
         $common = $meta_obj->get_common_meta();
         //this flag will inform us that the import is already one time performed
         $common['saved'] = true;
         $result = flagdb::update_image_meta($id, $common);
     } else {
         return false;
     }
     return $result;
 }