From 8fabf77b2a7720a357c63817c07035a9908818a0 Mon Sep 17 00:00:00 2001 From: Gitea Date: Wed, 10 Nov 2021 17:53:50 +0100 Subject: Update --- Neutron-trunk/api/admin/rename_page.php | 75 --------------------------------- 1 file changed, 75 deletions(-) delete mode 100644 Neutron-trunk/api/admin/rename_page.php (limited to 'Neutron-trunk/api/admin/rename_page.php') diff --git a/Neutron-trunk/api/admin/rename_page.php b/Neutron-trunk/api/admin/rename_page.php deleted file mode 100644 index b7f023c..0000000 --- a/Neutron-trunk/api/admin/rename_page.php +++ /dev/null @@ -1,75 +0,0 @@ - -', '>', $newname); - $newname = str_replace('<', '<', $newname); - if (trim($newname) == "") { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit($lang["api"]["pgnameempty"]); - } - $newslug = preg_replace("/[^0-9a-zA-Z ]/m", "", $newname ); - $newslug = str_replace(" ", "-", $newslug); - $newslug = strtolower($newslug); - if ($newslug == "api" || $newslug == "cms-special" || $newslug == "galery" || $newslug == "vendor" || $newslug == "cms-unrelated" || $newslug == "data" || $newslug == "resources" || $newslug == "widgets" || $newslug == "-htaccess" || $newslug == "index" || $newslug == "index-php") { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit($lang["api"]["pgnameinternal"]); - } - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pages/" . $newslug)) { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit($lang["api"]["pgnameexists"]); - } - if (strlen($newslug) > 70) { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit($lang["api"]["pgnamelong"]); - } - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pages/" . $newslug, file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pages/" . $oldslug)); - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pagetypes/" . $newslug, file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pagetypes/" . $oldslug)); - mkdir($_SERVER['DOCUMENT_ROOT'] . "/" . $newslug); - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/" . $newslug . "/index.php", ''); - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/" . $newslug . "/pagename", $newname); - unlink($_SERVER['DOCUMENT_ROOT'] . "/" . $oldslug . "/index.php"); - unlink($_SERVER['DOCUMENT_ROOT'] . "/" . $oldslug . "/pagename"); - rmdir($_SERVER['DOCUMENT_ROOT'] . "/" . $oldslug); - unlink($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pages/" . $oldslug); - unlink($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/pagetypes/" . $oldslug); - require_once $_SERVER['DOCUMENT_ROOT'] . "/api/admin/cache_pages_update.php"; - require $_SERVER['DOCUMENT_ROOT'] . "/api/admin/cache_content_reset.php"; - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("ok"); - } else { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit($lang["api"]["pgnamenone"]); - } - } else { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit($lang["api"]["pgnotfound"]); - } -} else { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit($lang["api"]["pgnone"]); -} \ No newline at end of file -- cgit