Project

General

Profile

« Previous | Next » 

Revision 2098

Added by darkviper almost 11 years ago

! activate class Translate for all addons in admin/ (except pages/)
! class.admin >> add translation of the current theme to Translate

View differences:

parameters.php
28 28
	$__ret = preg_replace('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':\"$2\";'", $sObject );
29 29
	return unserialize($__ret);
30 30
}
31

  
31
$oDb = WbDatabase::getInstance();
32 32
$pathsettings = array( 'global' => array( 'admin_only' => false,'show_thumbs' => false ) );
33 33
if(DEFAULT_THEME != '') {
34
	$query = $database->query ( "SELECT * FROM ".TABLE_PREFIX."settings where `name`='mediasettings'" );
35
	if ($query && $query->numRows() > 0) {
36
		$settings = $query->fetchRow();
34
	$sql = 'SELECT * FROM `'.$oDb->TablePrefix.'settings` '
35
         . 'WHERE `name`=\'mediasettings\'';
36
	$query = $oDb->doQuery($sql);
37
    if ($query && (($settings = $query->fetchRow(MYSQL_ASSOC)))) {
37 38
		$pathsettings = __unserialize($settings['value']);
38 39
	} else {
39
		$database->query ( "INSERT INTO ".TABLE_PREFIX."settings (`name`,`value`) VALUES ('mediasettings','')" );
40
		$sql = 'INSERT INTO `'.$oDb->TablePrefix.'settings` '
41
             . 'SET `name`=\'mediasettings\', '
42
             .     '`value`=\'\'';
43
		$oDb->doQuery($sql);
40 44
	}
41 45
}

Also available in: Unified diff