1
0
RomanL 8 жил өмнө
parent
commit
b5100523e7

+ 1 - 1
modules/base/files/classes/BxBaseModFilesFormUpload.php

@@ -85,7 +85,7 @@ class BxBaseModFilesFormUpload extends BxBaseModTextFormEntry
             $iContentId = 0;
             if ($isAssociateWithContent)
                 $iContentId = BxBaseModGeneralFormEntry::insert (array_merge(array(
-                    $CNF['FIELD_FOR_STORE_FILEID'] => $aFile['id'],
+                    $CNF['FIELD_FOR_STORING_FILE_ID'] => $aFile['id'],
                     $CNF['FIELD_TITLE'] => $this->getCleanValue('title-' . $aFile['id']),
                     $CNF['FIELD_AUTHOR'] => bx_get('profile_id') && $this->_oModule->serviceIsAllowedAddContentToProfile(bx_get('profile_id')) ? bx_get('profile_id') : '',
                 ), $aFormValues));

+ 1 - 1
modules/base/files/classes/BxBaseModFilesFormsEntryHelper.php

@@ -67,7 +67,7 @@ class BxBaseModFilesFormsEntryHelper extends BxBaseModTextFormsEntryHelper
             $this->_oModule->checkAllowedAdd(true);
         }
         
-        return array('needRedirectAfterAction' => true, 'ContentIds' => $aContentIds);
+        return array('need_redirect_after_action' => true, 'content_ids_array' => $aContentIds);
     }
 }
 

+ 3 - 3
modules/boonex/files/classes/BxFilesConfig.php

@@ -37,6 +37,7 @@ class BxFilesConfig extends BxBaseModTextConfig
             'FIELD_ADDED' => 'added',
             'FIELD_CHANGED' => 'changed',
             'FIELD_FILE_ID' => 'file_id',
+			'FIELD_FOR_STORING_FILE_ID' => 'file_id',
             'FIELD_TITLE' => 'title',
             'FIELD_CATEGORY' => 'cat',
             'FIELD_TEXT' => 'desc',
@@ -49,7 +50,6 @@ class BxFilesConfig extends BxBaseModTextConfig
         	'FIELD_STATUS_ADMIN' => 'status_admin',
             'FIELD_LOCATION_PREFIX' => 'location',
             'FIELDS_WITH_KEYWORDS' => 'auto', // can be 'auto', array of fields or comma separated string of field names, works only when OBJECT_METATAGS is specified
-			'FIELD_FOR_STORE_FILEID' => 'file_id',
 			
             // page URIs
             'URI_VIEW_ENTRY' => 'view-file',
@@ -116,6 +116,7 @@ class BxFilesConfig extends BxBaseModTextConfig
             	'txt_sample_comment_single' => '_bx_files_txt_sample_comment_single',
             	'txt_sample_vote_single' => '_bx_files_txt_sample_vote_single',
              	'form_field_author' => '_bx_files_form_entry_input_author',
+				'form_entry_upload_single_for_update' => '_bx_files_form_entry_input_pictures_upload',
             	'grid_action_err_delete' => '_bx_files_grid_action_err_delete',
             	'grid_txt_account_manager' => '_bx_files_grid_txt_account_manager',
 				'filter_item_active' => '_bx_files_grid_filter_item_title_adm_active',
@@ -124,8 +125,7 @@ class BxFilesConfig extends BxBaseModTextConfig
             	'menu_item_manage_my' => '_bx_files_menu_item_title_manage_my',
             	'menu_item_manage_all' => '_bx_files_menu_item_title_manage_all',
                 'txt_all_entries_by' => '_bx_files_txt_all_entries_by',
-                'txt_all_entries_by_author' => '_bx_files_page_title_browse_by_author',
-				'form_entry_upload_single_for_update' => '_bx_files_form_entry_input_pictures_upload'
+                'txt_all_entries_by_author' => '_bx_files_page_title_browse_by_author'
             ),
         );
 

+ 2 - 2
modules/boonex/files/classes/BxFilesFormsEntryHelper.php

