Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
bibliossimo
opacce
Commits
45822473
Commit
45822473
authored
Jan 30, 2018
by
Ghislain Loas
Browse files
hotline #67188 fix liraries order in article form
parent
ca9b41f5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
2 deletions
+27
-2
VERSIONS_HOTLINE/67188
VERSIONS_HOTLINE/67188
+2
-0
library/Class/Bib.php
library/Class/Bib.php
+1
-1
tests/library/Class/BibTest.php
tests/library/Class/BibTest.php
+24
-1
No files found.
VERSIONS_HOTLINE/67188
0 → 100644
View file @
45822473
- ticket #67188 : Administration : les bibliothèques sont triées par nom dans le sélecteur de catégorie du formulaire de modification des articles.
\ No newline at end of file
library/Class/Bib.php
View file @
45822473
...
...
@@ -34,7 +34,7 @@ class BibLoader extends Storm_Model_Loader {
protected
$_portail
;
public
function
findAllWithPortail
()
{
$all_bibs
=
Class_Bib
::
getLoader
()
->
findAll
(
);
$all_bibs
=
Class_Bib
::
findAllBy
([
'order'
=>
'libelle'
]
);
array_unshift
(
$all_bibs
,
$this
->
getPortail
());
return
$all_bibs
;
}
...
...
tests/library/Class/BibTest.php
View file @
45822473
...
...
@@ -90,4 +90,27 @@ class BibTest extends Storm_Test_ModelTestCase {
}
?>
\ No newline at end of file
class
BibFindAllWithPortailTest
extends
Storm_Test_ModelTestCase
{
protected
$_storm_default_to_volatile
=
true
;
public
function
setUp
()
{
parent
::
setUp
();
$this
->
fixture
(
'Class_Bib'
,
[
'id'
=>
1
,
'libelle'
=>
'BBB'
]);
$this
->
fixture
(
'Class_Bib'
,
[
'id'
=>
2
,
'libelle'
=>
'AAA'
]);
}
/** @test */
public
function
bibBBBShouldBeLast
()
{
$this
->
assertEquals
(
1
,
Class_Bib
::
findAllWithPortail
()[
2
]
->
getId
());
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
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