helper.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
  6. * @author Bart Visscher <bartv@thisnet.nl>
  7. * @author Björn Schießle <bjoern@schiessle.org>
  8. * @author Christopher Schäpers <kondou@ts.unde.re>
  9. * @author Clark Tomlinson <fallen013@gmail.com>
  10. * @author Fabian Henze <flyser42@gmx.de>
  11. * @author Felix Moeller <mail@felixmoeller.de>
  12. * @author Georg Ehrke <georg@owncloud.com>
  13. * @author Jakob Sack <mail@jakobsack.de>
  14. * @author Jan-Christoph Borchardt <hey@jancborchardt.net>
  15. * @author Joas Schilling <coding@schilljs.com>
  16. * @author Jörn Friedrich Dreyer <jfd@butonic.de>
  17. * @author Lukas Reschke <lukas@statuscode.ch>
  18. * @author Michael Gapczynski <GapczynskiM@gmail.com>
  19. * @author Morris Jobke <hey@morrisjobke.de>
  20. * @author Olivier Paroz <github@oparoz.com>
  21. * @author Pellaeon Lin <nfsmwlin@gmail.com>
  22. * @author Robin Appelman <robin@icewind.nl>
  23. * @author Robin McCorkell <robin@mccorkell.me.uk>
  24. * @author Roeland Jago Douma <roeland@famdouma.nl>
  25. * @author Simon Könnecke <simonkoennecke@gmail.com>
  26. * @author Thomas Müller <thomas.mueller@tmit.eu>
  27. * @author Thomas Tanghus <thomas@tanghus.net>
  28. * @author Vincent Petry <pvince81@owncloud.com>
  29. *
  30. * @license AGPL-3.0
  31. *
  32. * This code is free software: you can redistribute it and/or modify
  33. * it under the terms of the GNU Affero General Public License, version 3,
  34. * as published by the Free Software Foundation.
  35. *
  36. * This program is distributed in the hope that it will be useful,
  37. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  38. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  39. * GNU Affero General Public License for more details.
  40. *
  41. * You should have received a copy of the GNU Affero General Public License, version 3,
  42. * along with this program. If not, see <http://www.gnu.org/licenses/>
  43. *
  44. */
  45. use Symfony\Component\Process\ExecutableFinder;
  46. /**
  47. * Collection of useful functions
  48. */
  49. class OC_Helper {
  50. private static $templateManager;
  51. /**
  52. * Creates an absolute url for public use
  53. * @param string $service id
  54. * @param bool $add_slash
  55. * @return string the url
  56. *
  57. * Returns a absolute url to the given service.
  58. */
  59. public static function linkToPublic($service, $add_slash = false) {
  60. if ($service === 'files') {
  61. $url = OC::$server->getURLGenerator()->getAbsoluteURL('/s');
  62. } else {
  63. $url = OC::$server->getURLGenerator()->getAbsoluteURL(OC::$server->getURLGenerator()->linkTo('', 'public.php').'?service='.$service);
  64. }
  65. return $url . (($add_slash && $service[strlen($service) - 1] != '/') ? '/' : '');
  66. }
  67. /**
  68. * Make a human file size
  69. * @param int $bytes file size in bytes
  70. * @return string a human readable file size
  71. *
  72. * Makes 2048 to 2 kB.
  73. */
  74. public static function humanFileSize($bytes) {
  75. if ($bytes < 0) {
  76. return "?";
  77. }
  78. if ($bytes < 1024) {
  79. return "$bytes B";
  80. }
  81. $bytes = round($bytes / 1024, 0);
  82. if ($bytes < 1024) {
  83. return "$bytes KB";
  84. }
  85. $bytes = round($bytes / 1024, 1);
  86. if ($bytes < 1024) {
  87. return "$bytes MB";
  88. }
  89. $bytes = round($bytes / 1024, 1);
  90. if ($bytes < 1024) {
  91. return "$bytes GB";
  92. }
  93. $bytes = round($bytes / 1024, 1);
  94. if ($bytes < 1024) {
  95. return "$bytes TB";
  96. }
  97. $bytes = round($bytes / 1024, 1);
  98. return "$bytes PB";
  99. }
  100. /**
  101. * Make a php file size
  102. * @param int $bytes file size in bytes
  103. * @return string a php parseable file size
  104. *
  105. * Makes 2048 to 2k and 2^41 to 2048G
  106. */
  107. public static function phpFileSize($bytes) {
  108. if ($bytes < 0) {
  109. return "?";
  110. }
  111. if ($bytes < 1024) {
  112. return $bytes . "B";
  113. }
  114. $bytes = round($bytes / 1024, 1);
  115. if ($bytes < 1024) {
  116. return $bytes . "K";
  117. }
  118. $bytes = round($bytes / 1024, 1);
  119. if ($bytes < 1024) {
  120. return $bytes . "M";
  121. }
  122. $bytes = round($bytes / 1024, 1);
  123. return $bytes . "G";
  124. }
  125. /**
  126. * Make a computer file size
  127. * @param string $str file size in human readable format
  128. * @return float a file size in bytes
  129. *
  130. * Makes 2kB to 2048.
  131. *
  132. * Inspired by: http://www.php.net/manual/en/function.filesize.php#92418
  133. */
  134. public static function computerFileSize($str) {
  135. $str = strtolower($str);
  136. if (is_numeric($str)) {
  137. return floatval($str);
  138. }
  139. $bytes_array = array(
  140. 'b' => 1,
  141. 'k' => 1024,
  142. 'kb' => 1024,
  143. 'mb' => 1024 * 1024,
  144. 'm' => 1024 * 1024,
  145. 'gb' => 1024 * 1024 * 1024,
  146. 'g' => 1024 * 1024 * 1024,
  147. 'tb' => 1024 * 1024 * 1024 * 1024,
  148. 't' => 1024 * 1024 * 1024 * 1024,
  149. 'pb' => 1024 * 1024 * 1024 * 1024 * 1024,
  150. 'p' => 1024 * 1024 * 1024 * 1024 * 1024,
  151. );
  152. $bytes = floatval($str);
  153. if (preg_match('#([kmgtp]?b?)$#si', $str, $matches) && !empty($bytes_array[$matches[1]])) {
  154. $bytes *= $bytes_array[$matches[1]];
  155. } else {
  156. return false;
  157. }
  158. $bytes = round($bytes);
  159. return $bytes;
  160. }
  161. /**
  162. * Recursive copying of folders
  163. * @param string $src source folder
  164. * @param string $dest target folder
  165. *
  166. */
  167. static function copyr($src, $dest) {
  168. if (is_dir($src)) {
  169. if (!is_dir($dest)) {
  170. mkdir($dest);
  171. }
  172. $files = scandir($src);
  173. foreach ($files as $file) {
  174. if ($file != "." && $file != "..") {
  175. self::copyr("$src/$file", "$dest/$file");
  176. }
  177. }
  178. } elseif (file_exists($src) && !\OC\Files\Filesystem::isFileBlacklisted($src)) {
  179. copy($src, $dest);
  180. }
  181. }
  182. /**
  183. * Recursive deletion of folders
  184. * @param string $dir path to the folder
  185. * @param bool $deleteSelf if set to false only the content of the folder will be deleted
  186. * @return bool
  187. */
  188. static function rmdirr($dir, $deleteSelf = true) {
  189. if (is_dir($dir)) {
  190. $files = new RecursiveIteratorIterator(
  191. new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS),
  192. RecursiveIteratorIterator::CHILD_FIRST
  193. );
  194. foreach ($files as $fileInfo) {
  195. /** @var SplFileInfo $fileInfo */
  196. if ($fileInfo->isLink()) {
  197. unlink($fileInfo->getPathname());
  198. } else if ($fileInfo->isDir()) {
  199. rmdir($fileInfo->getRealPath());
  200. } else {
  201. unlink($fileInfo->getRealPath());
  202. }
  203. }
  204. if ($deleteSelf) {
  205. rmdir($dir);
  206. }
  207. } elseif (file_exists($dir)) {
  208. if ($deleteSelf) {
  209. unlink($dir);
  210. }
  211. }
  212. if (!$deleteSelf) {
  213. return true;
  214. }
  215. return !file_exists($dir);
  216. }
  217. /**
  218. * @return \OC\Files\Type\TemplateManager
  219. */
  220. static public function getFileTemplateManager() {
  221. if (!self::$templateManager) {
  222. self::$templateManager = new \OC\Files\Type\TemplateManager();
  223. }
  224. return self::$templateManager;
  225. }
  226. /**
  227. * detect if a given program is found in the search PATH
  228. *
  229. * @param string $name
  230. * @param bool $path
  231. * @internal param string $program name
  232. * @internal param string $optional search path, defaults to $PATH
  233. * @return bool true if executable program found in path
  234. */
  235. public static function canExecute($name, $path = false) {
  236. // path defaults to PATH from environment if not set
  237. if ($path === false) {
  238. $path = getenv("PATH");
  239. }
  240. // we look for an executable file of that name
  241. $exts = [""];
  242. $check_fn = "is_executable";
  243. // Default check will be done with $path directories :
  244. $dirs = explode(PATH_SEPARATOR, $path);
  245. // WARNING : We have to check if open_basedir is enabled :
  246. $obd = OC::$server->getIniWrapper()->getString('open_basedir');
  247. if ($obd != "none") {
  248. $obd_values = explode(PATH_SEPARATOR, $obd);
  249. if (count($obd_values) > 0 and $obd_values[0]) {
  250. // open_basedir is in effect !
  251. // We need to check if the program is in one of these dirs :
  252. $dirs = $obd_values;
  253. }
  254. }
  255. foreach ($dirs as $dir) {
  256. foreach ($exts as $ext) {
  257. if ($check_fn("$dir/$name" . $ext))
  258. return true;
  259. }
  260. }
  261. return false;
  262. }
  263. /**
  264. * copy the contents of one stream to another
  265. *
  266. * @param resource $source
  267. * @param resource $target
  268. * @return array the number of bytes copied and result
  269. */
  270. public static function streamCopy($source, $target) {
  271. if (!$source or !$target) {
  272. return array(0, false);
  273. }
  274. $bufSize = 8192;
  275. $result = true;
  276. $count = 0;
  277. while (!feof($source)) {
  278. $buf = fread($source, $bufSize);
  279. $bytesWritten = fwrite($target, $buf);
  280. if ($bytesWritten !== false) {
  281. $count += $bytesWritten;
  282. }
  283. // note: strlen is expensive so only use it when necessary,
  284. // on the last block
  285. if ($bytesWritten === false
  286. || ($bytesWritten < $bufSize && $bytesWritten < strlen($buf))
  287. ) {
  288. // write error, could be disk full ?
  289. $result = false;
  290. break;
  291. }
  292. }
  293. return array($count, $result);
  294. }
  295. /**
  296. * Adds a suffix to the name in case the file exists
  297. *
  298. * @param string $path
  299. * @param string $filename
  300. * @return string
  301. */
  302. public static function buildNotExistingFileName($path, $filename) {
  303. $view = \OC\Files\Filesystem::getView();
  304. return self::buildNotExistingFileNameForView($path, $filename, $view);
  305. }
  306. /**
  307. * Adds a suffix to the name in case the file exists
  308. *
  309. * @param string $path
  310. * @param string $filename
  311. * @return string
  312. */
  313. public static function buildNotExistingFileNameForView($path, $filename, \OC\Files\View $view) {
  314. if ($path === '/') {
  315. $path = '';
  316. }
  317. if ($pos = strrpos($filename, '.')) {
  318. $name = substr($filename, 0, $pos);
  319. $ext = substr($filename, $pos);
  320. } else {
  321. $name = $filename;
  322. $ext = '';
  323. }
  324. $newpath = $path . '/' . $filename;
  325. if ($view->file_exists($newpath)) {
  326. if (preg_match_all('/\((\d+)\)/', $name, $matches, PREG_OFFSET_CAPTURE)) {
  327. //Replace the last "(number)" with "(number+1)"
  328. $last_match = count($matches[0]) - 1;
  329. $counter = $matches[1][$last_match][0] + 1;
  330. $offset = $matches[0][$last_match][1];
  331. $match_length = strlen($matches[0][$last_match][0]);
  332. } else {
  333. $counter = 2;
  334. $match_length = 0;
  335. $offset = false;
  336. }
  337. do {
  338. if ($offset) {
  339. //Replace the last "(number)" with "(number+1)"
  340. $newname = substr_replace($name, '(' . $counter . ')', $offset, $match_length);
  341. } else {
  342. $newname = $name . ' (' . $counter . ')';
  343. }
  344. $newpath = $path . '/' . $newname . $ext;
  345. $counter++;
  346. } while ($view->file_exists($newpath));
  347. }
  348. return $newpath;
  349. }
  350. /**
  351. * Returns an array with all keys from input lowercased or uppercased. Numbered indices are left as is.
  352. *
  353. * @param array $input The array to work on
  354. * @param int $case Either MB_CASE_UPPER or MB_CASE_LOWER (default)
  355. * @param string $encoding The encoding parameter is the character encoding. Defaults to UTF-8
  356. * @return array
  357. *
  358. * Returns an array with all keys from input lowercased or uppercased. Numbered indices are left as is.
  359. * based on http://www.php.net/manual/en/function.array-change-key-case.php#107715
  360. *
  361. */
  362. public static function mb_array_change_key_case($input, $case = MB_CASE_LOWER, $encoding = 'UTF-8') {
  363. $case = ($case != MB_CASE_UPPER) ? MB_CASE_LOWER : MB_CASE_UPPER;
  364. $ret = array();
  365. foreach ($input as $k => $v) {
  366. $ret[mb_convert_case($k, $case, $encoding)] = $v;
  367. }
  368. return $ret;
  369. }
  370. /**
  371. * performs a search in a nested array
  372. * @param array $haystack the array to be searched
  373. * @param string $needle the search string
  374. * @param string $index optional, only search this key name
  375. * @return mixed the key of the matching field, otherwise false
  376. *
  377. * performs a search in a nested array
  378. *
  379. * taken from http://www.php.net/manual/en/function.array-search.php#97645
  380. */
  381. public static function recursiveArraySearch($haystack, $needle, $index = null) {
  382. $aIt = new RecursiveArrayIterator($haystack);
  383. $it = new RecursiveIteratorIterator($aIt);
  384. while ($it->valid()) {
  385. if (((isset($index) AND ($it->key() == $index)) OR (!isset($index))) AND ($it->current() == $needle)) {
  386. return $aIt->key();
  387. }
  388. $it->next();
  389. }
  390. return false;
  391. }
  392. /**
  393. * calculates the maximum upload size respecting system settings, free space and user quota
  394. *
  395. * @param string $dir the current folder where the user currently operates
  396. * @param int $freeSpace the number of bytes free on the storage holding $dir, if not set this will be received from the storage directly
  397. * @return int number of bytes representing
  398. */
  399. public static function maxUploadFilesize($dir, $freeSpace = null) {
  400. if (is_null($freeSpace) || $freeSpace < 0){
  401. $freeSpace = self::freeSpace($dir);
  402. }
  403. return min($freeSpace, self::uploadLimit());
  404. }
  405. /**
  406. * Calculate free space left within user quota
  407. *
  408. * @param string $dir the current folder where the user currently operates
  409. * @return int number of bytes representing
  410. */
  411. public static function freeSpace($dir) {
  412. $freeSpace = \OC\Files\Filesystem::free_space($dir);
  413. if ($freeSpace < \OCP\Files\FileInfo::SPACE_UNLIMITED) {
  414. $freeSpace = max($freeSpace, 0);
  415. return $freeSpace;
  416. } else {
  417. return (INF > 0)? INF: PHP_INT_MAX; // work around https://bugs.php.net/bug.php?id=69188
  418. }
  419. }
  420. /**
  421. * Calculate PHP upload limit
  422. *
  423. * @return int PHP upload file size limit
  424. */
  425. public static function uploadLimit() {
  426. $ini = \OC::$server->getIniWrapper();
  427. $upload_max_filesize = OCP\Util::computerFileSize($ini->get('upload_max_filesize'));
  428. $post_max_size = OCP\Util::computerFileSize($ini->get('post_max_size'));
  429. if ((int)$upload_max_filesize === 0 and (int)$post_max_size === 0) {
  430. return INF;
  431. } elseif ((int)$upload_max_filesize === 0 or (int)$post_max_size === 0) {
  432. return max($upload_max_filesize, $post_max_size); //only the non 0 value counts
  433. } else {
  434. return min($upload_max_filesize, $post_max_size);
  435. }
  436. }
  437. /**
  438. * Checks if a function is available
  439. *
  440. * @param string $function_name
  441. * @return bool
  442. */
  443. public static function is_function_enabled($function_name) {
  444. if (!function_exists($function_name)) {
  445. return false;
  446. }
  447. $ini = \OC::$server->getIniWrapper();
  448. $disabled = explode(',', $ini->get('disable_functions'));
  449. $disabled = array_map('trim', $disabled);
  450. if (in_array($function_name, $disabled)) {
  451. return false;
  452. }
  453. $disabled = explode(',', $ini->get('suhosin.executor.func.blacklist'));
  454. $disabled = array_map('trim', $disabled);
  455. if (in_array($function_name, $disabled)) {
  456. return false;
  457. }
  458. return true;
  459. }
  460. /**
  461. * Try to find a program
  462. *
  463. * @param string $program
  464. * @return null|string
  465. */
  466. public static function findBinaryPath($program) {
  467. $memcache = \OC::$server->getMemCacheFactory()->create('findBinaryPath');
  468. if ($memcache->hasKey($program)) {
  469. return $memcache->get($program);
  470. }
  471. $result = null;
  472. if (self::is_function_enabled('exec')) {
  473. $exeSniffer = new ExecutableFinder();
  474. // Returns null if nothing is found
  475. $result = $exeSniffer->find($program);
  476. if (empty($result)) {
  477. $paths = getenv('PATH');
  478. if (empty($paths)) {
  479. $paths = '/usr/local/bin /usr/bin /opt/bin /bin';
  480. } else {
  481. $paths = str_replace(':',' ',getenv('PATH'));
  482. }
  483. $command = 'find ' . $paths . ' -name ' . escapeshellarg($program) . ' 2> /dev/null';
  484. exec($command, $output, $returnCode);
  485. if (count($output) > 0) {
  486. $result = escapeshellcmd($output[0]);
  487. }
  488. }
  489. }
  490. // store the value for 5 minutes
  491. $memcache->set($program, $result, 300);
  492. return $result;
  493. }
  494. /**
  495. * Calculate the disc space for the given path
  496. *
  497. * @param string $path
  498. * @param \OCP\Files\FileInfo $rootInfo (optional)
  499. * @return array
  500. * @throws \OCP\Files\NotFoundException
  501. */
  502. public static function getStorageInfo($path, $rootInfo = null) {
  503. // return storage info without adding mount points
  504. $includeExtStorage = \OC::$server->getSystemConfig()->getValue('quota_include_external_storage', false);
  505. if (!$rootInfo) {
  506. $rootInfo = \OC\Files\Filesystem::getFileInfo($path, false);
  507. }
  508. if (!$rootInfo instanceof \OCP\Files\FileInfo) {
  509. throw new \OCP\Files\NotFoundException();
  510. }
  511. $used = $rootInfo->getSize();
  512. if ($used < 0) {
  513. $used = 0;
  514. }
  515. $quota = \OCP\Files\FileInfo::SPACE_UNLIMITED;
  516. $storage = $rootInfo->getStorage();
  517. $sourceStorage = $storage;
  518. if ($storage->instanceOfStorage('\OCA\Files_Sharing\SharedStorage')) {
  519. $includeExtStorage = false;
  520. $sourceStorage = $storage->getSourceStorage();
  521. }
  522. if ($includeExtStorage) {
  523. if ($storage->instanceOfStorage('\OC\Files\Storage\Home')
  524. || $storage->instanceOfStorage('\OC\Files\ObjectStore\HomeObjectStoreStorage')
  525. ) {
  526. /** @var \OC\Files\Storage\Home $storage */
  527. $user = $storage->getUser();
  528. } else {
  529. $user = \OC::$server->getUserSession()->getUser()->getUID();
  530. }
  531. if ($user) {
  532. $quota = OC_Util::getUserQuota($user);
  533. } else {
  534. $quota = \OCP\Files\FileInfo::SPACE_UNLIMITED;
  535. }
  536. if ($quota !== \OCP\Files\FileInfo::SPACE_UNLIMITED) {
  537. // always get free space / total space from root + mount points
  538. return self::getGlobalStorageInfo();
  539. }
  540. }
  541. // TODO: need a better way to get total space from storage
  542. if ($sourceStorage->instanceOfStorage('\OC\Files\Storage\Wrapper\Quota')) {
  543. /** @var \OC\Files\Storage\Wrapper\Quota $storage */
  544. $quota = $sourceStorage->getQuota();
  545. }
  546. $free = $sourceStorage->free_space($rootInfo->getInternalPath());
  547. if ($free >= 0) {
  548. $total = $free + $used;
  549. } else {
  550. $total = $free; //either unknown or unlimited
  551. }
  552. if ($total > 0) {
  553. if ($quota > 0 && $total > $quota) {
  554. $total = $quota;
  555. }
  556. // prevent division by zero or error codes (negative values)
  557. $relative = round(($used / $total) * 10000) / 100;
  558. } else {
  559. $relative = 0;
  560. }
  561. $ownerId = $storage->getOwner($path);
  562. $ownerDisplayName = '';
  563. $owner = \OC::$server->getUserManager()->get($ownerId);
  564. if($owner) {
  565. $ownerDisplayName = $owner->getDisplayName();
  566. }
  567. return [
  568. 'free' => $free,
  569. 'used' => $used,
  570. 'quota' => $quota,
  571. 'total' => $total,
  572. 'relative' => $relative,
  573. 'owner' => $ownerId,
  574. 'ownerDisplayName' => $ownerDisplayName,
  575. ];
  576. }
  577. /**
  578. * Get storage info including all mount points and quota
  579. *
  580. * @return array
  581. */
  582. private static function getGlobalStorageInfo() {
  583. $quota = OC_Util::getUserQuota(\OCP\User::getUser());
  584. $rootInfo = \OC\Files\Filesystem::getFileInfo('', 'ext');
  585. $used = $rootInfo['size'];
  586. if ($used < 0) {
  587. $used = 0;
  588. }
  589. $total = $quota;
  590. $free = $quota - $used;
  591. if ($total > 0) {
  592. if ($quota > 0 && $total > $quota) {
  593. $total = $quota;
  594. }
  595. // prevent division by zero or error codes (negative values)
  596. $relative = round(($used / $total) * 10000) / 100;
  597. } else {
  598. $relative = 0;
  599. }
  600. return array('free' => $free, 'used' => $used, 'total' => $total, 'relative' => $relative);
  601. }
  602. /**
  603. * Returns whether the config file is set manually to read-only
  604. * @return bool
  605. */
  606. public static function isReadOnlyConfigEnabled() {
  607. return \OC::$server->getConfig()->getSystemValue('config_is_read_only', false);
  608. }
  609. }