Changeset 10371
- Timestamp:
- 11/21/2015 04:01:49 PM (10 years ago)
- File:
-
- 1 edited
-
branches/2.4/src/bp-core/bp-core-attachments.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.4/src/bp-core/bp-core-attachments.php
r10193 r10371 42 42 } else { 43 43 $upload_data = bp_upload_dir(); 44 45 // Return empty string, if Uploads data are not available 46 if ( ! $upload_data ) { 47 return $retval; 48 } 44 49 45 50 // Build the Upload data array for BuddyPress attachments … … 304 309 $attachment_data = bp_attachments_uploads_dir_get(); 305 310 311 // The BP Attachments Uploads Dir is not set, stop. 312 if ( ! $attachment_data ) { 313 return false; 314 } 315 306 316 // Default to members for xProfile 307 317 $object_subdir = 'members'; … … 402 412 // Get BuddyPress Attachments Uploads Dir datas 403 413 $bp_attachments_uploads_dir = bp_attachments_uploads_dir_get(); 414 415 // The BP Attachments Uploads Dir is not set, stop. 416 if ( ! $bp_attachments_uploads_dir ) { 417 return $attachment_data; 418 } 404 419 405 420 $type_subdir = $r['object_dir'] . '/' . $r['item_id'] . '/' . $r['type']; … … 1235 1250 $bp_attachments_uploads_dir = bp_attachments_uploads_dir_get(); 1236 1251 1252 // The BP Attachments Uploads Dir is not set, stop. 1253 if ( ! $bp_attachments_uploads_dir ) { 1254 bp_attachments_json_response( false, $is_html4, array( 1255 'type' => 'upload_error', 1256 'message' => $error_message, 1257 ) ); 1258 } 1259 1237 1260 $cover_subdir = $object_data['dir'] . '/' . $bp_params['item_id'] . '/cover-image'; 1238 1261 $cover_dir = trailingslashit( $bp_attachments_uploads_dir['basedir'] ) . $cover_subdir;
Note: See TracChangeset
for help on using the changeset viewer.