1
frankblack
Bugs in system_imagemanager.html and system_imagemanager2.html in 2.4.5
  • 2010/8/13 6:32

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


Both files use <{php}> to insert some dynamic values, but when the files will be outputted with smarty they contain a bug.

Orginal code for both files is:
echo "<link rel="stylesheet" type="text/css" media="all" href="language/$language/style.css" />";


Unfortunately the backslashes before the quotes will be removed by the textsanitizer for above code.

This will be outputted as:
echo "<link rel="stylesheet" type="text/css" media="all" href="language/$language/style.css" />";


Correct code should go like this:
echo '<link rel="stylesheet" type="text/css" media="all" href="language/'.$language.'/style.css" />';

2
Mamba
Re: Bugs in system_imagemanager.html and system_imagemanager2.html in 2.4.5
  • 2010/8/13 7:03

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

3
jagibu
Re: Bugs in system_imagemanager.html and system_imagemanager2.html in 2.4.5
  • 2010/12/8 21:31

  • jagibu

  • Just popping in

  • Posts: 68

  • Since: 2005/6/17


still in X2.5

Quote:
SF: Date: 2010-09-10 19:04:04 UTC Sender: trabis Cannot reproduce this error in xoops 2.5. Please test it with new version.


This not need reproduce ... this is simple PHP syntax error.
echo "xxx - OK"xxx - syntax error here"no matter";

look at oryginal:
Xoops-2.5.0\htdocs\modules\system\templates\system_imagemanager.html

<{php}> 
$language $GLOBALS['xoopsConfig']['language'];
if(
file_exists(XOOPS_ROOT_PATH.'/language/'.$language.'/style.css')){ 
echo 
"<link rel="stylesheet" type="text/css" media="all" href="language/$language/style.css" />";
}
<{/
php}>


after forced template file generation ( \public_html\themes\default\modules\system\system_imagemanager.html ) :
echo "<link rel="stylesheet" type="text/css" media="all" href="language/$language/style.css" />";


Quote:

frankblack wrote:
Correct code should go like this:
echo '<link rel="stylesheet" type="text/css" media="all" href="language/'.$language.'/style.css" />';


or
echo "<link rel='stylesheet' type='text/css' media='all' href='language/".$language."/style.css' />";


Reproduced on localhost and server ...
www.artcode.eu
www.polfran.pl
www.sitkowskibor.pl

4
jagibu
Re: Bugs in system_imagemanager.html and system_imagemanager2.html in 2.4.5
  • 2010/12/8 21:42

  • jagibu

  • Just popping in

  • Posts: 68

  • Since: 2005/6/17


but on xoops.org works for me .. (!) tested DHTML Form with xCode + button Manager ..
www.artcode.eu
www.polfran.pl
www.sitkowskibor.pl

5
jagibu
Re: Bugs in system_imagemanager.html and system_imagemanager2.html in 2.4.5
  • 2010/12/8 22:06

  • jagibu

  • Just popping in

  • Posts: 68

  • Since: 2005/6/17


bug in action:
Parse errorsyntax errorunexpected T_STRINGexpecting ',' or ';' in /xoops_secure/artcode.eu/xoops_data/caches/smarty_compile/http%253A%252F%252Fartcode.eu%25%25system-zetagenesis-default^%%5D^5DD^5DDC7D64%%db%3Asystem_imagemanager.html.php on line 40
None All Errors 
(0Deprecated (0Queries (12Blocks (0Extra (2Timers(3)


from smarty_compile (PHP 5.2.14):
/* Smarty version 2.6.26, created on 2010-12-08 22:58:53
compiled from db:system_imagemanager.html */

if(file_exists(XOOPS_ROOT_PATH.'/language/'.$language.'/style.css')){    echo "<link rel="stylesheet" type="text/css" media="all" href="language/$language/style.css" />";   }


Hardcoded on xoops.org or PHP/SMARTY version?
www.artcode.eu
www.polfran.pl
www.sitkowskibor.pl

6
kris_fr
Re: Bugs in system_imagemanager.html and system_imagemanager2.html in 2.4.5
  • 2010/12/9 23:49

  • kris_fr

  • Theme Designer

  • Posts: 1009

  • Since: 2005/12/31


in original Xoops-2.5.0\htdocs\modules\system\templates\system_imagemanager.html - you have :
Quote:
<{php}>
$language = $GLOBALS['xoopsConfig']['language'];
if(file_exists(XOOPS_ROOT_PATH.'/language/'.$language.'/style.css')){
echo "<link rel=\ "stylesheet\ " type=\ "text/css\ " media=\ "all\ " href=\ "language/$language/style.css\ " />";
}
<{/php}>

7
jagibu
Re: Bugs in system_imagemanager.html and system_imagemanager2.html in 2.4.5
  • 2010/12/10 8:19

  • jagibu

  • Just popping in

  • Posts: 68

  • Since: 2005/6/17


kris_fr
fixing my paste ( in tags quote ):
Quote:

<{php}> $language = $GLOBALS['xoopsConfig']['language']; if(file_exists(XOOPS_ROOT_PATH.'/language/'.$language.'/style.css')){ echo "<link rel="stylesheet" type="text/css" media="all" href="language/$language/style.css" />"; } <{/php}>


BTW.. place this code in tags of source code (in tags code) and make Preview
.. have You ?:
<{php}>   $language $GLOBALS['xoopsConfig']['language'];  if(file_exists(XOOPS_ROOT_PATH.'/language/'.$language.'/style.css')){   echo "<link rel="stylesheet" type="text/css" media="all" href="language/$language/style.css" />";  }  <{/php}>

this xoops DHTML form source code interpreter bug ... ?

kris_fr show me Your's public_html\themes\default\modules\system\system_imagemanager.html
www.artcode.eu
www.polfran.pl
www.sitkowskibor.pl

Login

Who's Online

194 user(s) are online (104 user(s) are browsing Support Forums)


Members: 0


Guests: 194


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits