Upgraded phpmyadmin to 4.0.4 (All Languages) - No modifications yet
[openemr.git] / phpmyadmin / libraries / plugins / import / upload / UploadNoplugin.class.php
blob90148ded4ca1cb59130bd584c8d5ba0534962a30
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Provides upload functionalities for the import plugins
6 * @package PhpMyAdmin
7 */
8 if (! defined('PHPMYADMIN')) {
9 exit;
12 /* Get the transformations interface */
13 require_once 'libraries/plugins/UploadInterface.int.php';
15 /**
16 * Implementation for no plugin
18 * @package PhpMyAdmin
20 class UploadNoplugin implements UploadInterface
22 /**
23 * Gets the specific upload ID Key
25 * @return string ID Key
27 public static function getIdKey()
29 return 'noplugin';
32 /**
33 * Returns upload status.
35 * This is implementation when no webserver support exists,
36 * so it returns just zeroes.
38 * @param string $id upload id
40 * @return array|null
42 public static function getUploadStatus($id)
44 global $SESSION_KEY;
46 if (trim($id) == "") {
47 return null;
49 if (! array_key_exists($id, $_SESSION[$SESSION_KEY])) {
50 $_SESSION[$SESSION_KEY][$id] = array(
51 'id' => $id,
52 'finished' => false,
53 'percent' => 0,
54 'total' => 0,
55 'complete' => 0,
56 'plugin' => UploadNoplugin::getIdKey()
59 $ret = $_SESSION[$SESSION_KEY][$id];
61 return $ret;