[FATAL ERROR] Configuration d'utilisateur [DEMANDE D'AIDE] [Réglé]
Fatal error: Call to undefined method ThemeManager::get_activated_and_autho
Support Général
kevin140211 Membre non connecté
Booster Fronde
-
Booster Fronde
- Voir le profil du membre kevin140211
- Inscrit le : 18/10/2012
- Site internet
Fatal error: Call to undefined method ThemeManager::get_activated_and_authorized_themes_map() in /var/www/legtux.org/users/actu-rap-belge/admin/member/controllers/AdminMemberEditController.class.php on line 118
Merci d'avance.
Édité par kevin140211 Le 09/02/2013 à 19h49
ReidLos Membre non connecté
-
Modérateur
- Voir le profil du membre ReidLos
- Inscrit le : 27/02/2009
- Site internet
- Groupes :
-
Equipe Développement
Peux tu me coller le fichier /kernel/framework/phpboost/theme/ThemeManager.class.php s'il te plait ?
ReidLos
kevin140211 Membre non connecté
Booster Fronde
-
Booster Fronde
- Voir le profil du membre kevin140211
- Inscrit le : 18/10/2012
- Site internet
voici le contenu du fichier que vous m'avez demandé :
Code BBCODE :
<?php
class ThemeManager
{
private static $error=null;
public static function get_installed_themes_map()
{
return ThemesConfig::load()->get_themes();
}
public static function get_activated_themes_map()
{
$activated_themes=array();
foreach(ThemesConfig::load()->get_themes()as $theme){
if($theme->is_activated()){
$activated_themes[$theme->get_id()]=$theme;
}
}
return $activated_themes;
}
public static function get_default_theme()
{
return UserAccountsConfig::load()->get_default_theme();
}
public static function get_theme($theme_id)
{
return ThemesConfig::load()->get_theme($theme_id);
}
public static function get_theme_existed($theme_id)
{
if(ThemesConfig::load()->get_theme($theme_id)!==null)
{
return true;
}
return false;
}
public static function install($theme_id,$authorizations=array(),$enable_theme=true)
{
if(!empty($theme_id)&&!self::get_theme_existed($theme_id))
{
$theme=new Theme($theme_id,$authorizations,$enable_theme);
$configuration=$theme->get_configuration();
$theme->set_columns_disabled($configuration->get_columns_disabled());
$phpboost_version=GeneralConfig::load()->get_phpboost_major_version();
if(version_compare($phpboost_version,$configuration->get_compatibility(),'>'))
{
self::$error=LangLoader::get_message('themes.not_compatible','admin-themes-common');
}
ThemesConfig::load()->add_theme($theme);
ThemesConfig::save();
}
else
{
self::$error=LangLoader::get_message('themes.already_exist','admin-themes-common');
}
}
public static function uninstall($theme_id,$drop_files=false)
{
if(!empty($theme_id)&&self::get_theme_existed($theme_id))
{
$default_theme=self::get_default_theme();
if(self::get_theme($theme_id)->get_id()!==$default_theme)
{
PersistenceContext::get_querier()->update(DB_TABLE_MEMBER,array('user_theme'=>$default_theme),
'WHERE user_theme=:old_user_theme',array('old_user_theme'=>$theme_id
));
ThemesConfig::load()->remove_theme_by_id($theme_id);
ThemesConfig::save();
if($drop_files)
{
$folder=new Folder(PATH_TO_ROOT.'/templates/'.$theme_id);
$folder->delete();
}
}
}
}
public static function change_visibility($theme_id,$visibility)
{
if(!empty($theme_id)&&self::get_theme_existed($theme_id))
{
$theme=ThemesConfig::load()->get_theme($theme_id);
$theme->set_activated($visibility);
ThemesConfig::load()->update($theme);
ThemesConfig::save();
}
}
public static function change_authorizations($theme_id,Array $authorizations)
{
if(!empty($theme_id)&&self::get_theme_existed($theme_id))
{
$theme=ThemesConfig::load()->get_theme($theme_id);
$theme->set_authorizations($authorizations);
ThemesConfig::load()->update($theme);
ThemesConfig::save();
}
}
public static function change_informations($theme_id,$visibility,Array $authorizations=array(),$columns_disabled=null)
{
if(!empty($theme_id)&&self::get_theme_existed($theme_id))
{
$theme=ThemesConfig::load()->get_theme($theme_id);
$theme->set_activated($visibility);
if(!empty($authorizations))
{
$theme->set_authorizations($authorizations);
}
if($columns_disabled!==null)
{
$theme->set_columns_disabled($columns_disabled);
}
ThemesConfig::load()->update($theme);
ThemesConfig::save();
}
}
public static function change_columns_disabled($theme_id,ColumnsDisabled $columns_disabled)
{
if(!empty($theme_id)&&self::get_theme_existed($theme_id))
{
$theme=ThemesConfig::load()->get_theme($theme_id);
$theme->set_columns_disabled($columns_disabled);
ThemesConfig::load()->update($theme);
ThemesConfig::save();
}
}
public static function change_customize_interface($theme_id,CustomizeInterface $customize_interface)
{
if(!empty($theme_id)&&self::get_theme_existed($theme_id))
{
$theme=ThemesConfig::load()->get_theme($theme_id);
$theme->set_customize_interface($customize_interface);
ThemesConfig::load()->update($theme);
ThemesConfig::save();
}
}
public static function get_error()
{
return self::$error;
}
}
?>ReidLos Membre non connecté
-
Modérateur
- Voir le profil du membre ReidLos
- Inscrit le : 27/02/2009
- Site internet
- Groupes :
-
Equipe Développement
kevin140211 Membre non connecté
Booster Fronde
-
Booster Fronde
- Voir le profil du membre kevin140211
- Inscrit le : 18/10/2012
- Site internet
kevin140211 Membre non connecté
Booster Fronde
-
Booster Fronde
- Voir le profil du membre kevin140211
- Inscrit le : 18/10/2012
- Site internet
Mon problème est résolu.
Merci de votre aide.
Répondre
Vous n'êtes pas autorisé à écrire dans cette catégorie