@@ -30,7 +30,7 @@ public function deleteAll($page)
30
30
if ($ this ->securityController ->isWikiHibernated ()) {
31
31
throw new \Exception (_t ('WIKI_IN_HIBERNATION ' ));
32
32
}
33
- //on recupere les anciens tags de la page courante
33
+ // on recupere les anciens tags de la page courante
34
34
$ tabtagsexistants = $ this ->tripleStore ->getAll ($ page , 'http://outils-reseaux.org/_vocabulary/tag ' , '' , '' );
35
35
if (is_array ($ tabtagsexistants )) {
36
36
foreach ($ tabtagsexistants as $ tab ) {
@@ -49,29 +49,29 @@ public function save($page, $liste_tags)
49
49
// TODO check if we need to escape here, or if we can do that in the tripleStore methods
50
50
$ tags = explode (', ' , $ this ->dbService ->escape (_convert ($ liste_tags , YW_CHARSET , true )));
51
51
52
- //on recupere les anciens tags de la page courante
52
+ // on recupere les anciens tags de la page courante
53
53
$ tabtagsexistants = $ this ->tripleStore ->getAll ($ page , 'http://outils-reseaux.org/_vocabulary/tag ' , '' , '' );
54
54
if (is_array ($ tabtagsexistants )) {
55
55
foreach ($ tabtagsexistants as $ tab ) {
56
56
$ tags_restants_a_effacer [] = $ tab ['value ' ];
57
57
}
58
58
}
59
59
60
- //on ajoute le tag s il n existe pas déjà
60
+ // on ajoute le tag s il n existe pas déjà
61
61
foreach ($ tags as $ tag ) {
62
62
trim ($ tag );
63
63
if ($ tag != '' ) {
64
- if (!$ this ->tripleStore ->exist ($ page , 'http://outils-reseaux.org/_vocabulary/tag ' , $ tag , '' , '' )) {
65
- $ this ->tripleStore ->create ($ page , 'http://outils-reseaux.org/_vocabulary/tag ' , $ tag , '' , '' );
64
+ if (!$ this ->tripleStore ->exist ($ page , 'http://outils-reseaux.org/_vocabulary/tag ' , htmlspecialchars ( $ tag) , '' , '' )) {
65
+ $ this ->tripleStore ->create ($ page , 'http://outils-reseaux.org/_vocabulary/tag ' , htmlspecialchars ( $ tag) , '' , '' );
66
66
}
67
- //on supprime ce tag du tableau des tags restants a effacer
67
+ // on supprime ce tag du tableau des tags restants a effacer
68
68
if (isset ($ tags_restants_a_effacer )) {
69
69
unset($ tags_restants_a_effacer [array_search ($ tag , $ tags_restants_a_effacer )]);
70
70
}
71
71
}
72
72
}
73
73
74
- //on supprime les tags restants a effacer
74
+ // on supprime les tags restants a effacer
75
75
if (isset ($ tags_restants_a_effacer )) {
76
76
foreach ($ tags_restants_a_effacer as $ tag ) {
77
77
$ this ->tripleStore ->delete ($ page , 'http://outils-reseaux.org/_vocabulary/tag ' , $ tag , '' , '' );
@@ -107,7 +107,7 @@ public function getPagesByTags($tags = '', $type = '', $nb = '', $tri = '')
107
107
$ req .= ' GROUP BY resource ' ;
108
108
$ req .= ' HAVING COUNT(resource)= ' . $ nbdetags . ') ' ;
109
109
110
- //gestion du tri de l'affichage
110
+ // gestion du tri de l'affichage
111
111
if ($ tri == 'alpha ' ) {
112
112
$ req .= ' ORDER BY tag ASC ' ;
113
113
} elseif ($ tri == 'date ' ) {
0 commit comments