Merge branch 'master' into dist/envole/6/master
This commit is contained in:
commit
8b794e8aa1
|
@ -13,7 +13,6 @@
|
|||
<file filelist="ninegate" name="/var/www/html/ninegate/app/config/template.yml" source="ninegate-template.yml" rm="True"/>
|
||||
<file filelist="ninegate" name="/var/www/html/ninegate/scripts/ninegate-postservice-00.sh" source="ninegate-postservice-00.sh" rm="True" mode="700" />
|
||||
<file filelist="ninegate" name="/var/www/html/ninegate/src/Cadoles/CoreBundle/Command/data/core-init-01.sql" source="ninegate-init-01.sql" rm="True"/>
|
||||
<file filelist="ninegate" name="/var/www/html/ninegate/web/imap-unread.php" source="ninegate-unread.php" rm="True"/>
|
||||
<file filelist='ninegate' name='/etc/cron.d/ninegate' source='ninegate.cron' rm='True'/>
|
||||
|
||||
<file filelist='ninegate-migration' name='/var/www/html/envole-migration/config/config-db-ninegate.php' source='ninegate-migration.php' mkdir='True'/>
|
||||
|
|
|
@ -30,7 +30,7 @@ class SecurityController extends Controller
|
|||
|
||||
// Init Client CAS
|
||||
\phpCAS::setDebug("/var/log/phpcas/phpCAS-ninegate.log");
|
||||
@\phpCAS::client(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), false);
|
||||
@\phpCAS::proxy(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), false);
|
||||
\phpCAS::setNoCasServerValidation();
|
||||
|
||||
|
||||
|
@ -195,7 +195,7 @@ class SecurityController extends Controller
|
|||
public function logoutAction() {
|
||||
// Init Client CAS
|
||||
\phpCAS::setDebug(false);
|
||||
@\phpCAS::client(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), true);
|
||||
@\phpCAS::proxy(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), true);
|
||||
\phpCAS::setNoCasServerValidation();
|
||||
|
||||
|
||||
|
@ -209,7 +209,7 @@ class SecurityController extends Controller
|
|||
|
||||
// Init Client CAS
|
||||
\phpCAS::setDebug("/var/log/phpcas/phpCAS-ninegate.log");
|
||||
@\phpCAS::client(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), false);
|
||||
@\phpCAS::proxy(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), false);
|
||||
\phpCAS::setNoCasServerValidation();
|
||||
|
||||
|
||||
|
@ -295,4 +295,29 @@ class SecurityController extends Controller
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
function imapunreadAction() {
|
||||
if($this->getParameter("active_imapunread")) {
|
||||
$ip=$this->getParameter("imapundread_ip");
|
||||
|
||||
// Init Client CAS
|
||||
\phpCAS::setDebug("/var/log/phpcas/phpCAS-ninegate.log");
|
||||
@\phpCAS::proxy(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), false);
|
||||
\phpCAS::setNoCasServerValidation();
|
||||
\phpCAS::forceAuthentication();
|
||||
|
||||
|
||||
$pt= \phpCAS::retrievePT('imap://'.$ip,$t,$f);
|
||||
$a = \phpCAS::serviceMail("{".$ip.":993/imap/ssl/novalidate-cert}","imap://".$ip,0, $errc,$err,$pt);
|
||||
$unseen = imap_status($a, "{".$ip.":993/imap/ssl/novalidate-cert}INBOX", SA_UNSEEN);
|
||||
|
||||
$count=$unseen->unseen;
|
||||
$response = new Response(json_encode($count));
|
||||
}
|
||||
else
|
||||
$response = new Response(json_encode(""));
|
||||
|
||||
$response->headers->set('Content-Type', 'application/json');
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,3 +10,7 @@ cas_sp.test:
|
|||
path: /test
|
||||
defaults: { _controller: CadolesCASBundle:Security:test }
|
||||
|
||||
cas_sp.imapunread:
|
||||
path: /imapunread
|
||||
defaults: { _controller: CadolesCASBundle:Security:imapunread }
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
{% set permannu = app.session.get('permannu') %}
|
||||
|
||||
{% if fgheader %}
|
||||
<li id="menu-header"><a onclick="switchHeader()" title="Cacher / Affichier Bannière " style="cursor:pointer"><i class="fa fa-chevron-up fa-fw"></i></a>
|
||||
<li id="menu-header"><a onclick="switchHeader()" title="Cacher / Afficher Bannière " style="cursor:pointer"><i class="fa fa-chevron-up fa-fw"></i></a>
|
||||
{% else %}
|
||||
<li id="menu-header"><a onclick="switchHeader()" title="Cacher / Affichier Bannière " style="cursor:pointer"><i class="fa fa-chevron-down fa-fw"></i></a>
|
||||
<li id="menu-header"><a onclick="switchHeader()" title="Cacher / Afficher Bannière " style="cursor:pointer"><i class="fa fa-chevron-down fa-fw"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('ROLE_ADMIN') or (is_granted('ROLE_MODO') and (permannu=="ROLE_MODO" or permannu=="ROLE_ANIM" or permannu=="ROLE_USER")) or (is_granted('ROLE_ANIM') and (permannu=="ROLE_ANIM" or permannu=="ROLE_USER")) or (is_granted('ROLE_USER') and permannu=="ROLE_USER") %}
|
||||
|
|
|
@ -973,7 +973,7 @@ class InitDataCommand extends ContainerAwareCommand
|
|||
$entityItem->addGroup($groupall);
|
||||
}
|
||||
$entityItem->setUrl($widroundcube_url);
|
||||
$entityItem->setBadgeurl("/ninegate/imap-unread.php");
|
||||
$entityItem->setBadgeurl("/ninegate/cas/imapunread");
|
||||
$em->persist($entityItem);
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
|
||||
|
||||
<div id="menupageaction">
|
||||
<a id="menuname" style="cursor:pointer;font-size:80%" href="">qsfqsdf</a>
|
||||
<a id="menuname" style="cursor:pointer;font-size:80%" href=""></a>
|
||||
|
||||
{% if canadd %}
|
||||
<a id="menusubmit" style="cursor:pointer" onclick="submitPage()" title='Ajouter une page'><i class='fa fa-plus fa-fw'></i></a>
|
||||
|
@ -313,10 +313,10 @@
|
|||
order: [[ 1, "asc" ]],
|
||||
});
|
||||
|
||||
{% if app.user %}
|
||||
{% if app.user and app.session.get("timerefreshnotif") > 0%}
|
||||
setInterval(function(){
|
||||
loadmsgCounter()
|
||||
}, 10000);
|
||||
}, {{(app.session.get("timerefreshnotif")*1000)}});
|
||||
{% endif %}
|
||||
|
||||
// Init socket de counter
|
||||
|
|
|
@ -123,6 +123,7 @@ INSERT IGNORE INTO `config` (`order`, `visible`, `changeable`, `required`, `type
|
|||
('501', 1, 1, 1, 'permgroup', 'permannu', 'ROLE_USER', '', 'Détermine quel rôle aura la permission de voir l\'annuaire'),
|
||||
('502', 1, 1, 1, 'boolean', 'permunsubscribe', '0', '', 'Permettre aux utilisateurs de se désinscrire par eux-mêmes des groupes de travail'),
|
||||
('503', 1, 1, 1, 'boolean', 'fgnotifgroup', '1', '', 'Activer les notifications mails sur les groupes de travail'),
|
||||
('504', 1, 1, 1, 'integer', 'timerefreshnotif', '20', '', 'Temps en secondes pour rafraîchir les messages de notifications (0 = désactivé)'),
|
||||
|
||||
('600', 1, 1, 1, 'string', 'labelbookmarkuser','Favoris', '', 'Titre de la section des items créés par l\'utilisateur, et qui ne sont listés que dans cette section.'),
|
||||
('601', 1, 1, 1, 'string', 'labelbookmarkitem','Mes Ressources', '', 'Titre de la section des items créés par l\'administrateur ou le modérateur, mis à la disposition de l\'utilisateur, et sélectionnés par ce dernier pour apparaitre dans cette section plutôt que dans leur catégorie d\'origine.');
|
||||
|
|
|
@ -585,6 +585,18 @@ parameters:
|
|||
noreply: %%ninegate_noreply
|
||||
%end if
|
||||
|
||||
%if %%is_defined('adresse_imap') or %%is_defined('adresse_ip_mail')
|
||||
active_imapunread: true
|
||||
%if %%is_defined('adresse_imap')
|
||||
imapundread_ip: %%adresse_imap
|
||||
%else
|
||||
imapundread_ip: %%adresse_ip_mail
|
||||
%end if
|
||||
%else
|
||||
active_imapunread: false
|
||||
imapunread_ip:
|
||||
%end if
|
||||
|
||||
# Doctrine Configuration
|
||||
doctrine:
|
||||
dbal:
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
<?php
|
||||
%if %%is_defined('adresse_imap') or %%is_defined('adresse_ip_mail')
|
||||
require_once('/var/www/html/ninegate/vendor/jasig/phpcas/CAS.php');
|
||||
require_once('configCAS/cas.inc.php');
|
||||
|
||||
// try to configure the phpCAS client
|
||||
session_name("imapunread");
|
||||
session_start();
|
||||
|
||||
if (__CAS_DEBUG){
|
||||
phpCAS::setDebug("/var/log/phpcas/phpcas-imap.log");
|
||||
}
|
||||
|
||||
$c= phpCAS::proxy(__CAS_VERSION, __CAS_SERVER, __CAS_PORT, __CAS_FOLDER, false);
|
||||
|
||||
phpCAS::setNoClearTicketsFromUrl();
|
||||
phpCAS::setNoCasServerValidation();
|
||||
phpCAS::forceAuthentication();
|
||||
|
||||
if (__CAS_LOGOUT){
|
||||
if(method_exists('phpCAS','EoleLogoutRequests')) phpCAS::EoleLogoutRequests(false);
|
||||
}
|
||||
|
||||
%if %%is_defined('adresse_imap')
|
||||
$a = phpCAS::serviceMail("{%%adresse_imap:993/imap/ssl/novalidate-cert}","imap://%%adresse_imap",0, $errc,$err, phpCAS::retrievePT('imap://%%adresse_imap',$t,$f));
|
||||
$unseen = imap_status($a, "{%%adresse_imap:993/imap/ssl/novalidate-cert}INBOX", SA_UNSEEN);
|
||||
%else
|
||||
$a = phpCAS::serviceMail("{%%adresse_ip_mail:993/imap/ssl/novalidate-cert}","imap://%%adresse_ip_mail",0, $errc,$err, phpCAS::retrievePT('imap://%%adresse_ip_mail',$t,$f));
|
||||
$unseen = imap_status($a, "{%%adresse_ip_mail:993/imap/ssl/novalidate-cert}INBOX", SA_UNSEEN);
|
||||
%end if
|
||||
|
||||
$count=$unseen->unseen;
|
||||
echo $count;
|
||||
%end if
|
||||
?>
|
Loading…
Reference in New Issue