[svn r14914] Replaced array_walk() by foreach() as array_walk didn't allow only one parameter to be passed to called function. Removed warning message on document tool's homepage.

skala
Yannick Warnier 17 years ago
parent 6587816c46
commit fe5f432479
  1. 6
      main/document/document.inc.php

@ -1,4 +1,4 @@
<?php // $Id: document.inc.php 14908 2008-04-15 20:36:40Z juliomontoya $
<?php // $Id: document.inc.php 14914 2008-04-16 05:02:08Z yannoo $
/*
==============================================================================
Dokeos - elearning and course management software
@ -50,8 +50,8 @@ function build_directory_selector($folders,$curdirpath,$group_dir='',$changeRend
{
if (is_array($folders))
{
$escaped_folders = $folders;
array_walk($escaped_folders, 'mysql_real_escape_string');
$escaped_folders = array();
foreach($folders as $key=>$val){$escaped_folders[$key] = Database::escape_string($val);}
$folder_sql = implode("','",$escaped_folders);
$doc_table = Database::get_course_table(TABLE_DOCUMENT);
$sql = "SELECT * FROM $doc_table WHERE filetype='folder' AND path IN ('".$folder_sql."')";

Loading…
Cancel
Save