Verzeichnisstruktur phpBB-3.2.0
- Veröffentlicht
- 06.01.2017
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
timeout_check.php
01 <?php
02 /**
03 *
04 * This file is part of the phpBB Forum Software package.
05 *
06 * @copyright (c) phpBB Limited <https://www.phpbb.com>
07 * @license GNU General Public License, version 2 (GPL-2.0)
08 *
09 * For full copyright and license information, please see
10 * the docs/CREDITS.txt file.
11 *
12 */
13
14 namespace phpbb\install\controller;
15
16 use Symfony\Component\HttpFoundation\JsonResponse;
17
18 class timeout_check
19 {
20 /**
21 * @var helper
22 */
23 protected $helper;
24
25 /**
26 * @var string
27 */
28 protected $phpbb_root_path;
29
30 /**
31 * Constructor
32 *
33 * @param helper $helper
34 * @param string $phpbb_root_path
35 */
36 public function __construct(helper $helper, $phpbb_root_path)
37 {
38 $this->helper = $helper;
39 $this->phpbb_root_path = $phpbb_root_path;
40 }
41
42 /**
43 * Controller for querying installer status
44 */
45 public function status()
46 {
47 $lock_file = $this->phpbb_root_path . 'store/io_lock.lock';
48 $response = new JsonResponse();
49
50 if (!file_exists($lock_file))
51 {
52 $response->setData(array(
53 'status' => 'fail',
54 ));
55 }
56 else
57 {
58 $fp = @fopen($lock_file, 'r');
59
60 if ($fp && flock($fp, LOCK_EX | LOCK_NB))
61 {
62 $status = (filesize($lock_file) >= 2 && fread($fp, 2) === 'ok') ? 'continue' : 'fail';
63
64 $response->setData(array(
65 'status' => $status,
66 ));
67 flock($fp, LOCK_UN);
68 fclose($fp);
69 }
70 else
71 {
72 $response->setData(array(
73 'status' => 'running',
74 ));
75 }
76 }
77
78 return $response;
79 }
80 }
81