From 0c782b7e6d8c2fa7bf49fde6452b62e6731f33bd Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 6 Sep 2010 13:43:19 +0800 Subject: [PATCH] RunGenerator.php --- RunGenerator.php | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/RunGenerator.php b/RunGenerator.php index e69de29b..4d4340f9 100644 --- a/RunGenerator.php +++ b/RunGenerator.php @@ -0,0 +1,49 @@ +cli = true; + return true; + } + + parent::getAuth(); // load company! + $au = $this->getAuthUser(); + if (!$au || $au->company()->comptype != 'OWNER') { + $this->jerr("Not authenticated", array('authFailure' => true)); + } + $this->authUser = $au; + return true; + } + + function get($args) + { + require_once 'Pman/Core/Generator.php'; + ini_set('pcre.backtrack_limit', 2000000); + ini_set('pcre.recursion_limit', 2000000); + $this->init(); + + $lastarg = $this->cli ? array_pop($_SERVER['argv']) : ''; + if (preg_match('/RunGenerator/', $lastarg)) { + $lastarg = ''; + } + $x = new Pman_Core_Generator(); + // $x->page = clone($this); + $x->start($this->cli, $args, $lastarg); + die("done!"); + } + +} \ No newline at end of file -- 2.39.2