예제 #1
0
파일: clip_dao.php 프로젝트: vazahat/dudex
 /**
  * Returns class instance
  *
  * @return VWVR_BOL_ClipDao
  */
 public static function getInstance()
 {
     if (null === self::$classInstance) {
         self::$classInstance = new self();
     }
     return self::$classInstance;
 }
예제 #2
0
 /**    public function addCodeParam( $code, $name = 'wmode', $value = 'transparent' )
     {
         $repl = $code;
 
         if ( preg_match("/<object/i", $code) )
         {
             $searchPattern = '<param';
             $pos = stripos($code, $searchPattern);
             if ( $pos )
             {
                 $addParam = '<param name="' . $name . '" value="' . $value . '"></param><param';
                 $repl = substr_replace($code, $addParam, $pos, strlen($searchPattern));
             }
         }
 
         if ( preg_match("/<embed/i", isset($repl) ? $repl : $code) )
         {
             $repl = preg_replace("/<embed/i", '<embed ' . $name . '="' . $value . '"', isset($repl) ? $repl : $code);
         }
 
         return $repl;
     }
 */
 public function updateUserClipsPrivacy($userId, $privacy)
 {
     if (!$userId || !mb_strlen($privacy)) {
         return false;
     }
     $clips = $this->clipDao->findByUserId($userId);
     if (!$clips) {
         return true;
     }
     $this->clipDao->updatePrivacyByUserId($userId, $privacy);
     $event = new OW_Event('base.update_entity_items_status', array('entityType' => 'vwvr_comments', 'entityIds' => $clips, 'status' => $privacy == 'everybody'));
     OW::getEventManager()->trigger($event);
     return true;
 }