Skip to content

Commit

Permalink
Préparation de la 2.12.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mdouchin committed Mar 29, 2022
1 parent 082971b commit dd7376b
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 4 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

## Unreleased

## 2.12.3 - 2022-03-30

* Outil d'import:
* Ajout d'un filtre pour masquer dans les résultats de recherche les observations
qui ont été importées mais pas encore activées par les administrateurs
* Correction du bug sur le test de conformité des géométries par rapport aux mailles 10km
* Correction des scripts SQL

## 2.12.2 - 2022-03-29

* Outil d'import: améliorations diverses
Expand Down
2 changes: 1 addition & 1 deletion gestion/module.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="http://jelix.org/ns/module/1.0">
<info id="gestion3liz.com" name="gestion" createdate="2016-12-05">
<version date="2022-03-29">2.12.2</version>
<version date="2022-03-30">2.12.3</version>
<label lang="en_US">gestion</label>
<description lang="en_US" />
<license URL="http://www.mozilla.org/MPL/">Mozilla Public License</license>
Expand Down
56 changes: 56 additions & 0 deletions occtax/install/upgrade_2_12_2__2_12_3.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php
class occtaxModuleUpgrader_2_12_2__2_12_3 extends jInstallerModule
{

public $targetVersions = array(
'2.12.3',
);
public $date = '2022-03-30';

function install()
{
if ($this->firstDbExec()) {
// Get variables
$localConfig = jApp::configPath('naturaliz.ini.php');
$ini = new jIniFileModifier($localConfig);
$srid = $ini->getValue('srid', 'naturaliz');

// SQL upgrade
$this->useDbProfile('jauth_super');
$db = $this->dbConnection(); // A PLACER TOUJOUR DERRIERE $this->useDbProfile('jauth_super');
$sqlPath = $this->path . 'install/sql/import.sql';
$sqlTpl = jFile::read($sqlPath);
$tpl = new jTpl();
$tpl->assign('SRID', $srid);
$sql = $tpl->fetchFromString($sqlTpl, 'text');
$db->exec($sql);

// Grant rights
$sqlPath = $this->path . 'install/sql/grant_rights.sql';
$sqlTpl = jFile::read($sqlPath);
$tpl = new jTpl();
$prof = jProfiles::get('jdb', $this->dbProfile, true);
$tpl->assign('DBNAME', $prof['database']);
$dbuser_readonly = $ini->getValue('dbuser_readonly', 'naturaliz');
$dbuser_owner = $ini->getValue('dbuser_owner', 'naturaliz');
if (empty($dbuser_readonly)) {
$dbuser_readonly = 'naturaliz';
}
if (empty($dbuser_owner)) {
$dbuser_owner = 'lizmap';
}
$tpl->assign('DBUSER_READONLY', $dbuser_readonly);
$tpl->assign('DBUSER_OWNER', $dbuser_owner);
$sql = $tpl->fetchFromString($sqlTpl, 'text');

// Try to reapply some rights on possibly newly created tables
// If it fails, no worries as it can be done manually after upgrade
try {
$db->exec($sql);
} catch (Exception $e) {
jLog::log("Upgrade - Rights where not reapplied on database objects");
jLog::log($e->getMessage());
}
}
}
}
2 changes: 1 addition & 1 deletion occtax/module.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="http://jelix.org/ns/module/1.0">
<info id="occtax3liz.com" name="occtax" createdate="2014-10-08">
<version date="2022-03-29">2.12.2</version>
<version date="2022-03-30">2.12.3</version>
<label lang="en_US">occtax</label>
<description lang="en_US" />
<license URL="http://www.mozilla.org/MPL/">Mozilla Public License</license>
Expand Down
2 changes: 1 addition & 1 deletion occtax_admin/module.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="http://jelix.org/ns/module/1.0">
<info id="mascarine_admin3liz.com" name="occtax_admin" createdate="2015-02-04">
<version date="2022-03-29">2.12.2</version>
<version date="2022-03-30">2.12.3</version>
<label lang="en_US">occtax_admin</label>
<description lang="en_US" />
<license URL="http://www.mozilla.org/MPL/">Mozilla Public License</license>
Expand Down
2 changes: 1 addition & 1 deletion taxon/module.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="http://jelix.org/ns/module/1.0">
<info id="taxon3liz.com" name="taxon" createdate="2014-10-01">
<version date="2022-03-29">2.12.2</version>
<version date="2022-03-30">2.12.3</version>
<label lang="en_US">taxon</label>
<description lang="en_US" />
<license URL="http://www.mozilla.org/MPL/">Mozilla Public License</license>
Expand Down

0 comments on commit dd7376b

Please sign in to comment.