diff --git a/application/modules/admin/views/scripts/users/manage-double-manual.phtml b/application/modules/admin/views/scripts/users/manage-double-manual.phtml index af19e9db74931b70402910abd05a3b77d32391de..a9dac65ca9474f5c661077176837203c802bba60 100644 --- a/application/modules/admin/views/scripts/users/manage-double-manual.phtml +++ b/application/modules/admin/views/scripts/users/manage-double-manual.phtml @@ -3,6 +3,10 @@ echo $this->tag('p', $this->_('Vous avez %s comptes abonnés possédant au moins un doublon dans votre base de données qui ne peuvent pas être supprimés automatiquement.', $this->double_manager->countDouble())); +echo $this->tag('p', + $this->tag('small', + $this->_('Requête d\'identification des doublons : %s', $this->tag('b', $this->double_manager->getRequest())))); + echo $this->button((new Class_Entity()) ->setUrl($this->url(['action' => 'manage-double-user', 'id_user' => $this->double_manager->getFirstDouble()])) diff --git a/application/modules/admin/views/scripts/users/manage-double-user.phtml b/application/modules/admin/views/scripts/users/manage-double-user.phtml index c1336cb5932c82d00883c4db8f669eddc598a326..9d95688f9595afa182069b0c13f54881fdcbc2c3 100644 --- a/application/modules/admin/views/scripts/users/manage-double-user.phtml +++ b/application/modules/admin/views/scripts/users/manage-double-user.phtml @@ -1,4 +1,10 @@ <?php + +echo $this->tag('p', + $this->_('Vous avez %s comptes abonnés possédant au moins un doublon dans votre base de données qui ne peuvent pas être supprimés automatiquement.', + $this->double_manager->countDouble())); + + $description = (new Class_TableDescription('double-users')) ->addColumn($this->_('ID'), ['attribute' => 'id_user']) ->addColumn($this->_('Login'), ['attribute' => 'login']) diff --git a/application/modules/admin/views/scripts/users/manage-double.phtml b/application/modules/admin/views/scripts/users/manage-double.phtml index 89fd81e7a69691fd792b8dcc2014b99a4a13bc8a..655ff18e992e4bf375e6b0b96ee71e09aee92488 100644 --- a/application/modules/admin/views/scripts/users/manage-double.phtml +++ b/application/modules/admin/views/scripts/users/manage-double.phtml @@ -1,7 +1,11 @@ <?php echo $this->tag('p', $this->_('Vous avez %s comptes abonnés possédant au moins un doublon dans votre base de données.', - $this->double_manager->countDouble())); + $this->tag('b', $this->double_manager->countDouble()))); + +echo $this->tag('p', + $this->tag('small', + $this->_('Requête d\'identification des doublons : %s', $this->tag('b', $this->double_manager->getRequest())))); echo $this->button((new Class_Entity()) ->setUrl($this->url(['action' => 'delete-double'])) diff --git a/library/Class/User/DbDoubleFinder.php b/library/Class/User/DbDoubleFinder.php index dea2ef284a912721df6678ab00afef040845d37d..bc1eec1bbc6554f519b24412cd31952e6ebe03ea 100644 --- a/library/Class/User/DbDoubleFinder.php +++ b/library/Class/User/DbDoubleFinder.php @@ -27,9 +27,14 @@ class Class_User_DbDoubleFinder { } + public function getRequest() { + return 'select id_user, password, login, idabon, ordreabon, count(*) as doublon from bib_admin_users where role_level = 2 group by idabon, ordreabon, login, password having doublon > 1'; + } + + public function getDouble() { return Zend_Registry::get('sql') - ->fetchAll('select id_user, password, login, idabon, ordreabon, count(*) as doublon from bib_admin_users where role_level = 2 group by idabon, ordreabon, login, password having doublon > 1'); + ->fetchAll($this->getRequest()); }