Revision 282
Added by stefan almost 20 years ago
| trunk/wb/admin/media/browse.php | ||
|---|---|---|
| 48 | 48 |
$admin->print_error($MESSAGE['MEDIA']['DIR_DOT_DOT_SLASH']); |
| 49 | 49 |
} |
| 50 | 50 |
|
| 51 |
if(!file_exists(WB_PATH.'/media'.$directory)) {
|
|
| 51 |
if(!file_exists(WB_PATH.MEDIA_DIRECTORY.$directory)) {
|
|
| 52 | 52 |
$admin->print_header(); |
| 53 | 53 |
$admin->print_error($MESSAGE['MEDIA']['DIR_DOES_NOT_EXIST']); |
| 54 | 54 |
} |
| trunk/wb/modules/htmlarea/include.php | ||
|---|---|---|
| 23 | 23 |
|
| 24 | 24 |
*/ |
| 25 | 25 |
|
| 26 |
$WB_DIRECTORY = substr(WB_PATH, strlen($_SERVER['DOCUMENT_ROOT'])).'/media/';
|
|
| 26 |
$WB_DIRECTORY = substr(WB_PATH, strlen($_SERVER['DOCUMENT_ROOT'])).MEDIA_DIRECTORY.'/';
|
|
| 27 | 27 |
|
| 28 | 28 |
?> |
| 29 | 29 |
|
| trunk/wb/modules/htmlarea/htmlarea/popups/link.php | ||
|---|---|---|
| 38 | 38 |
// Get the directory to browse |
| 39 | 39 |
$directory = $admin->get_post('folder');
|
| 40 | 40 |
if($directory == '') {
|
| 41 |
$directory = '/media';
|
|
| 41 |
$directory = MEDIA_DIRECTORY;
|
|
| 42 | 42 |
} |
| 43 | 43 |
// If the directory contains ../ then set it to /media |
| 44 | 44 |
if(strstr($directory, '../')) {
|
| 45 |
$directory = '/media';
|
|
| 45 |
$directory = MEDIA_DIRECTORY;
|
|
| 46 | 46 |
} |
| 47 | 47 |
|
| 48 | 48 |
// Include the WB functions file |
| trunk/wb/modules/htmlarea/htmlarea/popups/insert_image.php | ||
|---|---|---|
| 38 | 38 |
// Get the directory to browse |
| 39 | 39 |
$directory = $admin->get_post('folder');
|
| 40 | 40 |
if($directory == '') {
|
| 41 |
$directory = '/media';
|
|
| 41 |
$directory = MEDIA_DIRECTORY;
|
|
| 42 | 42 |
} |
| 43 | 43 |
// If the directory contains ../ then set it to /media |
| 44 | 44 |
if(strstr($directory, '../')) {
|
| 45 |
$directory = '/media';
|
|
| 45 |
$directory = MEDIA_DIRECTORY;
|
|
| 46 | 46 |
} |
| 47 | 47 |
|
| 48 | 48 |
// Include the WB functions file |
| trunk/wb/modules/htmlarea/htmlarea/popups/list_media.php | ||
|---|---|---|
| 44 | 44 |
// Get the directory to browse |
| 45 | 45 |
$directory = $admin->get_get('folder');
|
| 46 | 46 |
if($directory == '') {
|
| 47 |
$directory = '/media';
|
|
| 47 |
$directory = MEDIA_DIRECTORY;
|
|
| 48 | 48 |
} |
| 49 | 49 |
// If the directory contains ../ then set it to /media |
| 50 | 50 |
if(strstr($directory, '../')) {
|
| 51 |
$directory = '/media';
|
|
| 51 |
$directory = MEDIA_DIRECTORY;
|
|
| 52 | 52 |
} |
| 53 | 53 |
|
| 54 | 54 |
// Insert files into the file list |
| trunk/wb/config.php | ||
|---|---|---|
| 1 |
<?php ?> |
|
| 1 |
<?php |
|
| 2 |
|
|
| 3 |
error_reporting(E_ALL); |
|
| 4 |
|
|
| 5 |
define('DB_TYPE', 'mysql');
|
|
| 6 |
define('DB_HOST', 'localhost');
|
|
| 7 |
define('DB_USERNAME', 'root');
|
|
| 8 |
define('DB_PASSWORD', '');
|
|
| 9 |
define('DB_NAME', 'wb');
|
|
| 10 |
define('TABLE_PREFIX', 'test');
|
|
| 11 |
|
|
| 12 |
define('WB_PATH', dirname(__FILE__));
|
|
| 13 |
define('WB_URL', 'http://localhost/wbsvn/wb');
|
|
| 14 |
define('ADMIN_PATH', WB_PATH.'/admin');
|
|
| 15 |
define('ADMIN_URL', 'http://localhost/wbsvn/wb/admin');
|
|
| 16 |
|
|
| 17 |
require_once(WB_PATH.'/framework/initialize.php'); |
|
| 18 |
|
|
| 19 |
?> |
|
Also available in: Unified diff
Replaced all remaining occurrences of '/media' by MEDIA_DIRECTORY - bug #108.