// @hook draft-restore fired when a draft is restored redirect("edit.php?id=" . $id . "&upd-draft&upd=edit-success&type=restore"); } if (isset($_GET['new'])) { $newid = $_GET['new']; // @todo traversal protect $newid // restore page by old slug id changeChildParents($newid, $id); // update parents and children $success = restore_page($id); // restore old slug file delete_page($newid); // backup and delete live new slug file $redirect = "edit.php?id=" . $id . "&nodraft&old=" . $_GET['new'] . "&upd=edit-success&type=restore"; } else { $success = restore_page($id); // restore old slug file $redirect = "edit.php?id=" . $id . "&nodraft&upd=edit-success&type=restore"; } generate_sitemap(); // regenerates sitemap exec_action('page-restore'); // @hook page-restore fird when a page is restored if ($redirect) { redirect($redirect); } } $pagetitle = i18n_r('BAK_MANAGEMENT') . ' · ' . i18n_r('VIEWPAGE_TITLE'); get_template('header'); $draftqs = $draft ? '&draft' : ''; ?>
/** * @deprecated 3.4 LEGACY */ function restore_bak($id) { restore_page($id); }