Changeset 8130
- Timestamp:
- Dec 19, 2008, 12:10:37 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/inc/classes/BxDolDefPhotoUploader.php ¶
r8129 r8130 793 793 function _shareVideoInformation() { 794 794 global $oSysTemplate; 795 795 796 $iAuthorId = $this->_oUploader->_getAuthorId(); 796 797 $iVideoID = (int)$_REQUEST['VideoID']; 797 798 if ($iVideoID && $iAuthorId) { 798 799 $sTitle = process_db_input($_REQUEST['title'], 1); 799 $sCategory = process_db_input($_REQUEST['category'], 1);800 //$sCategory = process_db_input($_REQUEST['category'], 1); 800 801 $sTags = process_db_input($_REQUEST['tags'], 1); 801 802 $sDescription = htmlspecialchars(addslashes($_REQUEST['description'])); 802 803 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)) { 804 813 //--- SharedVideo -> Upload unit for Alerts Engine ---// 805 814 require_once(BX_DIRECTORY_PATH_CLASSES . 'BxDolAlerts.php'); … … 814 823 function _shareMusicInformation() { 815 824 global $oSysTemplate; 825 816 826 $iAuthorId = $this->_oUploader->_getAuthorId(); 817 827 $iMusicID = (int)$_REQUEST['MusicID']; 818 828 if ($iMusicID && $iAuthorId) { 819 829 $sTitle = process_db_input($_REQUEST['title'], 1); 820 $sCategory = process_db_input($_REQUEST['category'], 1);830 //$sCategory = process_db_input($_REQUEST['category'], 1); 821 831 $sTags = process_db_input($_REQUEST['tags'], 1); 822 832 $sDescription = htmlspecialchars(addslashes($_REQUEST['description'])); 823 833 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)) { 825 843 //--- SharedMusic -> Upload unit for Alerts Engine ---// 826 844 require_once(BX_DIRECTORY_PATH_CLASSES . 'BxDolAlerts.php'); … … 892 910 if ($iPhotoID && $iAuthorId) { 893 911 $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'])); 894 915 895 916 $aCategories = array(); … … 899 920 } 900 921 } 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)) { 907 925 //--- SharedPhoto -> Upload unit for Alerts Engine ---// 908 926 require_once(BX_DIRECTORY_PATH_CLASSES . 'BxDolAlerts.php'); … … 915 933 } 916 934 917 function initPhotoFile($iPhotoID, $sTitle, $ aCategories, $sTags, $sDesc) {935 function initPhotoFile($iPhotoID, $sTitle, $sCategories, $sTags, $sDesc) { 918 936 $sMedUri = uriGenerate($sTitle, 'sharePhotoFiles', 'medUri'); 919 937 $sUriPart = empty($sMedUri) ? "" : "`medUri`='" . $sMedUri . "', "; 920 938 921 $sCategory = implode(' ', $aCategories);922 939 $sStatus = getParam('autoApproval_Photo') == 'on' ? 'approved' : 'pending'; 923 940 924 941 $sUpdateSQL = " 925 942 UPDATE `sharePhotoFiles` SET 926 `Categories`='{$sCategor y}',943 `Categories`='{$sCategories}', 927 944 `medTitle`='{$sTitle}', 928 945 {$sUriPart}
Note: See TracChangeset
for help on using the changeset viewer.