Changeset 8130


Ignore:
Timestamp:
Dec 19, 2008, 12:10:37 PM (16 years ago)
Author:
aramis
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/inc/classes/BxDolDefPhotoUploader.php

    r8129 r8130  
    793793    function _shareVideoInformation() { 
    794794        global $oSysTemplate; 
     795 
    795796        $iAuthorId = $this->_oUploader->_getAuthorId(); 
    796797        $iVideoID = (int)$_REQUEST['VideoID']; 
    797798        if ($iVideoID && $iAuthorId) { 
    798799            $sTitle = process_db_input($_REQUEST['title'], 1); 
    799             $sCategory = process_db_input($_REQUEST['category'], 1); 
     800            //$sCategory = process_db_input($_REQUEST['category'], 1); 
    800801            $sTags = process_db_input($_REQUEST['tags'], 1); 
    801802            $sDescription = htmlspecialchars(addslashes($_REQUEST['description'])); 
    802803 
    803             if (initFile($iVideoID, $sTitle, $sCategory, $sTags, $sDescription)) { 
     804            $aCategories = array(); 
     805            foreach ($_REQUEST['category'] as $sKey => $iVal) { 
     806                if ((int)$iVal > 0) { 
     807                    $aCategories[] = (int)$iVal; 
     808                } 
     809            } 
     810            $sCategories = implode(' ', $aCategories); 
     811 
     812            if (initFile($iVideoID, $sTitle, $sCategories, $sTags, $sDescription)) { 
    804813                //--- SharedVideo -> Upload unit for Alerts Engine ---// 
    805814                require_once(BX_DIRECTORY_PATH_CLASSES . 'BxDolAlerts.php'); 
     
    814823    function _shareMusicInformation() { 
    815824        global $oSysTemplate; 
     825 
    816826        $iAuthorId = $this->_oUploader->_getAuthorId(); 
    817827        $iMusicID = (int)$_REQUEST['MusicID']; 
    818828        if ($iMusicID && $iAuthorId) { 
    819829            $sTitle = process_db_input($_REQUEST['title'], 1); 
    820             $sCategory = process_db_input($_REQUEST['category'], 1); 
     830            //$sCategory = process_db_input($_REQUEST['category'], 1); 
    821831            $sTags = process_db_input($_REQUEST['tags'], 1); 
    822832            $sDescription = htmlspecialchars(addslashes($_REQUEST['description'])); 
    823833 
    824             if (initFile($iMusicID, $sTitle, $sCategory, $sTags, $sDescription)) { 
     834            $aCategories = array(); 
     835            foreach ($_REQUEST['category'] as $sKey => $iVal) { 
     836                if ((int)$iVal > 0) { 
     837                    $aCategories[] = (int)$iVal; 
     838                } 
     839            } 
     840            $sCategories = implode(' ', $aCategories); 
     841 
     842            if (initFile($iMusicID, $sTitle, $sCategories, $sTags, $sDescription)) { 
    825843                //--- SharedMusic -> Upload unit for Alerts Engine ---// 
    826844                require_once(BX_DIRECTORY_PATH_CLASSES . 'BxDolAlerts.php'); 
     
    892910        if ($iPhotoID && $iAuthorId) { 
    893911            $sTitle = process_db_input($_REQUEST['title'], 1); 
     912            //$sCategory = process_db_input($_REQUEST['category'], 1); 
     913            $sTags = process_db_input($_REQUEST['tags'], 1); 
     914            $sDescription = htmlspecialchars(addslashes($_REQUEST['description'])); 
    894915 
    895916            $aCategories = array(); 
     
    899920                } 
    900921            } 
    901  
    902             //$sCategory = process_db_input($_REQUEST['category'], 1); 
    903             $sTags = process_db_input($_REQUEST['tags'], 1); 
    904             $sDescription = htmlspecialchars(addslashes($_REQUEST['description'])); 
    905  
    906             if ($this->initPhotoFile($iPhotoID, $sTitle, $aCategories, $sTags, $sDescription)) { 
     922            $sCategories = implode(' ', $aCategories); 
     923 
     924            if ($this->initPhotoFile($iPhotoID, $sTitle, $sCategories, $sTags, $sDescription)) { 
    907925                //--- SharedPhoto -> Upload unit for Alerts Engine ---// 
    908926                require_once(BX_DIRECTORY_PATH_CLASSES . 'BxDolAlerts.php'); 
     
    915933    } 
    916934 
    917     function initPhotoFile($iPhotoID, $sTitle, $aCategories, $sTags, $sDesc) { 
     935    function initPhotoFile($iPhotoID, $sTitle, $sCategories, $sTags, $sDesc) { 
    918936        $sMedUri = uriGenerate($sTitle, 'sharePhotoFiles', 'medUri'); 
    919937        $sUriPart = empty($sMedUri) ? "" : "`medUri`='" . $sMedUri . "', "; 
    920938 
    921         $sCategory = implode(' ', $aCategories); 
    922939        $sStatus = getParam('autoApproval_Photo') == 'on' ? 'approved' : 'pending'; 
    923940 
    924941        $sUpdateSQL = " 
    925942            UPDATE `sharePhotoFiles` SET 
    926                 `Categories`='{$sCategory}', 
     943                `Categories`='{$sCategories}', 
    927944                `medTitle`='{$sTitle}', 
    928945                {$sUriPart} 
Note: See TracChangeset for help on using the changeset viewer.
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.
Fork me on GitHub