Project

General

Profile

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