diff --git a/classes/Controller.php b/classes/Controller.php index 1e373e0..78b888d 100755 --- a/classes/Controller.php +++ b/classes/Controller.php @@ -95,7 +95,7 @@ class Controller extends Object { } // Grab the passed in model or use the default - $model_name = isset($_REQUEST['model']) ? str_replace('-', '_', $_REQUEST['model']) : $config->getDefaultModel(); + $model_name = isset($_REQUEST['model']) ? strtr($_REQUEST['model'], '-', '_') : $config->getDefaultModel(); /** * @todo Maybe the logout shouldn't be an internal thing, what if the @@ -120,7 +120,7 @@ class Controller extends Object { $event = null; } else { - $class = str_replace('/', '_', $model_name); + $class = strtr($model_name, '/', '_'); list($section, $event) = split('/', $model_name); } @@ -142,7 +142,7 @@ class Controller extends Object { $class = $shared_model_name; } else { - $class = str_replace('/', '_', $shared_model_name); + $class = strtr($shared_model_name, '/', '_'); } if (class_exists($class)) { diff --git a/classes/Mailer.php b/classes/Mailer.php index 4b628ff..8c7b36c 100644 --- a/classes/Mailer.php +++ b/classes/Mailer.php @@ -74,7 +74,7 @@ class Mailer extends Object { $prefix = isset($this->prefix) ? $this->prefix : (isset($defaults->prefix) && $defaults->prefix != '' ? $defaults->prefix : null); // Assembles the subject line with prefix - $subject = str_replace("\n", '', (isset($prefix) ? '[' . $prefix . '] ' : '')); + $subject = strtr((isset($prefix) ? '[' . $prefix . '] ' : ''), "\n", ''); // Tacks on the subject if (isset($this->subject)) {