/** * Handle the renaming of galleries for admin_menu_tools.php * * @static * */ function RenamedGallery($old_title, $new_title) { $galleries = special_galleries::GetData(); if (!isset($galleries[$old_title])) { return; } if (gpFiles::ArrayInsert($old_title, $new_title, $galleries[$old_title], $galleries, 0, 1)) { special_galleries::SaveIndex($galleries); } }
function NewDrag() { global $page, $langmessage; $page->ajaxReplace = array(); //get the title of the gallery that was moved $dragging = $_POST['title']; if (!isset($this->galleries[$dragging])) { message($langmessage['OOPS'] . ' (Title not in gallery list)'); return false; } $info = $this->galleries[$dragging]; unset($this->galleries[$dragging]); //set visibility if (isset($_POST['active'])) { $info['visibility'] = 'show'; } else { $info['visibility'] = 'hide'; } //place before the element represented by $_POST['next'] if it's set if (isset($_POST['next'])) { $next = $_POST['next']; if (!isset($this->galleries[$next])) { message($langmessage['OOPS'] . ' (Next not found)'); return false; } if (!gpFiles::ArrayInsert($next, $dragging, $info, $this->galleries)) { message($langmessage['OOPS'] . ' (Insert Failed)'); return false; } //place at the end } else { $this->galleries[$dragging] = $info; } //save it if (!special_galleries::SaveIndex($this->galleries)) { message($langmessage['OOPS'] . ' (Not Saved)'); return false; } }