-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add export images info #3
base: master
Are you sure you want to change the base?
Conversation
5f5091f
to
f04f4c9
Compare
includes/ExportController.php
Outdated
protected function addImagesURL(& $data) | ||
{ | ||
if ($data['Tuto Details']['Main_Picture']) { | ||
$data['Tuto Details']['Main_Picture'] = WikifabExploreResultFormatter::getImageUrl($data['Tuto Details']['Main_Picture']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ne modifie pas le champ Main_picture, créé plutot "Main_Picture_url"
et ici tu utilise WikifabExploreResultFormatter::getImageUrl à moitié : soit tu utilise la génération d'image de mediawiki, pour eviter de crééer un dépendanc avec Explore, soit tu utilise completement la méthode, en passant aussi les annotation, ce qui serai plus pertinent ici, car cetet fonction permet de gérer les image annoté, mais tu ne le fait pas.
(il suffit de passer en second parametre $data['Tuto Details']['Main_Picture_annotations'] )
includes/ExportController.php
Outdated
foreach ($data['Tuto Step'] as $key => $val) { | ||
$iteration = 0; | ||
while (true) { | ||
$pictureNumber = $iteration < 10 ? 'Step_Picture_0' . $iteration : 'Step_Picture_' . $iteration; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$pictureNumber = sprintf( 'Step_Picture_%2d', $iteration ) ;
includes/ExportController.php
Outdated
@@ -58,6 +58,8 @@ class ExportController { | |||
|
|||
protected $fieldsToParse = []; | |||
|
|||
protected $addImageInfo; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tu pourrai mettre un valeur par defaut (false)
includes/SpecialExport.php
Outdated
if ($wgRequest->getCheck( 'imagesInfo' ) ) { | ||
$addImagesInfo = true; | ||
} | ||
$this->export_controller->setAddImagesInfo($addImagesInfo); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
si tu a bien mit une valeur par default, il suffit de faire ca :
if ($wgRequest->getCheck( 'imagesInfo' ) ) {
$this->export_controller->setAddImagesInfo(true);
}
1cee61e
to
bb6f17f
Compare
d4f8cff
to
c300895
Compare
No description provided.