src/libraries/controllers/ApiPhotoController.php
/**
    * Delete a photo specified by the ID.
    *
    * @param string $id ID of the photo to be deleted.
    * @return string Standard JSON envelope
    */
Delete a photo specified by the ID.
@param string $id ID of the photo to be deleted.
@return string Standard JSON envelope
Delete a photo specified by the ID . @param string $id ID of the photo to be deleted . @return string Standard JSON envelope
public function delete($id)
  {
    getAuthentication()->requireAuthentication();
    getAuthentication()->requireCrumb();
    $status = $this->photo->delete($id);
    if($status)
    {
      $res = $this->api->invoke("/{$this->apiVersion}/photo/{$id}/view.json");
      $this->tag->updateTagCounts($res['result']['tags'], array(), 1, 1);
      return $this->noContent('Photo deleted successfully', true);
    }
    else
    {
      return $this->error('Photo deletion failure', false);
    }
  }
public function delete ( $ id ) { getAuthentication ( ) -> requireAuthentication ( ) ; getAuthentication ( ) -> requireCrumb ( ) ; $ status = $ this -> photo -> delete ( $ id ) ; if ( $ status ) { $ res = $ this -> api -> invoke ( " / { $ this -> apiVersion } /photo/ { $ id } /view.json " ) ; $ this -> tag -> updateTagCounts ( $ res [ 'result' ] [ 'tags' ] , array ( ) , 1 , 1 ) ; return $ this -> noContent ( 'Photo deleted successfully' , true ) ; } else { return $ this -> error ( 'Photo deletion failure' , false ) ; } }
Delete a photo specified by the ID.
Delete a photo specified by the ID .