You are here

function photos_edit_update in Album Photos 6.2

Same name and namespace in other branches
  1. 7.3 inc/photos.edit.inc \photos_edit_update()
1 string reference to 'photos_edit_update'
photos_menu in ./photos.module

File

inc/photos.edit.inc, line 381

Code

function photos_edit_update($fid) {
  drupal_set_header('Content-Type: text/plain;');
  if ($value = trim($_POST['value'])) {
    switch (arg(4)) {
      case 'filename':
        db_query("UPDATE {files} SET filename = '%s' WHERE fid = %d", $value, $fid);
        echo $value;
        break;
      case 'des':
        db_query("UPDATE {x_image} SET des = '%s' WHERE fid = %d", $value, $fid);
        echo check_markup($value, 0, FALSE);
        break;
      case 'del':
        echo photos_file_del($fid, 0, 1);
    }
  }
}