|
@@ -1,5 +1,5 @@
|
|
|
<?php
|
|
|
-/* For licensing terms, see /dokeos_license.txt */
|
|
|
+/* For licensing terms, see /license.txt */
|
|
|
|
|
|
require_once 'Course.class.php';
|
|
|
require_once 'Event.class.php';
|
|
@@ -138,9 +138,9 @@ class CourseBuilder
|
|
|
$session_id = intval($session_id);
|
|
|
|
|
|
if (!empty($this->course->type) && $this->course->type=='partial') {
|
|
|
- $sql = 'SELECT * FROM '.$table_doc.' d, '.$table_prop.' p WHERE tool = \''.TOOL_DOCUMENT.'\' AND p.ref = d.id AND p.visibility != 2 AND path NOT LIKE \'/images/gallery%\' AND session_id = '.$session_id.' ORDER BY path';
|
|
|
+ $sql = 'SELECT d.id, d.path, d.comment, d.title, d.filetype, d.size FROM '.$table_doc.' d, '.$table_prop.' p WHERE tool = \''.TOOL_DOCUMENT.'\' AND p.ref = d.id AND p.visibility != 2 AND path NOT LIKE \'/images/gallery%\' AND session_id = '.$session_id.' ORDER BY path';
|
|
|
} else {
|
|
|
- $sql = 'SELECT * FROM '.$table_doc.' d, '.$table_prop.' p WHERE tool = \''.TOOL_DOCUMENT.'\' AND p.ref = d.id AND p.visibility != 2 AND session_id = '.$session_id.' ORDER BY path';
|
|
|
+ $sql = 'SELECT d.id, d.path, d.comment, d.title, d.filetype, d.size FROM '.$table_doc.' d, '.$table_prop.' p WHERE tool = \''.TOOL_DOCUMENT.'\' AND p.ref = d.id AND p.visibility != 2 AND session_id = '.$session_id.' ORDER BY path';
|
|
|
}
|
|
|
|
|
|
$db_result = Database::query($sql);
|
|
@@ -155,9 +155,9 @@ class CourseBuilder
|
|
|
$table_prop = Database :: get_course_table(TABLE_ITEM_PROPERTY);
|
|
|
|
|
|
if (!empty($this->course->type) && $this->course->type=='partial')
|
|
|
- $sql = 'SELECT * FROM '.$table_doc.' d, '.$table_prop.' p WHERE tool = \''.TOOL_DOCUMENT.'\' AND p.ref = d.id AND p.visibility != 2 AND path NOT LIKE \'/images/gallery%\' AND d.session_id = 0 ORDER BY path';
|
|
|
+ $sql = 'SELECT d.id, d.path, d.comment, d.title, d.filetype, d.size FROM '.$table_doc.' d, '.$table_prop.' p WHERE tool = \''.TOOL_DOCUMENT.'\' AND p.ref = d.id AND p.visibility != 2 AND path NOT LIKE \'/images/gallery%\' AND d.session_id = 0 ORDER BY path';
|
|
|
else
|
|
|
- $sql = 'SELECT * FROM '.$table_doc.' d, '.$table_prop.' p WHERE tool = \''.TOOL_DOCUMENT.'\' AND p.ref = d.id AND p.visibility != 2 AND d.session_id = 0 ORDER BY path';
|
|
|
+ $sql = 'SELECT d.id, d.path, d.comment, d.title, d.filetype, d.size FROM '.$table_doc.' d, '.$table_prop.' p WHERE tool = \''.TOOL_DOCUMENT.'\' AND p.ref = d.id AND p.visibility != 2 AND d.session_id = 0 ORDER BY path';
|
|
|
|
|
|
$db_result = Database::query($sql);
|
|
|
while ($obj = Database::fetch_object($db_result))
|
|
@@ -240,11 +240,11 @@ class CourseBuilder
|
|
|
$table = Database :: get_course_table(TABLE_LINK,$course_info['dbName']);
|
|
|
$table_prop = Database :: get_course_table(TABLE_ITEM_PROPERTY,$course_info['dbName']);
|
|
|
$session_id = intval($session_id);
|
|
|
- $sql = "SELECT * FROM $table l, $table_prop p WHERE p.ref=l.id AND p.tool = '".TOOL_LINK."' AND p.visibility != 2 AND session_id = '$session_id' ORDER BY l.display_order";
|
|
|
+ $sql = "SELECT l.id, l.title, l.url, l.description, l.category_id, l.on_homepage FROM $table l, $table_prop p WHERE p.ref=l.id AND p.tool = '".TOOL_LINK."' AND p.visibility != 2 AND session_id = '$session_id' ORDER BY l.display_order";
|
|
|
} else {
|
|
|
$table = Database :: get_course_table(TABLE_LINK);
|
|
|
$table_prop = Database :: get_course_table(TABLE_ITEM_PROPERTY);
|
|
|
- $sql = "SELECT * FROM $table l, $table_prop p WHERE p.ref=l.id AND p.tool = '".TOOL_LINK."' AND p.visibility != 2 AND l.session_id = 0 ORDER BY l.display_order";
|
|
|
+ $sql = "SELECT l.id, l.title, l.url, l.description, l.category_id, l.on_homepage FROM $table l, $table_prop p WHERE p.ref=l.id AND p.tool = '".TOOL_LINK."' AND p.visibility != 2 AND l.session_id = 0 ORDER BY l.display_order";
|
|
|
}
|
|
|
|
|
|
$db_result = Database::query($sql);
|