| 1 | 
        
            1035
         | 
        
            Ruebenwurz
         | 
        <?php
  | 
      
      
        | 2 | 
        
            1400
         | 
        
            FrankH
         | 
        /**
  | 
      
      
        | 3 | 
        
         | 
        
         | 
         *
  | 
      
      
        | 4 | 
        
         | 
        
         | 
         * @category        admin
  | 
      
      
        | 5 | 
        
            1476
         | 
        
            Luisehahne
         | 
         * @package         media
  | 
      
      
        | 6 | 
        
            1819
         | 
        
            Luisehahne
         | 
         * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
  | 
      
      
        | 7 | 
        
         | 
        
         | 
         * @copyright       2009-2012, WebsiteBaker Org. e.V.
  | 
      
      
        | 8 | 
        
            1400
         | 
        
            FrankH
         | 
         * @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 | 
        
            1818
         | 
        
            Luisehahne
         | 
         * @filesource		$HeadURL$
  | 
      
      
        | 14 | 
        
         | 
        
         | 
         * @lastmodified    $Date$
  | 
      
      
        | 15 | 
        
            1400
         | 
        
            FrankH
         | 
         *
  | 
      
      
        | 16 | 
        
         | 
        
         | 
         */
  | 
      
      
        | 17 | 
        
            1035
         | 
        
            Ruebenwurz
         | 
        
  | 
      
      
        | 18 | 
        
            1824
         | 
        
            Luisehahne
         | 
        /* -------------------------------------------------------- */
  | 
      
      
        | 19 | 
        
         | 
        
         | 
        // Must include code to stop this file being accessed directly
  | 
      
      
        | 20 | 
        
         | 
        
         | 
        if(!defined('WB_URL')) {
 | 
      
      
        | 21 | 
        
         | 
        
         | 
        	require_once(dirname(dirname(dirname(__FILE__))).'/framework/globalExceptionHandler.php');
  | 
      
      
        | 22 | 
        
         | 
        
         | 
        	throw new IllegalFileException();
  | 
      
      
        | 23 | 
        
         | 
        
         | 
        }
  | 
      
      
        | 24 | 
        
         | 
        
         | 
        /* -------------------------------------------------------- */
  | 
      
      
        | 25 | 
        
            1473
         | 
        
            Luisehahne
         | 
        
  | 
      
      
        | 26 | 
        
            1035
         | 
        
            Ruebenwurz
         | 
        function __unserialize($sObject) {  // found in php manual :-)
 | 
      
      
        | 27 | 
        
            1818
         | 
        
            Luisehahne
         | 
            if($sObject=='') { return array( 'global' => array( 'admin_only' => false,'show_thumbs' => false ) );}
 | 
      
      
        | 28 | 
        
         | 
        
         | 
        	$__ret = preg_replace('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':\"$2\";'", $sObject );
 | 
      
      
        | 29 | 
        
            1035
         | 
        
            Ruebenwurz
         | 
        	return unserialize($__ret);
  | 
      
      
        | 30 | 
        
         | 
        
         | 
        }
  | 
      
      
        | 31 | 
        
            1818
         | 
        
            Luisehahne
         | 
        
  | 
      
      
        | 32 | 
        
         | 
        
         | 
        $pathsettings = array( 'global' => array( 'admin_only' => false,'show_thumbs' => false ) );
  | 
      
      
        | 33 | 
        
         | 
        
         | 
        if(DEFAULT_THEME != '') {
 | 
      
      
        | 34 | 
        
            1476
         | 
        
            Luisehahne
         | 
        	$query = $database->query ( "SELECT * FROM ".TABLE_PREFIX."settings where `name`='mediasettings'" );
  | 
      
      
        | 35 | 
        
         | 
        
         | 
        	if ($query && $query->numRows() > 0) {
 | 
      
      
        | 36 | 
        
         | 
        
         | 
        		$settings = $query->fetchRow();
  | 
      
      
        | 37 | 
        
         | 
        
         | 
        		$pathsettings = __unserialize($settings['value']);
  | 
      
      
        | 38 | 
        
         | 
        
         | 
        	} else {
 | 
      
      
        | 39 | 
        
         | 
        
         | 
        		$database->query ( "INSERT INTO ".TABLE_PREFIX."settings (`name`,`value`) VALUES ('mediasettings','')" );
 | 
      
      
        | 40 | 
        
         | 
        
         | 
        	}
  | 
      
      
        | 41 | 
        
            1035
         | 
        
            Ruebenwurz
         | 
        }
  |