X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=blobdiff_plain;f=UpdateDatabase.php;h=c762a48e44ca70e5f833d35ae781630055aab45e;hp=a6f37f0ede04114e944c1eb2b75dc48d93b7cd0e;hb=refs%2Fheads%2Fwip_alan_T5884_add_photo_to_report;hpb=7d41cee302af170561fe84a7edc19fba41d4d73c diff --git a/UpdateDatabase.php b/UpdateDatabase.php index a6f37f0e..c762a48e 100644 --- a/UpdateDatabase.php +++ b/UpdateDatabase.php @@ -67,12 +67,24 @@ class Pman_Core_UpdateDatabase extends Pman 'min' => 1, 'max' => 1, ), + 'skip-email-import' => array( + 'desc' => 'Skip email import', + 'default' => '', + 'min' => 1, + 'max' => 1, + ), 'procedures-only' => array( 'desc' => 'Only import procedures (not supported by most modules yet) - ignores sql directory', 'default' => '', 'min' => 1, 'max' => 1, ), + 'disable-create-triggers' => array( + 'desc' => 'So not create the mysql triggers', + 'default' => '', + 'min' => 1, + 'max' => 1, + ), 'json-person' => array( 'desc' => 'Person JSON file', @@ -132,7 +144,7 @@ class Pman_Core_UpdateDatabase extends Pman 'test_class' => 'Pman/Admin/Report/SendEventErrors', 'to_group' => 'Administrators', 'active' => 1, - 'description' => '9. System Error Messages', + 'description' => '9.2 System Error Messages', 'template_dir' => '/Pman/Admin/templates/mail/' ), 'ADMIN_PASSWORD_RESET' => array( @@ -140,7 +152,7 @@ class Pman_Core_UpdateDatabase extends Pman 'test_class' => 'Pman/Core/DataObjects/Core_person', 'to_group' => '', 'active' => 1, - 'description' => '99. Management System Password Reset', + 'description' => '9.1 Management System Password Reset', 'template_dir' => '/Pman/Core/templates/mail/' @@ -901,6 +913,9 @@ class Pman_Core_UpdateDatabase extends Pman function updateDataEmails() { + if (!empty($this->opts['skip-email-import'])) { + return; + } foreach ($this->emailTemplates as $k => $mail) { $mail_dir = "{$this->rootDir}{$mail['template_dir']}"; @@ -1200,12 +1215,14 @@ class Pman_Core_UpdateDatabase extends Pman $dburl = parse_url($ff->database); $dbtype = $dburl['scheme']; - + $dbtype = ($dbtype == 'mysqli') ? 'mysql' : $dbtype; + foreach($this->extensions as $ext) { $scls = ucfirst($dbtype). $ext; $cls = __CLASS__ . '_'. $scls; $fn = implode('/',explode('_', $cls)).'.php'; + if (!file_exists(__DIR__.'/UpdateDatabase/'. $scls .'.php')) { return; } @@ -1277,10 +1294,13 @@ class Pman_Core_UpdateDatabase extends Pman function clearApacheDataobjectsCache() { - echo "Clearing Database Cache\n"; + // this needs to clear it's own cache along with remote one.. $url = "http://localhost{$this->local_base_url}/Core/RefreshDatabaseCache"; + + echo "Clearing Database Cache : http://localhost{$this->local_base_url}/Core/RefreshDatabaseCache\n"; + $response = $this->curl($url); $json = json_decode($response, true); @@ -1297,7 +1317,7 @@ class Pman_Core_UpdateDatabase extends Pman function clearApacheAssetCache() { - echo "Clearing Asset Cache\n"; + echo "Clearing Asset Cache : http://localhost{$this->local_base_url}/Core/Asset\n"; $response = $this->curl( "http://localhost{$this->local_base_url}/Core/Asset", array( '_clear_cache' => 1 ,'returnHTML' => 'NO' ),