コード例 #1
0
 /**
  * Flush cached blocks when blocks are updated
  *
  * @param mixed $dataObject Original version of object
  *
  * @return boolean success flag.
  */
 function update($dataObject = false)
 {
     self::blow('qvitterblocked:' . $this->blocker);
     self::blow('qvitterblocked:' . $this->blocked);
     return parent::update($dataObject);
 }
コード例 #2
0
ファイル: User.php プロジェクト: stevertiqo/StatusNet
 function _deleteBlocks()
 {
     $block = new Profile_block();
     $block->blocker = $this->id;
     $block->delete();
     // XXX delete group block? Reset blocker?
 }
コード例 #3
0
ファイル: Profile.php プロジェクト: microcosmx/experiments
 function hasBlocked($other)
 {
     $block = Profile_block::get($this->id, $other->id);
     if (empty($block)) {
         $result = false;
     } else {
         $result = true;
     }
     return $result;
 }
コード例 #4
0
ファイル: Profile.php プロジェクト: phpsource/gnu-social
 function hasBlocked($other)
 {
     $block = Profile_block::exists($this, $other);
     return !empty($block);
 }
コード例 #5
0
 static function exists(Profile $blocker, Profile $blocked)
 {
     return Profile_block::pkeyGet(array('blocker' => $blocker->id, 'blocked' => $blocked->id));
 }
コード例 #6
0
ファイル: User.php プロジェクト: Br3nda/laconica
 function unblock($other)
 {
     # Get the block record
     $block = Profile_block::get($this->id, $other->id);
     if (!$block) {
         return false;
     }
     $result = $block->delete();
     if (!$result) {
         common_log_db_error($block, 'DELETE', __FILE__);
         return false;
     }
     return true;
 }