Skip to content

Commit

Permalink
Do not overwrite existing style parts for center images
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasWeinert committed Jun 5, 2018
1 parent d3a95fa commit 3c90f59
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions src/system/papaya_parser.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
<?php
/**
* Parser for special tags like papaya:media, papaya:link and papaya:popup
*
* @copyright 2002-2009 by papaya Software GmbH - All rights reserved.
* @link http://www.papaya-cms.com/
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License, version 2
*
* You can redistribute and/or modify this script under the terms of the GNU General Public
* License (GPL) version 2, provided that the copyright and license notes, including these
* lines, remain unmodified. papaya is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE.
*
* @package Papaya
* @subpackage Core
* @version $Id: papaya_parser.php 39855 2014-06-05 13:57:21Z weinert $
*/
* papaya CMS
*
* @copyright 2000-2018 by papayaCMS project - All rights reserved.
* @link http://www.papaya-cms.com/
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License, version 2
*
* You can redistribute and/or modify this script under the terms of the GNU General Public
* License (GPL) version 2, provided that the copyright and license notes, including these
* lines, remain unmodified. papaya is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE.
*/

/**
* Parser for special tags like papaya:media, papaya:link and papaya:popup
Expand Down Expand Up @@ -602,7 +598,7 @@ function createDynImageTag($params) {
$style .= ' float: right;';
break;
case 'center':
$style = ' display: block; text-align: center;'.
$style .= ' display: block; text-align: center;'.
' margin-left: auto; margin-right: auto;';
if (isset($style['top']) && $style['top'] > 0) {
$style .= ' margin-top: '.(int)$borderData['top'].'px;';
Expand Down Expand Up @@ -910,7 +906,7 @@ function createImageTag($params, $data) {
$style .= ' float: right;';
break;
case 'center':
$style = ' display: block; text-align: center;'.
$style .= ' display: block; text-align: center;'.
' margin-left: auto; margin-right: auto;';
if (isset($style['top']) && $style['top'] > 0) {
$style .= ' margin-top: '.(int)$borderData['top'].'px;';
Expand Down

0 comments on commit 3c90f59

Please sign in to comment.