Merge branch '3.8'

Conflicts:
	.gitignore
	.travis.yml
	Vagrantfile
	lib/Alchemy/Phrasea/Controller/Datafiles.php
	lib/Alchemy/Phrasea/Controller/Setup.php
	lib/Alchemy/Phrasea/Helper/DatabaseHelper.php
	lib/classes/connection/pdo.php
	lib/classes/task/period/subdef.php
	lib/classes/task/period/writemeta.php
	locale/de_DE/LC_MESSAGES/phraseanet.mo
	locale/de_DE/LC_MESSAGES/phraseanet.po
	locale/en_GB/LC_MESSAGES/phraseanet.mo
	locale/en_GB/LC_MESSAGES/phraseanet.po
	locale/fr_FR/LC_MESSAGES/phraseanet.mo
	locale/fr_FR/LC_MESSAGES/phraseanet.po
	locale/nl_NL/LC_MESSAGES/phraseanet.mo
	locale/nl_NL/LC_MESSAGES/phraseanet.po
	locale/phraseanet.pot
	templates/web/setup/step2.html.twig
	vagrant/vms/phraseanet-php54-nginx/puphpet/config.yaml
	vagrant/vms/phraseanet-php54-nginx/puphpet/files/exec-always/setup
	vagrant/vms/phraseanet-php54-nginx/puphpet/files/exec-once/setup
	vagrant/vms/phraseanet-php54-nginx/puphpet/shell/important-notices.txt
	vagrant/vms/phraseanet-php54-nginx/puphpet/shell/self-promotion.txt
This commit is contained in:
Nicolas Le Goff
2014-09-09 15:05:13 +02:00
18 changed files with 318 additions and 103 deletions

View File

@@ -439,19 +439,14 @@ class databox extends base
$ret['thesaurus_indexed'] += $row['n'];
}
$sql = "SELECT type, jeton, COUNT(record_id) AS n FROM record WHERE jeton & ".JETON_MAKE_SUBDEF." GROUP BY type, jeton";
$sql = "SELECT type, COUNT(record_id) AS n FROM record WHERE jeton & ".JETON_MAKE_SUBDEF." GROUP BY type";
$stmt = $this->get_connection()->prepare($sql);
$stmt->execute();
$rs = $stmt->fetchAll(PDO::FETCH_ASSOC);
$stmt->closeCursor();
foreach ($rs as $row) {
if(!array_key_exists($row['type'], $ret['jeton_subdef'])) {
$ret['jeton_subdef'][$row['type']] = 0;
}
if((int)$row['jeton'] & JETON_MAKE_SUBDEF) {
$ret['jeton_subdef'][$row['type']] += (int)$row['n'];
}
$ret['jeton_subdef'][$row['type']] = (int)$row['n'];
}
return $ret;