From dfb680d1972eade8ddf88b9f7686fc8cf84da10b Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Mon, 25 May 2015 10:20:33 -0500 Subject: [PATCH] Minor - Code conventions - refs BT#9892 #TMI --- main/forum/forumfunction.inc.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main/forum/forumfunction.inc.php b/main/forum/forumfunction.inc.php index c6733fdcea..276a2b5c1b 100755 --- a/main/forum/forumfunction.inc.php +++ b/main/forum/forumfunction.inc.php @@ -4308,7 +4308,7 @@ function add_forum_attachment_file($file_comment, $last_id) Display :: display_error_message(get_lang('UplUnableToSaveFileFilteredExtension')); } else { $new_file_name = uniqid(''); - $new_path = $updir.'/'.$new_file_name; + $new_path = $updir . '/' . $new_file_name; $result = @move_uploaded_file($_FILES['user_upload']['tmp_name'], $new_path); $safe_file_comment = Database::escape_string($file_comment); $safe_file_name = Database::escape_string($file_name); @@ -4455,16 +4455,16 @@ function delete_attachment($post_id, $id_attach = 0, $display = true) $forum_table_attachment = Database::get_course_table(TABLE_FORUM_ATTACHMENT); $course_id = api_get_course_int_id(); - $cond = (!empty($id_attach)) ? " iid = ".(int) $id_attach."" : " post_id = ".(int) $post_id.""; + $cond = (!empty($id_attach)) ? " iid = " . (int) $id_attach . "" : " post_id = " . (int) $post_id . ""; $sql = "SELECT path FROM $forum_table_attachment WHERE c_id = $course_id AND $cond"; $res = Database::query($sql); $row = Database::fetch_array($res); - $course_dir = $_course['path'].'/upload/forum'; + $course_dir = $_course['path'] . '/upload/forum'; $sys_course_path = api_get_path(SYS_COURSE_PATH); - $updir = $sys_course_path.$course_dir; + $updir = $sys_course_path . $course_dir; $my_path = isset($row['path']) ? $row['path'] : null; - $file = $updir.'/'.$my_path; + $file = $updir . '/' . $my_path; if (Security::check_abs_path($file, $updir)) { @unlink($file); }