Skip to content

Commit

Permalink
Replacing OR with ||, updating id based in iid.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Apr 10, 2015
1 parent 28598e3 commit 929e262
Show file tree
Hide file tree
Showing 5 changed files with 185 additions and 110 deletions.
2 changes: 1 addition & 1 deletion main/inc/lib/document.lib.php
Expand Up @@ -1513,7 +1513,7 @@ public static function is_visible($doc_path, $course, $session_id = 0, $file_typ
//note the extra / at the end of doc_path to match every path in the document table that is part of the document path

$session_id = intval($session_id);
$condition = "AND session_id IN ('$session_id', '0') ";
$condition = "AND d.session_id IN ('$session_id', '0') ";
// The " d.filetype='file' " let the user see a file even if the folder is hidden see #2198

/*
Expand Down
10 changes: 6 additions & 4 deletions main/inc/lib/elfinder/templates.php
Expand Up @@ -11,7 +11,9 @@
$sql = "SELECT * FROM $table";
$result = Database::query($sql);
$templates = Database::store_result($result, 'ASSOC');
$editor = new CkEditor();
$templates = $editor->simpleFormatTemplates($templates);
$template->assign('templates', $templates);
$template->display('default/javascript/editor/ckeditor/templates.tpl');
if (!empty($templates)) {
$editor = new CkEditor();
$templates = $editor->simpleFormatTemplates($templates);
$template->assign('templates', $templates);
$template->display('default/javascript/editor/ckeditor/templates.tpl');
}

0 comments on commit 929e262

Please sign in to comment.