00001 <?php
00002
00003
00004
00005
00006
00007 function console_install() {
00008 $ret = new Status();
00009 $target = APP_INCLUDE_ABSPATH . 'run_console.php';
00010 if (!file_exists($target)) {
00011 $src = dirname(__FILE__) . '/run_console.php.example';
00012 if (!copy($src, $target)) {
00013 $ret->merge(tr('Could not create %target. Please do it manually', 'console', array('%target' => $target)));
00014 }
00015 else {
00016 if (!chmod($target, 0744)) {
00017 $ret->merge(tr('Could not chmod %target to be executable', 'console', array('%target' => $target)));
00018 }
00019 }
00020 }
00021 return $ret;
00022 }