Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
agallavardin
fusiondirectory-plugins
Commits
f64257e4
Commit
f64257e4
authored
Dec 07, 2015
by
Côme Chilliet
Browse files
Fixes #4353 added path mask option to repositories
parent
5b54eacc
Changes
2
Hide whitespace changes
Inline
Side-by-side
fai/admin/systems/services/repository/class_serviceRepository.inc
View file @
f64257e4
...
...
@@ -73,6 +73,11 @@ class FAIRepositoryAttribute extends PipeSeparatedCompositeAttribute
'distribution'
,
TRUE
,
array
(
'debian'
,
'centos'
)
),
new
StringAttribute
(
_
(
'Path pattern'
),
_
(
'How this repository is organized (only for RPM repositories)'
),
'pathMask'
,
FALSE
,
'%RELEASE%/%SECTION%/%ARCH%/'
),
),
$acl
,
$label
...
...
@@ -97,8 +102,10 @@ class FAIRepositoryAttribute extends PipeSeparatedCompositeAttribute
serviceRepository
::
getReleaseList
(
$this
->
attributes
[
7
]
->
getValue
())
);
$modeChoices
=
array_merge
(
array
(
'install'
,
'update'
),
$releaseList
);
$this
->
attributes
[
8
]
->
setVisible
(
FALSE
);
}
else
{
$modeChoices
=
array
(
'install'
,
'update'
);
$this
->
attributes
[
8
]
->
setVisible
(
TRUE
);
}
$this
->
attributes
[
4
]
->
setChoices
(
$modeChoices
);
}
...
...
@@ -120,6 +127,15 @@ class FAIRepositoryAttribute extends PipeSeparatedCompositeAttribute
parent
::
setValue
(
$values
);
}
function
readValues
(
$value
)
{
$values
=
parent
::
readValues
(
$value
);
if
(
!
isset
(
$values
[
8
]))
{
$values
[
8
]
=
'%RELEASE%/%SECTION%/%ARCH%/'
;
}
return
$values
;
}
function
resetToDefault
()
{
$this
->
attributes
[
7
]
->
resetToDefault
();
...
...
fai/admin/systems/services/repository/fai_repository.tpl
View file @
f64257e4
...
...
@@ -55,7 +55,7 @@
<td>
{
eval
var
=
$attributes.mirrorMode.input
}
</td>
{
if
isset
(
$attributes.mirrorSections_inner
)
}
<td
rowspan=
"
2
"
title=
"
{
$attributes.mirrorSections_inner.description
}
"
>
<td
rowspan=
"
3
"
title=
"
{
$attributes.mirrorSections_inner.description
}
"
>
<label
for=
"
{
$attributes.mirrorSections_inner.htmlid
}
"
>
{
eval
var
=
$attributes.mirrorSections_inner.label
}
</label><br/>
...
...
@@ -71,6 +71,16 @@
</td>
<td>
{
eval
var
=
$attributes.mirrorLocal.input
}
</td>
</tr>
<tr>
{
if
isset
(
$attributes.pathMask
)
}
<td
title=
"
{
$attributes.pathMask.description
}
"
>
<label
for=
"
{
$attributes.pathMask.htmlid
}
"
>
{
eval
var
=
$attributes.pathMask.label
}
</label>
</td>
<td>
{
eval
var
=
$attributes.pathMask.input
}
</td>
{/
if
}
</tr>
<tr>
<td
title=
"
{
$attributes.FAIrepository_buttons.description
}
"
colspan=
"3"
>
{
eval
var
=
$attributes.FAIrepository_buttons.input
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment