Project

General

Profile

1
<?php
2
/**
3
 *
4
 * @category        admin
5
 * @package         media
6
 * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
7
 * @copyright       2009-2012, WebsiteBaker 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: parameters.php 1819 2012-11-16 21:34:00Z Luisehahne $
13
 * @filesource		$HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/admin/media/parameters.php $
14
 * @lastmodified    $Date: 2012-11-16 22:34:00 +0100 (Fri, 16 Nov 2012) $
15
 *
16
 */
17

    
18
// Must include code to stop this file being access directly
19
if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
20

    
21
function __unserialize($sObject) {  // found in php manual :-)
22
    if($sObject=='') { return array( 'global' => array( 'admin_only' => false,'show_thumbs' => false ) );}
23
	$__ret = preg_replace('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':\"$2\";'", $sObject );
24
	return unserialize($__ret);
25
}
26

    
27
$pathsettings = array( 'global' => array( 'admin_only' => false,'show_thumbs' => false ) );
28
if(DEFAULT_THEME != '') {
29
	$query = $database->query ( "SELECT * FROM ".TABLE_PREFIX."settings where `name`='mediasettings'" );
30
	if ($query && $query->numRows() > 0) {
31
		$settings = $query->fetchRow();
32
		$pathsettings = __unserialize($settings['value']);
33
	} else {
34
		$database->query ( "INSERT INTO ".TABLE_PREFIX."settings (`name`,`value`) VALUES ('mediasettings','')" );
35
	}
36
}
(9-9/14)