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
afi
opacce
Commits
79c4ab41
Commit
79c4ab41
authored
Sep 13, 2019
by
Patrick Barroca
😁
Browse files
dev #93553 : federated reviews
parent
172a0d93
Pipeline
#8317
passed with stage
in 38 minutes and 26 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
19 deletions
+8
-19
application/modules/opac/controllers/AbonneController.php
application/modules/opac/controllers/AbonneController.php
+1
-3
cosmogramme/sql/patch/patch_351.php
cosmogramme/sql/patch/patch_351.php
+1
-1
cosmogramme/sql/patch/patch_353.php
cosmogramme/sql/patch/patch_353.php
+1
-1
cosmogramme/sql/patch/patch_358.php
cosmogramme/sql/patch/patch_358.php
+1
-1
library/Class/WebService/ActivityPub.php
library/Class/WebService/ActivityPub.php
+3
-2
tests/application/modules/opac/controllers/AbonneControllerAvisTest.php
...ion/modules/opac/controllers/AbonneControllerAvisTest.php
+0
-10
tests/application/modules/opac/controllers/NoticeAjaxControllerTest.php
...ion/modules/opac/controllers/NoticeAjaxControllerTest.php
+1
-1
No files found.
application/modules/opac/controllers/AbonneController.php
View file @
79c4ab41
...
...
@@ -177,13 +177,11 @@ class AbonneController extends ZendAfi_Controller_Action {
->
setTypeDoc
(
$notice
->
getTypeDoc
())
->
setStatut
(
0
);
$journal_type
=
$avis
->
isNew
()
?
'REVIEW_CREATE'
:
'REVIEW_UPDATE'
;
if
(
$avis
->
save
())
{
$this
->
_user
->
setPseudo
(
$this
->
_request
->
getParam
(
'avisSignature'
))
->
save
();
$this
->
_helper
->
journal
(
$journal_type
,
$avis
);
$this
->
_helper
->
notify
(
$this
->
_
(
'Votre avis à bien été enregistré'
));
return
$this
->
_redirectClose
(
$this
->
_getReferer
());
...
...
@@ -192,13 +190,13 @@ class AbonneController extends ZendAfi_Controller_Action {
$this
->
view
->
message
=
implode
(
'.'
,
$avis
->
getErrors
());
}
if
(
$avis
!=
null
)
{
$this
->
view
->
id
=
$avis
->
getId
();
$this
->
view
->
avisEntete
=
$avis
->
getEntete
();
$this
->
view
->
avisTexte
=
$avis
->
getAvis
();
$this
->
view
->
avisNote
=
$avis
->
getNote
();
}
$this
->
view
->
avisSignature
=
$this
->
_user
->
getNomAff
();
$this
->
view
->
id_notice
=
$id_notice
;
}
...
...
cosmogramme/sql/patch/patch_351.php
View file @
79c4ab41
<?php
//re run 1.2
(
new
Class_Migration_DigitalResource_ToutApprendre
())
->
run
();
(
new
Class_Migration_DigitalResource_ToutApprendre
())
->
run
();
\ No newline at end of file
cosmogramme/sql/patch/patch_353.php
View file @
79c4ab41
<?php
(
new
Class_Migration_DigitalResource_1DTouch
())
->
run
();
(
new
Class_Migration_DigitalResource_1DTouch
())
->
run
();
\ No newline at end of file
cosmogramme/sql/patch/patch_358.php
View file @
79c4ab41
...
...
@@ -9,4 +9,4 @@ $try = function ($query) use($adapter) {
$try
(
'ALTER TABLE notices add column type int not null default 1, add KEY type (type)'
);
$try
(
'ALTER TABLE exemplaires add column type int not null default 1, add KEY type (type)'
);
$try
(
"UPDATE `variables` SET liste='0:notices
\r\n
1:abonnés
\r\n
2:prêts
\r\n
3:reservations
\r\n
4:paniers
\r\n
5:autorités' WHERE clef='type_fichier'"
);
$try
(
"UPDATE `variables` SET liste='0:notices
\r\n
1:abonnés
\r\n
2:prêts
\r\n
3:reservations
\r\n
4:paniers
\r\n
5:autorités' WHERE clef='type_fichier'"
);
\ No newline at end of file
library/Class/WebService/ActivityPub.php
View file @
79c4ab41
...
...
@@ -38,7 +38,8 @@ class Class_WebService_ActivityPub {
use
Trait_SimpleWebClient
,
Trait_TimeSource
,
Trait_LastMessage
,
Trait_Translator
;
const
MIME_TYPE
=
'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'
;
MIME_TYPE
=
'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'
,
EMPTY_DIGEST
=
'ZDQxZDhjZDk4ZjAwYjIwNGU5ODAwOTk4ZWNmODQyN2U='
;
protected
static
$_throw_errors
=
false
,
...
...
@@ -266,7 +267,7 @@ class Class_WebService_ActivityPub {
protected
function
_activityGet
(
$url
,
$request_target
)
{
$headers
=
[
'date'
=>
$this
->
getTimeSource
()
->
dateHttpHeader
(),
'digest'
=>
'MD5='
.
base64_encode
(
md5
(
''
))
,
'digest'
=>
'MD5='
.
static
::
EMPTY_DIGEST
,
Class_HttpSignature
::
REQUEST_TARGET
=>
$request_target
];
return
$this
...
...
tests/application/modules/opac/controllers/AbonneControllerAvisTest.php
View file @
79c4ab41
...
...
@@ -160,14 +160,6 @@ class AbonneControllerAvisNoticeAvisSaveTest extends AbonneControllerAvisTestCas
$this
->
postDispatch
(
'/opac/abonne/avis/id_notice/53'
,
$data
);
$this
->
assertNotNull
(
Class_AvisNotice
::
findFirstBy
([
'entete'
=>
'Sorcellerie'
]));
$this
->
assertNotNull
(
$journal
=
Class_Journal
::
findFirstBy
([
'type'
=>
'REVIEW_CREATE'
]));
$details
=
$journal
->
getDetails
();
$this
->
assertNotEmpty
(
$details
);
$this
->
assertEquals
(
'AUTHOR'
,
$details
[
0
]
->
getType
());
$this
->
assertEquals
(
'FloCouv'
,
$details
[
0
]
->
getValue
());
$this
->
assertEquals
(
'NEEDS_VALIDATION'
,
$details
[
1
]
->
getType
());
$this
->
assertEquals
(
false
,
$details
[
1
]
->
getValue
());
}
...
...
@@ -191,8 +183,6 @@ class AbonneControllerAvisNoticeAvisSaveTest extends AbonneControllerAvisTestCas
$this
->
postDispatch
(
'/opac/abonne/avis/id_notice/53'
,
$data
);
$this
->
assertEquals
(
4
,
Class_AvisNotice
::
find
(
12
)
->
getNote
());
$this
->
assertNotNull
(
$journal
=
Class_Journal
::
findFirstBy
([
'type'
=>
'REVIEW_UPDATE'
]));
$this
->
assertTrue
(
$journal
->
hasDetails
());
}
}
...
...
tests/application/modules/opac/controllers/NoticeAjaxControllerTest.php
View file @
79c4ab41
...
...
@@ -1800,7 +1800,7 @@ class NoticeAjaxControllerNoticeWithAvisEditLinkModoLoggedTest extends NoticeAja
/** @test */
public
function
editLinkShouldBePresent
()
{
$this
->
assertXPath
(
'//a[contains(@href, "abonne/editavisnotice")]'
,
$this
->
_response
->
getBody
()
);
$this
->
assertXPath
(
'//a[contains(@href, "abonne/editavisnotice")]'
);
}
...
...
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