Project

General

Profile

1 1035 Ruebenwurz
<?php
2 1400 FrankH
/**
3
 *
4
 * @category        admin
5 1476 Luisehahne
 * @package         media
6 1400 FrankH
 * @author          WebsiteBaker Project
7
 * @copyright       2004-2009, Ryan Djurovich
8
 * @copyright       2009-2011, Website Baker Org. e.V.
9
 * @link			http://www.websitebaker2.org/
10
 * @license         http://www.gnu.org/licenses/gpl.html
11
 * @platform        WebsiteBaker 2.8.x
12
 * @requirements    PHP 5.2.2 and higher
13
 * @version         $Id$
14
 * @filesource		$HeadURL:  $
15
 * @lastmodified    $Date:  $
16
 *
17
 */
18 1035 Ruebenwurz
19 1473 Luisehahne
// Must include code to stop this file being access directly
20
if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
21
22 1035 Ruebenwurz
function __unserialize($sObject) {  // found in php manual :-)
23
	$__ret =preg_replace('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':\"$2\";'", $sObject );
24
	return unserialize($__ret);
25
}
26
$pathsettings = array();
27 1476 Luisehahne
if(DEFAULT_THEME != ' wb_theme') {
28
	$query = $database->query ( "SELECT * FROM ".TABLE_PREFIX."settings where `name`='mediasettings'" );
29
	if ($query && $query->numRows() > 0) {
30
		$settings = $query->fetchRow();
31
		$pathsettings = __unserialize($settings['value']);
32
	} else {
33
		$database->query ( "INSERT INTO ".TABLE_PREFIX."settings (`name`,`value`) VALUES ('mediasettings','')" );
34
	}
35 1035 Ruebenwurz
}