@@ -74,6 +74,10 @@ |
||
74 | 74 | |
75 | 75 | |
76 | 76 | // force will delete whichever type of the entry. if not, only delete sandbox entry |
77 | + |
|
78 | + /** |
|
79 | + * @param boolean $force |
|
80 | + */ |
|
77 | 81 | public function deleteFile(DepositionFiles $entry, $force) { |
78 | 82 | try { |
79 | 83 | $sql = sprintf( |
@@ -35,6 +35,9 @@ |
||
35 | 35 | function __construct() { |
36 | 36 | } |
37 | 37 | |
38 | + /** |
|
39 | + * @param string $message |
|
40 | + */ |
|
38 | 41 | public function setMessage($message) { |
39 | 42 | array_push($this->messages, $message); |
40 | 43 |
@@ -62,6 +62,9 @@ discard block |
||
62 | 62 | } |
63 | 63 | |
64 | 64 | |
65 | + /** |
|
66 | + * @param boolean $production |
|
67 | + */ |
|
65 | 68 | public function init($production, &$iError = null) { |
66 | 69 | |
67 | 70 | if ($iError === null) { |
@@ -102,6 +105,9 @@ discard block |
||
102 | 105 | } |
103 | 106 | |
104 | 107 | |
108 | + /** |
|
109 | + * @param string $path |
|
110 | + */ |
|
105 | 111 | private function generateUrl($path) { |
106 | 112 | |
107 | 113 | if (!$this->configured()) { |
@@ -236,6 +242,9 @@ discard block |
||
236 | 242 | } |
237 | 243 | |
238 | 244 | |
245 | + /** |
|
246 | + * @param false|string $url |
|
247 | + */ |
|
239 | 248 | public static function curlIt($url, $data) { |
240 | 249 | |
241 | 250 | $curl = curl_init($url); |
@@ -44,9 +44,7 @@ |
||
44 | 44 | /** |
45 | 45 | * get files from a userid+fileid |
46 | 46 | * |
47 | - * @param number $userId |
|
48 | 47 | * @param number $fileId |
49 | - * @param array $options |
|
50 | 48 | * |
51 | 49 | * @return array |
52 | 50 | */ |
@@ -48,14 +48,14 @@ discard block |
||
48 | 48 | * Controllers |
49 | 49 | */ |
50 | 50 | $container->registerService( |
51 | - 'MiscService', function ($c) { |
|
51 | + 'MiscService', function($c) { |
|
52 | 52 | return new MiscService($c->query('Logger'), $c->query('AppName')); |
53 | 53 | } |
54 | 54 | ); |
55 | 55 | |
56 | 56 | |
57 | 57 | $container->registerService( |
58 | - 'ConfigService', function ($c) { |
|
58 | + 'ConfigService', function($c) { |
|
59 | 59 | return new ConfigService( |
60 | 60 | $c->query('AppName'), $c->query('CoreConfig'), $c->query('UserId'), |
61 | 61 | $c->query('MiscService') |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | ); |
65 | 65 | |
66 | 66 | $container->registerService( |
67 | - 'ApiService', function ($c) { |
|
67 | + 'ApiService', function($c) { |
|
68 | 68 | return new ApiService( |
69 | 69 | $c->query('ConfigService'), $c->query('FileService'), $c->query('MiscService') |
70 | 70 | ); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | ); |
73 | 73 | |
74 | 74 | $container->registerService( |
75 | - 'FileService', function ($c) { |
|
75 | + 'FileService', function($c) { |
|
76 | 76 | return new FileService( |
77 | 77 | $c->query('UserId'), $c->query('ConfigService'), $c->query('MiscService') |
78 | 78 | ); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | * Controllers |
84 | 84 | */ |
85 | 85 | $container->registerService( |
86 | - 'SettingsController', function ($c) { |
|
86 | + 'SettingsController', function($c) { |
|
87 | 87 | return new SettingsController( |
88 | 88 | $c->query('AppName'), $c->query('Request'), $c->query('ConfigService'), |
89 | 89 | $c->query('MiscService') |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | ); |
93 | 93 | |
94 | 94 | $container->registerService( |
95 | - 'ZenodoController', function ($c) { |
|
95 | + 'ZenodoController', function($c) { |
|
96 | 96 | return new ZenodoController( |
97 | 97 | $c->query('AppName'), $c->query('Request'), $c->query('UserId'), |
98 | 98 | $c->query('UserManager'), |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | * Mapper |
110 | 110 | */ |
111 | 111 | $container->registerService( |
112 | - 'DepositionFilesMapper', function ($c) { |
|
112 | + 'DepositionFilesMapper', function($c) { |
|
113 | 113 | return new DepositionFilesMapper( |
114 | 114 | $c->query('ServerContainer') |
115 | 115 | ->getDatabaseConnection() |
@@ -121,20 +121,20 @@ discard block |
||
121 | 121 | * Core |
122 | 122 | */ |
123 | 123 | $container->registerService( |
124 | - 'Logger', function ($c) { |
|
124 | + 'Logger', function($c) { |
|
125 | 125 | return $c->query('ServerContainer') |
126 | 126 | ->getLogger(); |
127 | 127 | } |
128 | 128 | ); |
129 | 129 | $container->registerService( |
130 | - 'CoreConfig', function ($c) { |
|
130 | + 'CoreConfig', function($c) { |
|
131 | 131 | return $c->query('ServerContainer') |
132 | 132 | ->getConfig(); |
133 | 133 | } |
134 | 134 | ); |
135 | 135 | |
136 | 136 | $container->registerService( |
137 | - 'UserId', function ($c) { |
|
137 | + 'UserId', function($c) { |
|
138 | 138 | $user = $c->query('ServerContainer') |
139 | 139 | ->getUserSession() |
140 | 140 | ->getUser(); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | ); |
145 | 145 | |
146 | 146 | $container->registerService( |
147 | - 'UserManager', function ($c) { |
|
147 | + 'UserManager', function($c) { |
|
148 | 148 | return $c->query('ServerContainer') |
149 | 149 | ->getUserManager(); |
150 | 150 | } |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | public function registerInFiles() { |
156 | 156 | \OC::$server->getEventDispatcher() |
157 | 157 | ->addListener( |
158 | - 'OCA\Files::loadAdditionalScripts', function () { |
|
158 | + 'OCA\Files::loadAdditionalScripts', function() { |
|
159 | 159 | // add some animation |
160 | 160 | \OCP\Util::addScript('zenodo', 'jquery.animate-shadow-min'); |
161 | 161 | \OCP\Util::addScript('zenodo', 'navigate'); |