X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=blobdiff_plain;f=RunGenerator.php;h=3a4516a69ed668e66d3fbc22d846fd9ec8a6b5e7;hp=1283107d8894473c8e496d893b43170fec490cc1;hb=HEAD;hpb=7e9cdd246cc8bba1ce46a4db263a0f49b7cbc5a0 diff --git a/RunGenerator.php b/RunGenerator.php index 1283107d..39112559 100644 --- a/RunGenerator.php +++ b/RunGenerator.php @@ -31,6 +31,14 @@ class Pman_Core_RunGenerator extends Pman 'min' => 1, 'max' => -1, + ), + 'noupdate' => array( + 'desc' => 'Do not update the database using sql', + 'default' => '', + 'short' => 'n', + 'min' => 1, + 'max' => -1, + ) ); @@ -48,17 +56,19 @@ class Pman_Core_RunGenerator extends Pman parent::getAuth(); // load company! $au = $this->getAuthUser(); if (!$au || $au->company()->comptype != 'OWNER') { - $this->jerr("Not authenticated", array('authFailure' => true)); + $this->jerror("LOGIN-NOAUTH", "Not authenticated", array('authFailure' => true)); } $this->authUser = $au; return true; } - function get($args, $opts) + function get($args, $opts=array()) { //print_r($opts);exit; + if (empty($opts['noupdate'])) { + HTML_FlexyFramework::run('Core/UpdateDatabase'); + } - HTML_FlexyFramework::run('Core/UpdateDatabase');