equal
deleted
inserted
replaced
185 case "savepage_json": |
185 case "savepage_json": |
186 header('Content-type: application/json'); |
186 header('Content-type: application/json'); |
187 if ( !isset($_POST['r']) ) |
187 if ( !isset($_POST['r']) ) |
188 die('Invalid request'); |
188 die('Invalid request'); |
189 |
189 |
190 $request = enano_json_decode($_POST['r']); |
190 try |
191 if ( !isset($request['src']) || !isset($request['summary']) || !isset($request['minor_edit']) || !isset($request['time']) || !isset($request['draft']) ) |
191 { |
192 die('Invalid request'); |
192 $request = enano_json_decode($_POST['r']); |
|
193 if ( !isset($request['src']) || !isset($request['summary']) || !isset($request['minor_edit']) || !isset($request['time']) || !isset($request['draft']) ) |
|
194 die('Invalid request'); |
|
195 } |
|
196 catch(Zend_Json_Exception $e) |
|
197 { |
|
198 die("JSON parsing failed. View as HTML to see full report.\n<br /><br />\n<pre>" . htmlspecialchars(strval($e)) . "</pre><br />Request: <pre>" . htmlspecialchars($_POST['r']) . "</pre>"); |
|
199 } |
193 |
200 |
194 $time = intval($request['time']); |
201 $time = intval($request['time']); |
195 |
202 |
196 if ( $request['draft'] ) |
203 if ( $request['draft'] ) |
197 { |
204 { |