Robert Vogel has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/248854

Change subject: UEModulePDF: Added PHP 5.6 compatibility
......................................................................

UEModulePDF: Added PHP 5.6 compatibility

Due to new security settings in PHP 5.6 the '@' annotation for uploads
with cURL is not allowed anymore. We need to use CURLFile class instead.

See http://php.net/manual/de/class.curlfile.php

See also https://gerrit.wikimedia.org/r/#/c/234523/2

Change-Id: I48e85fe912bd7513a51dfb65e9ed893d2b7ef488
---
M UEModulePDF/includes/PDFServlet.class.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/54/248854/1

diff --git a/UEModulePDF/includes/PDFServlet.class.php 
b/UEModulePDF/includes/PDFServlet.class.php
index 80023c0..9631e7f 100644
--- a/UEModulePDF/includes/PDFServlet.class.php
+++ b/UEModulePDF/includes/PDFServlet.class.php
@@ -46,7 +46,7 @@
                                'fileType' => '', //Need to stay empty so 
UploadAsset servlet saves file to document root directory
                                'documentToken' => 
$this->aParams['document-token'],
                                'sourceHtmlFile_name' => basename( 
$sTmpHtmlFile ),
-                               'sourceHtmlFile' => '@'.$sTmpHtmlFile,
+                               'sourceHtmlFile' => class_exists( 'CURLFile' ) 
? new CURLFile( $sTmpHtmlFile ) : '@'.$sTmpHtmlFile,
                                'wikiId' => wfWikiID()
                        )
                );
@@ -141,7 +141,7 @@
                                }
 
                                $aPostFiles['file'.$iCounter.'_name'] = 
$sFileName;
-                               $aPostFiles['file'.$iCounter] = '@'.$sFilePath;
+                               $aPostFiles['file'.$iCounter] = class_exists( 
'CURLFile' ) ? new CURLFile( $sFilePath ) : '@'.$sFilePath;
                                $iCounter++;
                                $iCurrentUploadSize += $iFileSize;
                        }

-- 
To view, visit https://gerrit.wikimedia.org/r/248854
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I48e85fe912bd7513a51dfb65e9ed893d2b7ef488
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to