cc-4105: added some comments to describe development
This commit is contained in:
parent
93276f64fc
commit
e0ba52644f
|
@ -443,6 +443,7 @@ class ApiController extends Zend_Controller_Action
|
|||
$this->view->watched_dirs = $watchedDirsPath;
|
||||
}
|
||||
|
||||
// TODO : Remove this dry run bs after finishing testing
|
||||
public function dispatchMetadataAction($md, $mode, $dry_run=false)
|
||||
{
|
||||
// Replace this compound result in a hash with proper error handling later on
|
||||
|
@ -536,17 +537,17 @@ class ApiController extends Zend_Controller_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
|
||||
// to some unique id.
|
||||
Logging::log("Entering controller, mang");
|
||||
$responses = array();
|
||||
foreach ($request->getParams() as $k => $raw_json) {
|
||||
$info_json = json_decode($raw_json, $assoc=true);
|
||||
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 );
|
||||
continue;
|
||||
}
|
||||
$mode = $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);
|
||||
array_push($responses, $response);
|
||||
// Like wise, remove the following line when done
|
||||
|
|
Loading…
Reference in New Issue