コード例 #1
0
ファイル: delete.php プロジェクト: dmitriz/Platform
function Broadcast_control_response_delete($params)
{
    $user = Users::loggedInUser(true);
    $agreement = new Broadcast_Agreement();
    $agreement->userId = $user->id;
    $agreement->publisherId = $_REQUEST['publisherId'];
    $agreement->streamName = 'Broadcast/main';
    $agreement->platform = 'facebook';
    $agreement->remove();
    return array('success' => 'true');
}
コード例 #2
0
ファイル: delete.php プロジェクト: dmitriz/Platform
function Broadcast_agreement_delete()
{
    $user = Users::loggedInUser(true);
    foreach (array('publisherId', 'streamName') as $field) {
        if (empty($_REQUEST[$field])) {
            throw new Q_Exception_RequiredField(compact('field'));
        }
    }
    $streamName = is_array($_REQUEST['streamName']) ? implode('/', $_REQUEST['streamName']) : $_REQUEST['streamName'];
    $agreement = new Broadcast_Agreement();
    $agreement->userId = $user->id;
    $agreement->publisherId = $_REQUEST['publisherId'];
    $agreement->streamName = $streamName;
    $agreement->platform = 'facebook';
    $agreement->remove();
    Broadcast::$cache['agreement'] = false;
}