Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
denise 2012-08-24 12:40:39 -04:00
commit 54db68bb26
16 changed files with 1083 additions and 247 deletions

View file

@ -463,17 +463,10 @@ class ApiController extends Zend_Controller_Action
$this->view->watched_dirs = $watchedDirsPath;
}
public function dispatchMetadata($md, $mode, $dry_run=false)
public function dispatchMetadata($md, $mode)
{
// Replace this compound result in a hash with proper error handling later on
$return_hash = array();
if ( $dry_run ) { // for debugging we return garbage not to screw around with the db
return array(
'md' => $md,
'mode' => $mode,
'fileid' => 123456
);
}
Application_Model_Preference::SetImportTimestamp();
Logging::info("--->Mode: $mode || file: {$md['MDATA_KEY_FILEPATH']} ");
Logging::info( $md );
@ -586,8 +579,7 @@ class ApiController extends Zend_Controller_Action
// Removing 'mode' key from $info_json might not be necessary...
$mode = $info_json['mode'];
unset( $info_json['mode'] );
$response = $this->dispatchMetadata($info_json, $mode,
$dry_run=$dry);
$response = $this->dispatchMetadata($info_json, $mode);
// We tack on the 'key' back to every request in case the would like to associate
// his requests with particular responses
$response['key'] = $k;

View file

@ -70,8 +70,8 @@ class UserController extends Zend_Controller_Action
public function getHostsAction()
{
$search = $this->_getParam('term');
$res = Application_Model_User::getHosts($search);
$search = $this->_getParam('term');
$res = Application_Model_User::getHosts($search);
$this->view->hosts = Application_Model_User::getHosts($search);
}