Skip to content

Commit bb79e51

Browse files
committed
1 parent 44b73ee commit bb79e51

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

phpmyfaq/admin/record.filemanager.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
/**
3+
* Frontend for uploaded images
4+
*
5+
* PHP Version 5.4
6+
*
7+
* This Source Code Form is subject to the terms of the Mozilla Public License,
8+
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
9+
* obtain one at http://mozilla.org/MPL/2.0/.
10+
*
11+
* @category phpMyFAQ
12+
* @package Administration
13+
* @author Thorsten Rinne <[email protected]>
14+
* @copyright 2014 phpMyFAQ Team
15+
* @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
16+
* @link http://www.phpmyfaq.de
17+
* @since 2014-04-21
18+
*/
19+
20+
if (!defined('IS_VALID_PHPMYFAQ')) {
21+
$protocol = 'http';
22+
if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){
23+
$protocol = 'https';
24+
}
25+
header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']));
26+
exit();
27+
}
28+
29+
$rootPath = dirname(dirname(__DIR__)) . 'images/';
30+
$fileSystem = new PMF_Filesystem($rootPath);

0 commit comments

Comments
 (0)