~ubuntu-branches/ubuntu/precise/gosa/precise

« back to all changes in this revision

Viewing changes to include/smarty/plugins/modifier.regex_replace.php

  • Committer: Bazaar Package Importer
  • Author(s): Emanuele Gentili
  • Date: 2008-05-13 00:18:06 UTC
  • Revision ID: james.westby@ubuntu.com-20080513001806-2e77o207ccmvz6lp
Tags: 2.5.16-1ubuntu1
* Merge from debian unstable, remaining changes: (LP: #229763)
 + debian/control
  - Switch Maintainer to Ubuntu Motu Developers
+ debian/rules
  - Fixed fatal error on Call function get_template_patch() in
   /usr/share/gosa/include

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 */
23
23
function smarty_modifier_regex_replace($string, $search, $replace)
24
24
{
 
25
    if (($pos = strpos($search,"\0")) !== false)
 
26
      $search = substr($search,0,$pos);
25
27
    if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) {
26
28
        /* remove eval-modifier from $search */
27
29
        $search = substr($search, 0, -strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]);