Skip to content
Snippets Groups Projects

Dev#73871 minsoc xlst etape 2 association fichier xslt

Closed Ghislain Loas requested to merge dev#73871_minsoc_xlst_etape_2_association_fichier_xslt into WIP
Viewing commit 45fc671b
Show latest version
4 files
+ 169
6
Preferences
Compare changes
Files
4
@@ -98,7 +98,6 @@ class Class_FileManager_ModelRelation {
class Class_FileManager_ModelRelationText extends Class_FileManager_ModelRelation {
protected function _generateValue($model, $previous, $new) {
return str_replace($previous, $new,
call_user_func([$model, 'callGetterByAttributeName'], $this->_field));
@@ -117,13 +116,16 @@ class Class_FileManager_ModelRelationProfil {
public function findAll($path) {
$top_profiles = array_filter(Class_Profil::findTopProfils(), function($profile) use ($path)
{
if ((new Class_Profil_Preferences_Record($profile))->contains($path))
return true;
foreach(['header_img',
'favicon',
'logo_gauche_img',
'logo_droite_img',
'header_css',
'header_js'] as $key) {
if(false !== strpos($profile->getCfgSiteParam($key), $path))
if (false !== strpos($profile->getCfgSiteParam($key), $path))
return true;
}
});
@@ -137,7 +139,6 @@ class Class_FileManager_ModelRelationProfil {
: [];
return array_merge($top_profiles, $sub_profiles);
}
@@ -155,12 +156,14 @@ class Class_FileManager_ModelRelationProfil {
'header_js'] as $key)
$model->setCfgSiteParam($key, str_replace($path, $by, $model->getCfgSiteParam($key)));
(new Class_Profil_Preferences_Record($model))->rename($path, $by);
$model->save();
}
public function rename($path, $by) {
foreach($this->findAll($path) as $model)
$this->_renameOne($model, $path, $by);
}
}