@@ -25,9 +25,9 @@ class BxFilesFormsEntryHelper extends BxBaseModFilesFormsEntryHelper
     {
        
 		$mixedContent = $this->addDataFormAction($sDisplay, $sCheckFunction);
-		if (is_array($mixedContent) && $mixedContent['needRedirectAfterAction']){
+		if (is_array($mixedContent) && $mixedContent['need_redirect_after_action']){
 			$CNF = &$this->_oModule->_oConfig->CNF;
-			$aContentIds = $mixedContent['aContentIds'];
+			$aContentIds = $mixedContent['content_ids_array'];
 			$iContentId = array_pop($aContentIds);
 			$aContentInfo = $this->_oModule->_oDb->getContentInfoById($iContentId);
 			$oProfile = BxDolProfile::getInstance($aContentInfo[$CNF['FIELD_AUTHOR']]);

+ 3 - 3
modules/boonex/photos/classes/BxPhotosConfig.php

@@ -45,13 +45,13 @@ class BxPhotosConfig extends BxBaseModTextConfig
             'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
             'FIELD_PHOTO' => 'pictures',
             'FIELD_THUMB' => 'thumb',
+			'FIELD_FOR_STORING_FILE_ID' => 'thumb',
 			'FIELD_VIEWS' => 'views',
             'FIELD_COMMENTS' => 'comments',
 	        'FIELD_STATUS' => 'status',
         	'FIELD_STATUS_ADMIN' => 'status_admin',
             'FIELD_LOCATION_PREFIX' => 'location',
             'FIELDS_WITH_KEYWORDS' => 'auto', // can be 'auto', array of fields or comma separated string of field names, works only when OBJECT_METATAGS is specified
-       		'FIELD_FOR_STORE_FILEID' => 'thumb',
 			
             // page URIs
             'URI_VIEW_ENTRY' => 'view-photo',
@@ -119,6 +119,7 @@ class BxPhotosConfig extends BxBaseModTextConfig
             	'txt_sample_comment_single' => '_bx_photos_txt_sample_comment_single',
             	'txt_sample_vote_single' => '_bx_photos_txt_sample_vote_single',
                 'form_field_author' => '_bx_photos_form_entry_input_author',
+				'form_entry_upload_single_for_update' => '_bx_photos_form_entry_input_pictures_upload',
             	'grid_action_err_delete' => '_bx_photos_grid_action_err_delete',
             	'grid_txt_account_manager' => '_bx_photos_grid_txt_account_manager',
 				'filter_item_active' => '_bx_photos_grid_filter_item_title_adm_active',
@@ -128,8 +129,7 @@ class BxPhotosConfig extends BxBaseModTextConfig
             	'menu_item_manage_all' => '_bx_photos_menu_item_title_manage_all',
                 'txt_all_entries_by' => '_bx_photos_txt_all_entries_by',
                 'txt_all_entries_by_author' => '_bx_photos_page_title_browse_by_author',
-            	'txt_pict_use_as_thumb' => '_bx_photos_form_entry_input_picture_use_as_thumb',
-				'form_entry_upload_single_for_update' => '_bx_photos_form_entry_input_pictures_upload'
+            	'txt_pict_use_as_thumb' => '_bx_photos_form_entry_input_picture_use_as_thumb'
             ),
         );
 

+ 1 - 1
modules/boonex/photos/classes/BxPhotosFormsEntryHelper.php

@@ -24,7 +24,7 @@ class BxPhotosFormsEntryHelper extends BxBaseModFilesFormsEntryHelper
     public function addDataForm ($sDisplay = false, $sCheckFunction = false)
     {
         $mixedContent = $this->addDataFormAction($sDisplay, $sCheckFunction);
-		if (is_array($mixedContent) && $mixedContent['needRedirectAfterAction']){
+		if (is_array($mixedContent) && $mixedContent['need_redirect_after_action']){
 			$CNF = &$this->_oModule->_oConfig->CNF;
         	$this->_redirectAndExit(BxDolPermalinks::getInstance()->permalink($CNF['URL_HOME']));
 		}