1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/phpmyadmin_ynh.git synced 2024-09-03 19:56:46 +02:00
phpmyadmin_ynh/sources/libraries/plugins/import/upload/UploadNoplugin.class.php
2014-01-14 12:28:06 +01:00

64 lines
No EOL
1.4 KiB
PHP

<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Provides upload functionalities for the import plugins
*
* @package PhpMyAdmin
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the transformations interface */
require_once 'libraries/plugins/UploadInterface.int.php';
/**
* Implementation for no plugin
*
* @package PhpMyAdmin
*/
class UploadNoplugin implements UploadInterface
{
/**
* Gets the specific upload ID Key
*
* @return string ID Key
*/
public static function getIdKey()
{
return 'noplugin';
}
/**
* Returns upload status.
*
* This is implementation when no webserver support exists,
* so it returns just zeroes.
*
* @param string $id upload id
*
* @return array|null
*/
public static function getUploadStatus($id)
{
global $SESSION_KEY;
if (trim($id) == "") {
return null;
}
if (! array_key_exists($id, $_SESSION[$SESSION_KEY])) {
$_SESSION[$SESSION_KEY][$id] = array(
'id' => $id,
'finished' => false,
'percent' => 0,
'total' => 0,
'complete' => 0,
'plugin' => UploadNoplugin::getIdKey()
);
}
$ret = $_SESSION[$SESSION_KEY][$id];
return $ret;
}
}
?>