PEEL Shopping
Open source ecommerce : PEEL Shopping
Functions
util.php File Reference

Go to the source code of this file.

Functions

 RemoveFromStart ($sourceString, $charToRemove)
 
 RemoveFromEnd ($sourceString, $charToRemove)
 
 FindBadUtf8 ($string)
 
 ConvertToXmlAttribute ($value)
 
 IsHtmlExtension ($ext, $htmlExtensions)
 Check whether given extension is in html etensions list. More...
 
 DetectHtml ($filePath)
 Detect HTML in the first KB to prevent against potential security issue with IE/Safari/Opera file type auto detection bug. More...
 
 IsImageValid ($filePath, $extension)
 Check file content. More...
 

Function Documentation

ConvertToXmlAttribute (   $value)

Definition at line 60 of file util.php.

DetectHtml (   $filePath)

Detect HTML in the first KB to prevent against potential security issue with IE/Safari/Opera file type auto detection bug.

Returns true if file contain insecure HTML code at the beginning.

Parameters
string$filePathabsolute path to file
Returns
boolean

Definition at line 110 of file util.php.

FindBadUtf8 (   $string)

Definition at line 37 of file util.php.

IsHtmlExtension (   $ext,
  $htmlExtensions 
)

Check whether given extension is in html etensions list.

Parameters
string$ext
array$htmlExtensions
Returns
boolean

Definition at line 88 of file util.php.

IsImageValid (   $filePath,
  $extension 
)

Check file content.

Currently this function validates only image files. Returns false if file is invalid.

Parameters
string$filePathabsolute path to file
string$extensionfile extension
integer$detectionLevel0 = none, 1 = use getimagesize for images, 2 = use DetectHtml for images
Returns
boolean

Definition at line 181 of file util.php.

RemoveFromEnd (   $sourceString,
  $charToRemove 
)

Definition at line 31 of file util.php.

RemoveFromStart (   $sourceString,
  $charToRemove 
)

Definition at line 25 of file util.php.


This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:41:40 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.