cc-4105: added some comments to describe development
This commit is contained in:
parent
b0f5b722db
commit
01448d42df
|
@ -447,6 +447,7 @@ class ApiController extends Zend_Controller_Action
|
||||||
$this->view->watched_dirs = $watchedDirsPath;
|
$this->view->watched_dirs = $watchedDirsPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO : Remove this dry run bs after finishing testing
|
||||||
public function dispatchMetadataAction($md, $mode, $dry_run=false)
|
public function dispatchMetadataAction($md, $mode, $dry_run=false)
|
||||||
{
|
{
|
||||||
// Replace this compound result in a hash with proper error handling later on
|
// Replace this compound result in a hash with proper error handling later on
|
||||||
|
@ -540,17 +541,17 @@ class ApiController extends Zend_Controller_Action
|
||||||
// The value is a json encoded hash that has all the information related to this action
|
// The value is a json encoded hash that has all the information related to this action
|
||||||
// The key does not have any meaning as of yet but it could potentially correspond
|
// The key does not have any meaning as of yet but it could potentially correspond
|
||||||
// to some unique id.
|
// to some unique id.
|
||||||
Logging::log("Entering controller, mang");
|
|
||||||
$responses = array();
|
$responses = array();
|
||||||
foreach ($request->getParams() as $k => $raw_json) {
|
foreach ($request->getParams() as $k => $raw_json) {
|
||||||
$info_json = json_decode($raw_json, $assoc=true);
|
$info_json = json_decode($raw_json, $assoc=true);
|
||||||
if( !array_key_exists('mode', $info_json) ) {
|
if( !array_key_exists('mode', $info_json) ) {
|
||||||
Logging::log("Received bad request, no 'mode' parameter");
|
Logging::log("Received bad request, no 'mode' parameter. Bad request is:");
|
||||||
Logging::log( $info_json );
|
Logging::log( $info_json );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$mode = $info_json['mode'];
|
$mode = $info_json['mode'];
|
||||||
unset( $info_json['mode'] );
|
unset( $info_json['mode'] );
|
||||||
|
// TODO : remove the $dry_run parameter after finished testing
|
||||||
$response = $this->dispatchMetadataAction($info_json, $info_json['mode'], $dry_run=true);
|
$response = $this->dispatchMetadataAction($info_json, $info_json['mode'], $dry_run=true);
|
||||||
array_push($responses, $response);
|
array_push($responses, $response);
|
||||||
// Like wise, remove the following line when done
|
// Like wise, remove the following line when done
|
||||||
|
|
Loading…
Reference in New Issue