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

This commit is contained in:
Martin Konecny 2012-09-05 15:59:15 -04:00
commit 86a5caeb4c
2 changed files with 5 additions and 3 deletions

View File

@ -120,6 +120,8 @@ class ApiController extends Zend_Controller_Action
if ($media != null) {
$filepath = $media->getFilePath();
// Make sure we don't have some wrong result beecause of caching
clearstatcache();
if (is_file($filepath)) {
$full_path = $media->getPropelOrm()->getDbFilepath();
@ -468,8 +470,8 @@ class ApiController extends Zend_Controller_Action
// Replace this compound result in a hash with proper error handling later on
$return_hash = array();
Application_Model_Preference::SetImportTimestamp();
Logging::info("--->Mode: $mode || file: {$md['MDATA_KEY_FILEPATH']} ");
Logging::info( $md );
//Logging::info("--->Mode: $mode || file: {$md['MDATA_KEY_FILEPATH']} ");
//Logging::info( $md );
if ($mode == "create") {
$filepath = $md['MDATA_KEY_FILEPATH'];
$filepath = Application_Common_OsPath::normpath($filepath);

View File

@ -496,7 +496,7 @@ def toposort(data):
for k, v in data.items():
v.discard(k) # Ignore self dependencies
extra_items_in_deps = reduce(set.union, data.values()) - set(data.keys())
data.update({item:set() for item in extra_items_in_deps})
data.update(dict((item,set()) for item in extra_items_in_deps))
while True:
ordered = set(item for item,dep in data.items() if not dep)
if not ordered: break