Class: ItemAddFromServer
Source Location: /modules/itemadd/ItemAddFromServer.inc
Class ItemAddFromServer
Inherited Properties, Constants, and Methods
Method Summary
| void |
_sortFiles() |
Sort directory listing.. directory, known types, unknowns. |
Methods
array addDirectory(
$parentId,
$path,
$useSymlink,
$textFields,
&$status,
&$error
)
|
|
Parameters:
|
|
$parentId: |
|
|
|
$path: |
|
|
|
$useSymlink: |
|
|
|
$textFields: |
|
|
|
&$status: |
|
|
|
&$error: |
|
API Tags:
| Return: | GalleryStatus, mixed id of new album or false |
GalleryStatus addItem(
int
$parentId, string
$file, bool
$useSymlink, array
$textFields,
&$status,
&$error, array
$status, array
$error
)
|
|
Add the given file as data-item to the specified album.
Parameters:
|
int |
$parentId: |
The id of the parent album |
|
string |
$file: |
The filesystem path to the file to be added as data-item |
|
bool |
$useSymlink: |
Whether to use symlinks when adding items. |
|
array |
$textFields: |
Flags about the title, summary and description field. |
|
array |
$status: |
See ItemAddPlugin::handleRequest for the specified structure. |
|
array |
$error: |
An array of template error codes. |
|
|
&$status: |
|
|
|
&$error: |
|
void fetchLocalServerDirList(
)
|
|
API Tags:
| See: | ItemAddPlugin::getTitle |
Redefinition of:
- ItemAddPlugin::getTitle()
- Return a localized title for this plugin, suitable for display to the user
void handleRequest(
$form,
&$item,
&$addController
)
|
|
Parameters:
|
|
$form: |
|
|
|
&$item: |
|
|
|
&$addController: |
|
API Tags:
| See: | ItemAddPlugin::handleRequest |
Redefinition of:
- ItemAddPlugin::handleRequest()
- Let the plugin handle the incoming request
void loadTemplate(
&$template,
&$form,
$item
)
|
|
Parameters:
|
|
&$template: |
|
|
|
&$form: |
|
|
|
$item: |
|
API Tags:
| See: | ItemAdd:loadTemplate |
Information Tags:
| Todo: | Don't let the user select folders if the user is missing the core.addAlbum permission. |
Redefinition of:
- ItemAddPlugin::loadTemplate()
- Load the template with data from this plugin
GalleryStatus processDirectory(
int
$albumId, string
$path, bool
$useSymlink, array
$textFields, array
$form,
&$status,
&$error, array
$status, array
$error
)
|
|
Process a directory by recursively adding files as data-items and sub-directories as albums.
Parameters:
|
int |
$albumId: |
The id of the album to which all new items should be added to. |
|
string |
$path: |
The filesystem path to the directory to be processed. |
|
bool |
$useSymlink: |
Whether to use symlinks when adding items. |
|
array |
$textFields: |
Flags about the title, summary and description field. |
|
array |
$form: |
The request form from the item add controller. |
|
array |
$status: |
See ItemAddPlugin::handleRequest for the specified structure. |
|
array |
$error: |
An array of template error codes. |
|
|
&$status: |
|
|
|
&$error: |
|
int _getFileCountForDirectory(
string
$dirName,
&$progressCount, int
$progressCount
)
|
|
Get the number of files / dirs within a sub-tree of the filesystem.
Parameters:
|
string |
$dirName: |
|
|
int |
$progressCount: |
|
|
|
&$progressCount: |
|
API Tags:
| Return: | the number of files with this sub-tree of the filesystem |
void _sortFiles(
$a,
$b
)
|
|
Sort directory listing.. directory, known types, unknowns.
Parameters:
API Tags:
|
|