More accurate compiled file names

Dmitry Koteroff <[email protected]>
Newsgroups gmane.comp.php.smarty.devel
Message-ID <[email protected]>
Hello.

Smarty  saves  its  compiled  code to files with unreadable names
(like  %%23t2763%%sjhdjsdhjshgd.php).  It  makes too difficult to
find  fatal  error in the template (for example, {$obj->spoon()},
where spoon is non-existent method).

Attached patch corrects this problem - it replaces "/" by "^" and
saves the file to temporary location.

Replacement code:

$_filename = preg_replace("{[/\\\\]}s", "^", $_filename);
$_filename = preg_replace("{[^a-z0-9~!_=.^-]}si", "_", $_filename);

Don't you plan to insert this patch to production version?

-- 
Best regards,
  Dmitry Koteroff.

-- 
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.