Minor - format code

pull/3147/head
Julio Montoya 6 years ago
parent 0d5820daa0
commit e4ac3b8be6
  1. 5
      main/dropbox/dropbox_download.php
  2. 13
      main/dropbox/dropbox_functions.inc.php
  3. 1
      main/dropbox/dropbox_init.inc.php
  4. 7
      main/dropbox/index.php
  5. 3
      main/dropbox/recover_dropbox_files.php
  6. 1
      main/dropbox/update.php

@ -1,8 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.dropbox
*/
require_once __DIR__.'/../inc/global.inc.php';
$_course = api_get_course_info();

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
use ChamiloSession as Session;
@ -385,7 +386,7 @@ function store_addcategory()
];
$id = Database::insert(Database::get_course_table(TABLE_DROPBOX_CATEGORY), $params);
if ($id) {
$sql = "UPDATE ".Database::get_course_table(TABLE_DROPBOX_CATEGORY)." SET cat_id = iid
$sql = "UPDATE ".Database::get_course_table(TABLE_DROPBOX_CATEGORY)." SET cat_id = iid
WHERE iid = $id";
Database::query($sql);
}
@ -1218,13 +1219,13 @@ function user_can_download_file($id, $user_id)
$id = (int) $id;
$user_id = (int) $user_id;
$sql = "SELECT file_id
$sql = "SELECT file_id
FROM ".Database::get_course_table(TABLE_DROPBOX_PERSON)."
WHERE c_id = $course_id AND user_id = $user_id AND file_id = ".$id;
$result = Database::query($sql);
$number_users_who_see_file = Database::num_rows($result);
$sql = "SELECT file_id
$sql = "SELECT file_id
FROM ".Database::get_course_table(TABLE_DROPBOX_POST)."
WHERE c_id = $course_id AND dest_user_id = $user_id AND file_id = ".$id;
$result = Database::query($sql);
@ -1240,13 +1241,13 @@ function check_if_file_exist($id)
{
$id = (int) $id;
$course_id = api_get_course_int_id();
$sql = "SELECT file_id
$sql = "SELECT file_id
FROM ".Database::get_course_table(TABLE_DROPBOX_PERSON)."
WHERE c_id = $course_id AND file_id = ".$id;
$result = Database::query($sql);
$number_users_who_see_file = Database::num_rows($result);
$sql = "SELECT file_id
$sql = "SELECT file_id
FROM ".Database::get_course_table(TABLE_DROPBOX_POST)."
WHERE c_id = $course_id AND file_id = ".$id;
$result = Database::query($sql);
@ -1450,7 +1451,7 @@ function get_total_number_feedback()
$course_id = api_get_course_int_id();
$sql = "SELECT COUNT(feedback_id) AS total, file_id
FROM ".Database::get_course_table(TABLE_DROPBOX_FEEDBACK)."
WHERE c_id = $course_id
WHERE c_id = $course_id
GROUP BY file_id";
$result = Database::query($sql);
$return = [];

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
use ChamiloSession as Session;

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
// The file that contains all the initialisation stuff (and includes all the configuration stuff)
@ -454,7 +455,7 @@ if ($action != 'add') {
if ($action == 'viewfeedback' && isset($_GET['id']) && is_numeric($_GET['id']) && $dropbox_file->id == $_GET['id']) {
$action_icons .= "</td></tr>"; // Ending the normal row of the sortable table
$url = api_get_path(WEB_CODE_PATH).'dropbox/index.php?"'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory."&view_sent_category=".$viewSentCategory."&view=".$view.'&'.$sort_params;
$action_icons .= "
$action_icons .= "
<tr>
<td colspan=\"9\">".
feedback($dropbox_file->feedback2, $url).
@ -627,10 +628,10 @@ if ($action != 'add') {
$action_icons = check_number_feedback($dropbox_file->id, $number_feedback).' '.get_lang('Feedback').'
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=viewfeedback&id='.$dropbox_file->id.'&'.$sort_params.'">'.
Display::return_icon('discuss.png', get_lang('Comment'), '', ICON_SIZE_SMALL).
'</a>
'</a>
<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/update.php?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=update&id='.$dropbox_file->id.'&'.$sort_params.'">'.
Display::return_icon('upload_file.png', get_lang('Update'), '', ICON_SIZE_SMALL).
'</a>
'</a>
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=movesent&move_id='.$dropbox_file->id.'&'.$sort_params.'">'.
Display::return_icon('move.png', get_lang('Move'), '', ICON_SIZE_SMALL).'
</a>

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
require_once 'dropbox_init.inc.php';
@ -19,7 +20,7 @@ if (!api_is_allowed_to_session_edit(false, true)) {
echo Display::page_subheader(get_lang('RecoverDropboxFiles'));
if (isset($_GET['recover_id']) && !empty($_GET['recover_id'])) {
$recover_id = intval($_GET['recover_id']);
$recover_id = (int) $_GET['recover_id'];
$sql = "INSERT INTO $person_tbl VALUES('$course_id', $recover_id, $user_id)";
$result = Database::query($sql);

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
require_once 'dropbox_init.inc.php';

Loading…
Cancel
Save