mirror of
https://github.com/moodle/moodle.git
synced 2025-03-05 00:22:43 +01:00
removing unused variables
This commit is contained in:
parent
8a680500c6
commit
d3427cfe9f
@ -200,8 +200,6 @@ class file_storage {
|
||||
* @return stored_file instance if exists, false if not
|
||||
*/
|
||||
public function get_file($contextid, $component, $filearea, $itemid, $filepath, $filename) {
|
||||
global $DB;
|
||||
|
||||
$filepath = clean_param($filepath, PARAM_PATH);
|
||||
$filename = clean_param($filename, PARAM_FILE);
|
||||
|
||||
@ -287,7 +285,7 @@ class file_storage {
|
||||
*/
|
||||
public function get_area_tree($contextid, $component, $filearea, $itemid) {
|
||||
$result = array('dirname'=>'', 'dirfile'=>null, 'subdirs'=>array(), 'files'=>array());
|
||||
$files = $this->get_area_files($contextid, $component, $filearea, $itemid, $sort="sortorder, itemid, filepath, filename", true);
|
||||
$files = $this->get_area_files($contextid, $component, $filearea, $itemid, "sortorder, itemid, filepath, filename", true);
|
||||
// first create directory structure
|
||||
foreach ($files as $hash=>$dir) {
|
||||
if (!$dir->is_directory()) {
|
||||
@ -551,8 +549,6 @@ class file_storage {
|
||||
unset($file_record['contenthash']);
|
||||
unset($file_record['pathnamehash']);
|
||||
|
||||
$now = time();
|
||||
|
||||
if (!$newrecord = $DB->get_record('files', array('id'=>$fid))) {
|
||||
throw new file_exception('storedfileproblem', 'File does not exist');
|
||||
}
|
||||
@ -880,8 +876,6 @@ class file_storage {
|
||||
* @return stored_file instance
|
||||
*/
|
||||
public function convert_image($file_record, $fid, $newwidth = NULL, $newheight = NULL, $keepaspectratio = true, $quality = NULL) {
|
||||
global $DB;
|
||||
|
||||
if ($fid instanceof stored_file) {
|
||||
$fid = $fid->get_id();
|
||||
}
|
||||
|
@ -90,8 +90,6 @@ class zip_packer extends file_packer {
|
||||
* @return bool success
|
||||
*/
|
||||
public function archive_to_pathname($files, $archivefile) {
|
||||
global $CFG;
|
||||
|
||||
if (!is_array($files)) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user