本文整理匯總了PHP中Preference::fix_preferences方法的典型用法代碼示例。如果您正苦於以下問題:PHP Preference::fix_preferences方法的具體用法?PHP Preference::fix_preferences怎麽用?PHP Preference::fix_preferences使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Preference
的用法示例。
在下文中一共展示了Preference::fix_preferences方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
$results['cookie_secure'] = $results['session_cookiesecure'];
// Library and module includes we can't do with the autoloader
require_once $prefix . '/modules/getid3/getid3.php';
require_once $prefix . '/modules/phpmailer/class.phpmailer.php';
require_once $prefix . '/modules/phpmailer/class.smtp.php';
require_once $prefix . '/modules/infotools/AmazonSearchEngine.class.php';
require_once $prefix . '/modules/infotools/lastfm.class.php';
require_once $prefix . '/modules/musicbrainz/MusicBrainz.php';
require_once $prefix . '/modules/musicbrainz/Exception.php';
require_once $prefix . '/modules/musicbrainz/Clients/MbClient.php';
require_once $prefix . '/modules/musicbrainz/Clients/RequestsMbClient.php';
require_once $prefix . '/modules/ampacheapi/AmpacheApi.lib.php';
require_once $prefix . '/modules/EchoNest/Autoloader.php';
EchoNest_Autoloader::register();
/* Temp Fixes */
$results = Preference::fix_preferences($results);
AmpConfig::set_by_array($results, true);
// Modules (These are conditionally included depending upon config values)
if (AmpConfig::get('ratings')) {
require_once $prefix . '/lib/rating.lib.php';
}
/* Set a new Error Handler */
$old_error_handler = set_error_handler('ampache_error_handler');
/* Check their PHP Vars to make sure we're cool here */
$post_size = @ini_get('post_max_size');
if (substr($post_size, strlen($post_size) - 1, strlen($post_size)) != 'M') {
/* Sane value time */
ini_set('post_max_size', '8M');
}
// In case the local setting is 0
ini_set('session.gc_probability', '5');