Changeset 13775
- Timestamp:
- 03/10/10 11:19:50 (2 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
modules/boonex/photos/classes/BxPhotosSearch.php (modified) (1 diff)
-
modules/boonex/sounds/classes/BxSoundsSearch.php (modified) (3 diffs)
-
modules/boonex/videos/classes/BxVideosSearch.php (modified) (4 diffs)
-
modules/boonex/wall/classes/BxWallModule.php (modified) (3 diffs)
-
templates/base/scripts/BxBaseSearchResultSharedMedia.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/boonex/photos/classes/BxPhotosSearch.php
r13766 r13775 201 201 function _getImageDbInfo ($iId) { 202 202 $iId = (int)$iId; 203 $sqlQuery = "SELECT `bx_photos_main`.`ID` as `id`, 204 `Ext` as `ext`, 205 `Title` as `title`, 206 `Desc` as `description`, 207 `Uri` as `uri`, 208 `Owner` as `owner`, 209 `Date` as `date`, 210 `Rate` as `rate`, 211 `Hash`, 212 `id_album` as `album_id` 213 FROM `bx_photos_main` 214 LEFT JOIN `sys_albums_objects` ON `sys_albums_objects`.`id_object` = `bx_photos_main`.`ID` 215 WHERE `bx_photos_main`.`ID`='" . $iId . "' AND `Status`<>'disapproved'"; 203 $sqlQuery = "SELECT a.`ID` as `id`, 204 a.`Ext` as `ext`, 205 a.`Title` as `title`, 206 a.`Desc` as `description`, 207 a.`Uri` as `uri`, 208 a.`Owner` as `owner`, 209 a.`Date` as `date`, 210 a.`Rate` as `rate`, 211 a.`Hash`, 212 b.`id_album` as `album_id` 213 FROM `bx_photos_main` as a 214 LEFT JOIN `sys_albums_objects` as b ON b.`id_object` = a.`ID` 215 LEFT JOIN `sys_albums` as c ON c.`ID`=b.`id_album` 216 WHERE a.`ID`='" . $iId . "' AND a.`Status`<>'disapproved' and c.`Type`='bx_photos'"; 216 217 $aImageInfo = ($iId) ? db_arr($sqlQuery) : null; 217 218 return $aImageInfo; -
trunk/modules/boonex/sounds/classes/BxSoundsSearch.php
r13731 r13775 130 130 function serviceGetMusicArray ($iPicId, $sImgType) { 131 131 $iPicId = (int)$iPicId; 132 $sqlQuery = "SELECT `ID` as `id`, 133 `Title` as `title`, 134 `Description` as `description`, 135 `Uri` as `uri`, `Owner` as `owner`, 136 `Date` as `date`, 137 `id_album` as `album_id` 138 FROM `RayMp3Files` 139 LEFT JOIN `sys_albums_objects` ON `sys_albums_objects`.`id_object` = `RayMp3Files`.`ID` 140 WHERE `ID`='$iPicId' AND `Status`='approved'"; 132 $sqlQuery = "SELECT a.`ID` as `id`, 133 a.`Title` as `title`, 134 a.`Description` as `description`, 135 a.`Uri` as `uri`, 136 a.`Owner` as `owner`, 137 a.`Date` as `date`, 138 b.`id_album` as `album_id` 139 FROM `RayMp3Files` as a 140 LEFT JOIN `sys_albums_objects` as b ON b.`id_object` = a.`ID` 141 LEFT JOIN `sys_albums` as c ON c.`ID`=b.`id_album` 142 WHERE a.`ID`='$iPicId' AND a.`Status`='approved' AND c.`Type`='bx_sounds'"; 141 143 $aImageInfo = db_arr($sqlQuery); 142 144 if(empty($aImageInfo) || !is_array($aImageInfo)) … … 222 224 'cpt_music_url' => $aMusic['url'], 223 225 'cpt_music' => $sMusicTxt, 224 'cnt_player' => getApplicationContent('mp3', 'player', array('id' => $aEvent['object_id'], 'user' => $_COOKIE['memberID'], 'password' => $_COOKIE['memberPassword']), true),226 'cnt_player' => $this->_getSharedThumb($aEvent['object_id'], $aMusic['url']), 225 227 'post_id' => $aEvent['id'] 226 228 )) … … 231 233 232 234 function serviceProfileSoundBlock($iProfileId) { 233 $aVars = array ( 235 if(!$this->checkMemAction($iProfileId, 'view')) 236 return ''; 237 $aVars = array ( 234 238 'title' => false, 235 239 'prefix' => 'id' . time() . '_' . rand(1, 999999), -
trunk/modules/boonex/videos/classes/BxVideosSearch.php
r13731 r13775 112 112 function serviceGetVideoArray ($iPicId, $sImgType = 'browse') { 113 113 $iPicId = (int)$iPicId; 114 $sqlQuery = "SELECT `ID` as `id`, 115 `Title` as `title`, 116 `Description` as `description`, 117 `Uri` as `uri`, 118 `Owner` as `owner`, 119 `Date` as `date`, 120 `Video`, 121 `Source`, 122 `id_album` as `album_id` 123 FROM `RayVideoFiles` 124 LEFT JOIN `sys_albums_objects` ON `sys_albums_objects`.`id_object` = `RayVideoFiles`.`ID` 125 WHERE `ID`='$iPicId' AND `Status` != 'disapproved'"; 114 $sqlQuery = "SELECT a.`ID` as `id`, 115 a.`Title` as `title`, 116 a.`Description` as `description`, 117 a.`Uri` as `uri`, 118 a.`Owner` as `owner`, 119 a.`Date` as `date`, 120 b.`id_album` as `album_id` 121 FROM `RayVideoFiles` as a 122 LEFT JOIN `sys_albums_objects` as b ON b.`id_object` = a.`ID` 123 LEFT JOIN `sys_albums` as c ON c.`ID`=b.`id_album` 124 WHERE a.`ID`='$iPicId' AND a.`Status`<>'approved' AND c.`Type`='bx_videos'"; 126 125 $aImageInfo = db_arr($sqlQuery); 127 126 … … 211 210 } 212 211 else { 213 $sVideoTxt = _t('_bx_videos_wall_video');212 $sVideoTxt = _t('_bx_videos_wall_video'); 214 213 $aOut = array( 215 214 'title' => $aOwner['username'] . ' ' . $sAddedNewTxt . ' ' . $sVideoTxt, … … 220 219 'cpt_video_url' => $aVideo['url'], 221 220 'cpt_video' => $sVideoTxt, 222 'cnt_player' => $this-> oTemplate->getFileConcept($aEvent['object_id'], array('ext'=>$aVideo['video'], 'source'=>$aVideo['source'])),221 'cnt_player' => $this->_getSharedThumb($aEvent['object_id'], $aVideo['url']), 223 222 'post_id' => $aEvent['id'] 224 223 )) … … 229 228 230 229 function serviceProfileVideoBlock($iProfileId) { 231 $aVars = array ( 230 if(!$this->checkMemAction($iProfileId, 'view')) 231 return ''; 232 $aVars = array ( 232 233 'title' => false, 233 234 'prefix' => 'id' . time() . '_' . rand(1, 999999), -
trunk/modules/boonex/wall/classes/BxWallModule.php
r13611 r13775 203 203 function actionGetPhotoUploaders($iOwnerId) { 204 204 $this->_iOwnerId = $iOwnerId; 205 return BxDolService::call('photos', 'get_uploader_form', array(array('mode' => 'single', 'category' => 'wall', 'album'=>_t('_wall_photo_album', getNickName( $this->_iOwnerId)), 'from_wall' => 1, 'owner_id' => $this->_iOwnerId)), 'Uploader');206 } 205 return BxDolService::call('photos', 'get_uploader_form', array(array('mode' => 'single', 'category' => 'wall', 'album'=>_t('_wall_photo_album', getNickName(getLoggedId())), 'from_wall' => 1, 'owner_id' => $this->_iOwnerId)), 'Uploader'); 206 } 207 207 /** 208 208 * Get music uploading form. … … 212 212 function actionGetMusicUploaders($iOwnerId) { 213 213 $this->_iOwnerId = $iOwnerId; 214 return BxDolService::call('sounds', 'get_uploader_form', array(array('mode' => 'single', 'category' => 'wall', 'album'=>_t('_wall_sound_album', getNickName( $this->_iOwnerId)), 'from_wall' => 1, 'owner_id' => $this->_iOwnerId)), 'Uploader');214 return BxDolService::call('sounds', 'get_uploader_form', array(array('mode' => 'single', 'category' => 'wall', 'album'=>_t('_wall_sound_album', getNickName(getLoggedId())), 'from_wall' => 1, 'owner_id' => $this->_iOwnerId)), 'Uploader'); 215 215 } 216 216 /** … … 221 221 function actionGetVideoUploaders($iOwnerId) { 222 222 $this->_iOwnerId = $iOwnerId; 223 return BxDolService::call('videos', 'get_uploader_form', array(array('mode' => 'single', 'category' => 'wall', 'album'=>_t('_wall_video_album', getNickName( $this->_iOwnerId)), 'from_wall' => 1, 'owner_id' => $this->_iOwnerId)), 'Uploader');223 return BxDolService::call('videos', 'get_uploader_form', array(array('mode' => 'single', 'category' => 'wall', 'album'=>_t('_wall_video_album', getNickName(getLoggedId())), 'from_wall' => 1, 'owner_id' => $this->_iOwnerId)), 'Uploader'); 224 224 } 225 225 /** -
trunk/templates/base/scripts/BxBaseSearchResultSharedMedia.php
r13727 r13775 611 611 return $aFiles; 612 612 } 613 614 function checkMemAction ($iFileOwner, $sAction = 'view') { 615 $iFileOwner = (int)$iFileOwner; 616 $sAction = clear_xss($sAction); 617 if ($this->oModule->isAdmin($this->oModule->_iProfileId) || $iFileOwner == $this->oModule->_iProfileId) return true; 618 $this->oModule->_defineActions(); 619 $aCheck = checkAction($this->oModule->_iProfileId, $this->oModule->_defineActionName($sAction)); 620 if ($aCheck[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED) 621 return false; 622 return true; 623 } 613 624 } 614 625
Note: See TracChangeset
for help on using the changeset viewer.