From: <ru...@us...> - 2009-08-31 11:28:15
|
Revision: 7094 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7094&view=rev Author: rurban Date: 2009-08-31 11:28:08 +0000 (Mon, 31 Aug 2009) Log Message: ----------- Warn about fixed invalid image links Modified Paths: -------------- trunk/lib/stdlib.php Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2009-08-31 11:21:07 UTC (rev 7093) +++ trunk/lib/stdlib.php 2009-08-31 11:28:08 UTC (rev 7094) @@ -475,7 +475,7 @@ } } else { - trigger_error(sprintf(_("Invalid image attribute %s %s=%s"), + trigger_error(sprintf(_("Invalid image attribute \"%s\" %s=%s"), $url, $attr, $value), E_USER_WARNING); } } @@ -485,10 +485,15 @@ $file = NormalizeLocalFileName($ori_url); if (file_exists($file)) { $link = HTML::img(array('src' => $ori_url)); + trigger_error( + sprintf(_("Invalid image link fixed %s => %s. Spaces must be quoted with %%20."), + $url, $ori_url), E_USER_WARNING); } elseif (string_starts_with($ori_url, getUploadDataPath())) { $file = substr($file, strlen(getUploadDataPath())); $path = getUploadFilePath().$file; if (file_exists($path)) { + trigger_error(sprintf(_("Invalid image link fixed \"%s\" => \"%s\".\n Spaces must be quoted with %%20."), + $url, $ori_url), E_USER_WARNING); $link->setAttr('src', getUploadDataPath() . $file); $url = $ori_url; } @@ -554,7 +559,7 @@ $link->setAttr('class', 'inlineimage'); /* Check for inlined objects. Everything allowed in INLINE_IMAGES besides - * png|jpg|gif|jpeg|bmp|pl|cgi + * png|jpg|gif|jpeg|bmp|pl|cgi. If no image it is an object to embed. * Note: Allow cgi's (pl,cgi) returning images. */ if (!preg_match("/\.(".$force_img.")/i", $url)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |