Stud.IP  jlu_3.3 Revision
Document_FilesController Class Reference
Inheritance diagram for Document_FilesController:
Inheritance graph
Collaboration diagram for Document_FilesController:
Collaboration graph

Public Member Functions

 before_filter (&$action, &$args)
 
 index_action ($dir_id=null, $page=1)
 
 upload_action ($folder_id, $page=1)
 
 edit_action ($entry_id)
 
 move_action ($file_id, $source_id=null)
 
 copy_action ($file_id, $source_id=null)
 
 delete_action ($id)
 
 bulk_action ($folder_id, $page=1)
 
 settings_action ($limit, $page, $directory)
 
- Public Member Functions inherited from DocumentController
 before_filter (&$action, &$args)
 
 url_for_parent_directory ($entry, $parent_id=null)
 
- Public Member Functions inherited from StudipController
 before_filter (&$action, &$args)
 
 perform ($unconsumed_path)
 
 after_filter ($action, $args)
 
 validate_args (&$args, $types=NULL)
 
 url_for ($to='')
 
 link_for ($to='')
 
 relocate ($to)
 
 rescue ($exception)
 
 setInfoBoxImage ($image)
 
 addToInfobox ($category, $text, $icon='blank.gif')
 
 render_json ($data)
 
 relay ($to_uri)
 
 perform_relayed ($unconsumed)
 
 render_template_as_string ($template, $layout=null)
 

Protected Member Functions

 checkCopyQuota ($ids)
 
- Protected Member Functions inherited from DocumentController
 setDialogLayout ($icon=false)
 
 getPageForIndex ($index, $limit=null)
 
- Protected Member Functions inherited from StudipController
 populateInfobox ()
 

Static Protected Attributes

static $possible_limits = array(20, 50, 100)
 

Additional Inherited Members

- Protected Attributes inherited from AuthenticatedController
 $with_session = true
 
 $allow_nobody = false
 
- Protected Attributes inherited from StudipController
 $with_session = false
 
 $allow_nobody = true
 
 $encoding = "windows-1252"
 
 $utf8decode_xhr = false
 

Detailed Description

files.php

Der Controller stellt angemeldeten Benutzer/innen einen Dateimanager fuer deren persönlichen Dateibereich im Stud.IP zur Verfügung. In diesem Controller werden sämtliche Dateioperationen gekapselt.

Author
Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m
Stefan Osterloh s.ost.nosp@m.erlo.nosp@m.h@uni.nosp@m.-old.nosp@m.enbur.nosp@m.g.de @license GPL2 or any later version
Since
3.1
Todo:

Remove user dir creation from this controller, it is storage type specific

Extends file extension black list to mime type black list?

Inline display of media

AJAX file upload

Admin/root handling needs to be improved

Test another storage type (DB? FTP?)

Drag and drop move operation

?? Trash functionality (store deleted files in trash for X days)

Member Function Documentation

◆ before_filter()

before_filter ( $action,
$args 
)

Before filter, basically initializes the controller by actvating the according navigation entry and other settings.

Parameters
String$actionAction to execute
Array$argsArguments passed for the action (might be empty)

Reimplemented from DocumentController.

Here is the call graph for this function:

◆ bulk_action()

bulk_action (   $folder_id,
  $page = 1 
)

General handler for bulk actions. Support the following actions:

  • Download
  • Move
  • Copy
  • Delete
Parameters
String$folder_idDirectory entry id of the origin folder
Here is the call graph for this function:

◆ checkCopyQuota()

checkCopyQuota (   $ids)
protected

Checks whether it is possible to copy the files (given by their ids) to another folder by determining whether the remaining disk space is sufficient for the files.

Parameters
Array$idsDirectory entry ids of the files to copy
Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy_action()

copy_action (   $file_id,
  $source_id = null 
)

Copy a file to another folder.

Parameters
String$file_idDirecory entry id of the file to copy (use 'flashed' to read ids from from flash memory for a bulk operation)
mixed$source_idOptional folder id to return to after operation has succeeded
Here is the call graph for this function:

◆ delete_action()

delete_action (   $id)

Deletes a file.

Parameters
String$idDirectory entry id of the file to delete
Here is the call graph for this function:

◆ edit_action()

edit_action (   $entry_id)

Edits a file.

Parameters
String$entry_idDirectory entry id of the file
Here is the call graph for this function:

◆ index_action()

index_action (   $dir_id = null,
  $page = 1 
)

Displays the files in a speicfic folder.

Parameters
mixed$dir_idDirectory entry id of the folder (default to root)
Here is the call graph for this function:

◆ move_action()

move_action (   $file_id,
  $source_id = null 
)

Move a file to another folder.

Parameters
String$file_idDirecory entry id of the file to move (use 'flashed' to read ids from from flash memory for a bulk operation)
mixed$source_idOptional folder id to return to after operation has succeeded
Here is the call graph for this function:

◆ settings_action()

settings_action (   $limit,
  $page,
  $directory 
)
Here is the call graph for this function:

◆ upload_action()

upload_action (   $folder_id,
  $page = 1 
)

Upload a new file.

Parameters
String$folder_idDirectory entry id of the folder to upload to
Here is the call graph for this function:

Field Documentation

◆ $possible_limits

$possible_limits = array(20, 50, 100)
staticprotected

The documentation for this class was generated from the following file: