Commit 3c4d2e5d authored by Penny Leach's avatar Penny Leach Committed by Nigel McNie
Browse files

fixing small bugs in viewrework.json.php

parent 0656fbac
......@@ -29,6 +29,7 @@ define('JSON', 1);
define('PUBLIC', 1);
require(dirname(__FILE__) . '/init.php');
require(dirname(__FILE__) . '/viewlib.php');
require('view.php');
$view = param_integer('view');
$view = new View($view);
......@@ -66,7 +67,7 @@ case 'blocktype_list':
break;
case 'add_column':
$column = param_integer('column');
if (view_add_column($view->id, $column)) {
if (view_add_column($view->get('id'), $column)) {
json_reply(false, array('message' => false, 'data' => view_build_column($view, $column, true)));
}
else {
......@@ -74,7 +75,7 @@ case 'add_column':
}
case 'remove_column':
$column = param_integer('column');
if (view_remove_column($view->id, $column)) {
if (view_remove_column($view->get('id'), $column)) {
// Just do it - no message
json_reply(false, false);
}
......
Markdown is supported
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