Minor - format code.

1.9.x
Julio Montoya 11 years ago
parent b9668733c5
commit f48d06bce9
  1. 13
      main/inc/lib/document.lib.php

@ -612,7 +612,9 @@ class DocumentManager
$doc_list[] = $row; $doc_list[] = $row;
} }
if ($row['filetype'] == 'file' && pathinfo($row['path'], PATHINFO_EXTENSION) == 'html') { if ($row['filetype'] == 'file' &&
pathinfo($row['path'], PATHINFO_EXTENSION) == 'html'
) {
// Templates management // Templates management
$table_template = Database::get_main_table(TABLE_MAIN_TEMPLATES); $table_template = Database::get_main_table(TABLE_MAIN_TEMPLATES);
$sql = "SELECT id FROM $table_template $sql = "SELECT id FROM $table_template
@ -914,7 +916,8 @@ class DocumentManager
// Check // Check
$sql = "SELECT td.id, readonly, tp.insert_user_id $sql = "SELECT td.id, readonly, tp.insert_user_id
FROM $TABLE_DOCUMENT td, $TABLE_PROPERTY tp FROM $TABLE_DOCUMENT td, $TABLE_PROPERTY tp
WHERE td.c_id = $course_id AND WHERE
td.c_id = $course_id AND
tp.c_id = $course_id AND tp.c_id = $course_id AND
td.session_id = $sessionId AND td.session_id = $sessionId AND
tp.ref= td.id AND tp.ref= td.id AND
@ -1466,7 +1469,7 @@ class DocumentManager
* Unset a document as template * Unset a document as template
* *
* @param int $document_id * @param int $document_id
* @param string $couse_code * @param string $course_code
* @param int $user_id * @param int $user_id
*/ */
public static function unset_document_as_template($document_id, $course_code, $user_id) public static function unset_document_as_template($document_id, $course_code, $user_id)
@ -1491,7 +1494,8 @@ class DocumentManager
} }
/** /**
* Return true if the documentpath have visibility=1 as item_property (you should use the is_visible_by_id) * Return true if the documentpath have visibility=1 as
* item_property (you should use the is_visible_by_id)
* *
* @param string $document_path the relative complete path of the document * @param string $document_path the relative complete path of the document
* @param array $course the _course array info of the document's course * @param array $course the _course array info of the document's course
@ -4668,6 +4672,7 @@ class DocumentManager
(path = '".$folder."' OR path = '$folderWithSuffix') AND (path = '".$folder."' OR path = '$folderWithSuffix') AND
(session_id = 0 OR session_id = $sessionId) (session_id = 0 OR session_id = $sessionId)
"; ";
$rs = Database::query($sql); $rs = Database::query($sql);
if (Database::num_rows($rs)) { if (Database::num_rows($rs)) {
return true; return true;

Loading…
Cancel
Save