Commit 5d4e7a12 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Change get_... to param_...

parent fd1df431
......@@ -28,7 +28,8 @@ define('INTERNAL', 1);
define('ADMIN', 1);
require(dirname(dirname(__FILE__)) . '/init.php');
$itemid = clean_requestdata('itemid', PARAM_INT, REQUEST_EITHER);
//$itemid = clean_requestdata('itemid', PARAM_INT, REQUEST_EITHER);
$itemid = param_variable('itemid');
$result = array();
try {
......
......@@ -28,8 +28,8 @@ define('INTERNAL', 1);
define('ADMIN', 1);
require(dirname(dirname(__FILE__)) . '/init.php');
$menu = get_variable('menu');
$public = $menu == 'public' ? 1 : 0;
$menu = param_variable('menu');
$public = (int)($menu == 'public');
$result = array();
......
......@@ -38,11 +38,11 @@ function send_fail_message() {
exit;
}
$type = get_variable('type');
$name = get_variable('name');
$linkedto = get_variable('linkedto');
$itemid = get_variable('itemid');
$menu = get_variable('menu');
$type = param_alpha('type'); // external list or admin file
$name = param_variable('name');
$linkedto = param_variable('linkedto');
$itemid = param_variable('itemid');
$menu = param_alpha('menu');
error_log('updatemenu.json.php '.$type .' '. $name .' '. $linkedto .' '. $itemid);
......@@ -60,7 +60,7 @@ else { // Bad menu item type
$data->title = $name;
if ($itemid == 'new') {
$data->public = $menu == 'public' ? 1 : 0;
$data->public = (int) ($menu == 'public');
// set displayorder to be after all the existing menu items
try {
$displayorders = get_rows('site_menu', 'public', $data->public, '', 'displayorder');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment