eval() commands replace by improved object factory, user login class stub added
[shipsimu.git] / application / ship-simu / init.php
index ffc577c22f0f5a0b546e55d7192c1f7e607738d8..431e4420d37ef526e2f2966178ca76d1b2a25da0 100644 (file)
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
-// Get an instance of the helper
-$eval = sprintf("\$app = %s::getInstance();",
+// Generate call-back function
+$callback = sprintf("%s::getInstance",
        FrameworkConfiguration::getInstance()->readConfig('app_helper_class')
 );
-eval($eval);
+
+// Get an instance of the helper
+$app = call_user_func_array($callback, array());
 
 // Set application name and version
 $app->setAppName("Ship-Simu Schiffsimulator");