From 5218979a3d64fed5bc0fdb37ba73b694f05dc1c9 Mon Sep 17 00:00:00 2001 From: Erik Torsner Date: Thu, 3 Jan 2013 16:28:22 +0100 Subject: [PATCH] Fixed string escaping --- phpactiverecord.mod | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/phpactiverecord.mod b/phpactiverecord.mod index 66e02c5..b86da3a 100644 --- a/phpactiverecord.mod +++ b/phpactiverecord.mod @@ -15,14 +15,15 @@ $cmd = "mv php-activerecord $ci_folder/application/third_party"; echo "Enable hooks in application/config/config.php\n"; $target_file = "$ci_folder/application/config/config.php"; $config_file = file_get_contents($target_file); -$needle = "$config['enable_hooks'] = FALSE;"; -$newneedle = "$config['enable_hooks'] = TRUE;"; +$needle = "\$config['enable_hooks'] = FALSE;"; +$newneedle = "\$config['enable_hooks'] = TRUE;"; $config_file = str_replace($needle, $newneedle, $config_file); file_put_contents($target_file, $config_file); echo "Add hook in application/config/hooks.php\n"; $hook_code = << '', 'function' => 'initialize_php_activerecord', 'filename' => 'CI_ActiveRecord.php',