refactored addWatchedDir to use early return style
This commit is contained in:
parent
5d3aa68c72
commit
9c4f2e3298
1 changed files with 31 additions and 32 deletions
|
@ -246,7 +246,7 @@ SQL;
|
||||||
{
|
{
|
||||||
$res = self::addDir($p_path, "watched", $userAddedWatchedDir, $nestedWatch);
|
$res = self::addDir($p_path, "watched", $userAddedWatchedDir, $nestedWatch);
|
||||||
|
|
||||||
if ($res['code'] == 0) {
|
if ($res['code'] != 0) { return $res; }
|
||||||
|
|
||||||
//convert "linked" files (Airtime <= 1.8.2) to watched files.
|
//convert "linked" files (Airtime <= 1.8.2) to watched files.
|
||||||
$propel_link_dir = CcMusicDirsQuery::create()
|
$propel_link_dir = CcMusicDirsQuery::create()
|
||||||
|
@ -288,7 +288,6 @@ SQL;
|
||||||
$data = array();
|
$data = array();
|
||||||
$data["directory"] = $p_path;
|
$data["directory"] = $p_path;
|
||||||
Application_Model_RabbitMq::SendMessageToMediaMonitor("new_watch", $data);
|
Application_Model_RabbitMq::SendMessageToMediaMonitor("new_watch", $data);
|
||||||
}
|
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue