summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2010-07-11 18:23:35 +0200
committerRemi Collet <fedora@famillecollet.com>2010-07-11 18:23:35 +0200
commit50f2de59ed8ea3f41530fc4f06c12ae1613416ab (patch)
tree350b8daaefd74304066f74a77e8d0c1813e9e4b9
parente7493ab34e9db2226a5dd1d99938c04193ed88af (diff)
fix fedcli
-rwxr-xr-xfedcli.php3
-rw-r--r--include/main.php24
2 files changed, 16 insertions, 11 deletions
diff --git a/fedcli.php b/fedcli.php
index eb897c4..1d5f485 100755
--- a/fedcli.php
+++ b/fedcli.php
@@ -23,9 +23,10 @@
* See <http://www.gnu.org/licenses/>
*/
+define ('CLIONLY', true);
+require 'include/main.php';
require 'Console/Getargs.php';
-require 'class/FedoraClient.php';
function Help() {
echo "\nFedora Client Command Line usage\n\n";
diff --git a/include/main.php b/include/main.php
index 265d20c..286cf4e 100644
--- a/include/main.php
+++ b/include/main.php
@@ -36,19 +36,23 @@
define('RPMPHP_VERSION', '1.0.0-dev');
require 'config.php';
-require 'Smarty/Smarty.class.php';
-$smarty = new Smarty();
+if (!defined('CLIONLY'))
+{
+ require 'Smarty/Smarty.class.php';
+
+ $smarty = new Smarty();
-$smarty->template_dir = 'smarty/templates/rpmphp';
-$smarty->compile_dir = 'smarty/templates_c';
-$smarty->cache_dir = 'smarty/cache';
-$smarty->config_dir = 'smarty/configs';
+ $smarty->template_dir = 'smarty/templates/rpmphp';
+ $smarty->compile_dir = 'smarty/templates_c';
+ $smarty->cache_dir = 'smarty/cache';
+ $smarty->config_dir = 'smarty/configs';
-$ariane[] = array (
- 'url' => './',
- 'text' => 'Reports home'
-);
+ $ariane[] = array (
+ 'url' => './',
+ 'text' => 'Reports home'
+ );
+}
/**
* Manage class autoload