$docwatch_item = new docwatch_item($item_id); $docwatch_item->set_status(1); if ($docwatch_item->save()) { $return["state"] = true; $return["item"] = $docwatch_item->get_normalized_item(); } } print encoding_normalize::json_encode($return); break; case "markItemAsUnread": $return = array(); $return["action"] = $action; $return["state"] = false; if ($item_id) { $docwatch_item = new docwatch_item($item_id); $docwatch_item->set_status(0); if ($docwatch_item->save()) { $return["state"] = true; $return["item"] = $docwatch_item->get_normalized_item(); } } print encoding_normalize::json_encode($return); break; case "markItemAsInteresting": $return = array(); $return["action"] = $action; $return["state"] = false; if ($item_id) { $docwatch_item = new docwatch_item($item_id); $docwatch_item->set_interesting(1); if ($docwatch_item->save()) {