Skip to content
Snippets Groups Projects
Commit b2cb24f6 authored by Laurent's avatar Laurent
Browse files

Merge branch 'master' into 'stable'

Master

See merge request !991
parents 494341fa de0f1c17
Branches
Tags
3 merge requests!999Master,!995Hotline master,!994Stable
<?php
$adapter = Zend_Registry::get('sql');
$adapter->query("CREATE TABLE `permission` ( id INT(11) unsigned NOT NULL AUTO_INCREMENT, code varchar(255) NOT NULL, module varchar(255) NOT NULL, type varchar(255) NOT NULL, sorting int(11) NOT NULL, description text NULL, PRIMARY KEY (id), KEY (code), KEY (module), KEY (type), KEY (sorting)) ENGINE = MYISAM, character set=UTF8;");
/* see patch 246 */
/* $adapter = Zend_Registry::get('sql'); */
/* $adapter->query("CREATE TABLE `permission` ( id INT(11) unsigned NOT NULL AUTO_INCREMENT, code varchar(255) NOT NULL, module varchar(255) NOT NULL, type varchar(255) NOT NULL, sorting int(11) NOT NULL, description text NULL, PRIMARY KEY (id), KEY (code), KEY (module), KEY (type), KEY (sorting)) ENGINE = MYISAM, character set=UTF8;"); */
$adapter->query("insert into `permission` (code, module, type, sorting, description) values ('CATEGORY', 'ARTICLE', 'Droits', 1, 'Créer des sous-catégories et des articles'), ('ARTICLE', 'ARTICLE', 'Droits', 2, 'Créer des articles'), ('PENDING', 'ARTICLE', 'Nouveaux statuts autorisés', 1, 'À valider'), ('VALIDATED', 'ARTICLE', 'Nouveaux statuts autorisés', 101, 'Validé'), ('REFUSED', 'ARTICLE', 'Nouveaux statuts autorisés', 102, 'Refusé'), ('ARCHIVED', 'ARTICLE', 'Nouveaux statuts autorisés', 103, 'Archivé');");
/* $adapter->query("insert into `permission` (code, module, type, sorting, description) values ('CATEGORY', 'ARTICLE', 'Droits', 1, 'Créer des sous-catégories et des articles'), ('ARTICLE', 'ARTICLE', 'Droits', 2, 'Créer des articles'), ('PENDING', 'ARTICLE', 'Nouveaux statuts autorisés', 1, 'À valider'), ('VALIDATED', 'ARTICLE', 'Nouveaux statuts autorisés', 101, 'Validé'), ('REFUSED', 'ARTICLE', 'Nouveaux statuts autorisés', 102, 'Refusé'), ('ARCHIVED', 'ARTICLE', 'Nouveaux statuts autorisés', 103, 'Archivé');"); */
$adapter->query('CREATE TABLE `user_group_permission` ( id INT(11) unsigned NOT NULL AUTO_INCREMENT, id_group INT(11) unsigned NOT NULL, id_permission INT(11) unsigned NOT NULL, id_model INT(11) unsigned NOT NULL, model_class varchar(255) NOT NULL, PRIMARY KEY (id), KEY(id_group), KEY(id_permission), KEY(id_model), KEY(model_class)) ENGINE = MYISAM, character set=UTF8;');
/* $adapter->query('CREATE TABLE `user_group_permission` ( id INT(11) unsigned NOT NULL AUTO_INCREMENT, id_group INT(11) unsigned NOT NULL, id_permission INT(11) unsigned NOT NULL, id_model INT(11) unsigned NOT NULL, model_class varchar(255) NOT NULL, PRIMARY KEY (id), KEY(id_group), KEY(id_permission), KEY(id_model), KEY(model_class)) ENGINE = MYISAM, character set=UTF8;'); */
$adapter->query("UPDATE `user_group_categorie` SET `libelle` = 'Général' WHERE `user_group_categorie`.`libelle` = 'Catégorie par défaut' LIMIT 1;");
/* $adapter->query("UPDATE `user_group_categorie` SET `libelle` = 'Général' WHERE `user_group_categorie`.`libelle` = 'Catégorie par défaut' LIMIT 1;"); */
$adapter->query("ALTER TABLE `user_groups` add column `id_bib` INT(11) NOT NULL DEFAULT '0', add key `id_bib` (`id_bib`);");
/* $adapter->query("ALTER TABLE `user_groups` add column `id_bib` INT(11) NOT NULL DEFAULT '0', add key `id_bib` (`id_bib`);"); */
?>
<?php
$adapter = Zend_Db_Table_Abstract::getDefaultAdapter();
$adapter->query("ALTER TABLE album ADD status tinyint(1) unsigned DEFAULT NULL");
\ No newline at end of file
try {
$adapter->query("select status from album");
} catch (Exception $e) {
$adapter->query("ALTER TABLE album ADD status tinyint(1) unsigned DEFAULT NULL");
}
\ No newline at end of file
<?php
$adapter = Zend_Registry::get('sql');
$adapter->query('CREATE TABLE `harvest_log` ( '
$adapter->query('CREATE TABLE if not exists `harvest_log` ( '
. 'id int(11) unsigned not null auto_increment,'
. '`type_doc` int(11) not null,'
. '`end_date` varchar(10) not null,'
......
<?php
Zend_Registry::get('sql')->query('CREATE TABLE `album_item` ( '
Zend_Registry::get('sql')->query('CREATE TABLE if not exists `album_item` ( '
. 'id int(11) unsigned not null auto_increment,'
. 'album_id int(11) unsigned not null,'
. 'loan_count int(11) not null,'
......
<?php
Zend_Registry::get('sql')->query('CREATE TABLE `loan_pnb` ( '
Zend_Registry::get('sql')->query('CREATE TABLE if not exists `loan_pnb` ( '
. 'id int(11) unsigned not null auto_increment,'
. 'record_origin_id varchar(50) not null,'
. 'subscriber_id varchar(20) not null,'
......
<?php
Zend_Db_Table::getDefaultAdapter()
->query('alter table codif_thesaurus add column rules varchar(250)');
$adapter = Zend_Db_Table::getDefaultAdapter();
try {
$adapter->query('select rules from codif_thesaurus');
} catch (Exception $e) {
$adapter->query('alter table codif_thesaurus add column rules varchar(250)');
}
?>
\ No newline at end of file
<?php
$adapter = Zend_Registry::get('sql');
$adapter->query('ALTER TABLE reservations ADD COLUMN rang tinyint');
$adapter = Zend_Db_Table::getDefaultAdapter();
try {
$adapter->query('select rang from reservations limit 1');
} catch (Exception $e) {
$adapter->query('ALTER TABLE reservations ADD COLUMN rang tinyint');
}
$adapter->query('ALTER TABLE reservations modify date_resa datetime default null');
?>
\ No newline at end of file
......@@ -64,7 +64,7 @@ function defineConstant($name, $value) {
function setupConstants() {
defineConstant('BOKEH_MAJOR_VERSION','7.2');
defineConstant('BOKEH_RELEASE_NUMBER', BOKEH_MAJOR_VERSION . '.0');
defineConstant('BOKEH_RELEASE_NUMBER', BOKEH_MAJOR_VERSION . '.2');
defineConstant('ROOT_PATH', realpath(dirname(__FILE__).'/..').'/');
......@@ -73,7 +73,7 @@ function setupConstants() {
defineConstant('MODULEDIRECTORY', ROOT_PATH . 'application/modules');
defineConstant('LANG_DIR', ROOT_PATH . 'library/translation/');
defineConstant('USERFILESPATH', ROOT_PATH . 'userfiles');
defineConstant('USERFILESPATH', './userfiles');
defineConstant('USERFILESURL', BASE_URL . '/userfiles/');
defineConstant('PATH_TEMP', ROOT_PATH . 'temp/');
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment