Changeset 93649 in spip-zone
- Timestamp:
- Dec 13, 2015, 2:49:34 PM (5 years ago)
- Location:
- _core_/plugins/petitions
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
_core_/plugins/petitions/action/confirmer_signature.php
r93619 r93649 46 46 } 47 47 48 if (!$var_confirm OR $var_confirm == 'publie' OR$var_confirm == 'poubelle') {48 if (!$var_confirm or $var_confirm == 'publie' or $var_confirm == 'poubelle') { 49 49 return ''; 50 50 } … … 65 65 include_spip('inc/securiser_action'); 66 66 if ($id_signature = intval($var_confirm) 67 AND(67 and ( 68 68 $_GET['refus'] == _action_auteur("supprimer signature $id_signature", '', '', 'alea_ephemere') 69 OR69 or 70 70 $_GET['refus'] == _action_auteur("supprimer signature $id_signature", '', '', 'alea_ephemere_ancien') 71 71 ) … … 138 138 } 139 139 } 140 141 ?> -
_core_/plugins/petitions/action/editer_petition.php
r93619 r93649 229 229 return petition_modifier($id_petition, $c); 230 230 } 231 232 233 ?> -
_core_/plugins/petitions/action/editer_signature.php
r93619 r93649 154 154 155 155 // cf autorisations dans inc/signature_instituer 156 if ($s != $statut OR ($d AND$d != $date)) {156 if ($s != $statut or ($d and $d != $date)) { 157 157 $statut = $champs['statut'] = $s; 158 158 … … 260 260 return signature_modifier($id_signature, $c); 261 261 } 262 263 ?> -
_core_/plugins/petitions/action/relancer_signature.php
r93619 r93649 25 25 $id_article = sql_getfetsel('id_article', 'spip_petitions', 'id_petition=' . intval($row['id_petition'])); 26 26 if ($id_article = intval($id_article) 27 ANDautoriser('mordererpetition', 'article', $id_article)27 and autoriser('mordererpetition', 'article', $id_article) 28 28 ) { 29 29 include_spip('action/editer_signature'); … … 37 37 } 38 38 } 39 40 ?> -
_core_/plugins/petitions/action/supprimer_signature.php
r93619 r93649 25 25 'spip_signatures AS S JOIN spip_petitions AS P ON S.id_petition=P.id_petition', 26 26 'S.id_signature=' . intval($id_signature)); 27 if ($id_article ANDautoriser('modererpetition', 'article', $id_article)) {27 if ($id_article and autoriser('modererpetition', 'article', $id_article)) { 28 28 include_spip('action/editer_signature'); 29 29 signature_modifier($id_signature, array('statut' => 'poubelle')); … … 31 31 } 32 32 } 33 34 ?> -
_core_/plugins/petitions/action/traiter_lot_signature.php
r93619 r93649 27 27 */ 28 28 if (preg_match(",^(\w+)$,", $arg, $match) 29 ANDin_array($statut = $match[1], array('relancer', 'supprimer', 'valider'))30 ANDautoriser('modererlot', 'petition')29 and in_array($statut = $match[1], array('relancer', 'supprimer', 'valider')) 30 and autoriser('modererlot', 'petition') 31 31 ) { 32 32 $where = ''; … … 59 59 } 60 60 } 61 62 ?> -
_core_/plugins/petitions/action/valider_signature.php
r93619 r93649 26 26 } 27 27 } 28 29 ?> -
_core_/plugins/petitions/balise/formulaire_signature.php
r93619 r93649 60 60 return $args; 61 61 } 62 63 ?> -
_core_/plugins/petitions/base/petitions.php
r93619 r93649 162 162 return $tables; 163 163 } 164 165 ?> -
_core_/plugins/petitions/formulaires/activer_petition_article.php
r93619 r93649 96 96 97 97 } 98 99 ?> -
_core_/plugins/petitions/formulaires/signature.php
r93619 r93649 22 22 } 23 23 // pas de signature sur une petition fermee (TODO) ou poubelle 24 if (isset($r['statut']) ANDin_array($r['statut'], array('off', 'poubelle'))) {24 if (isset($r['statut']) and in_array($r['statut'], array('off', 'poubelle'))) { 25 25 return false; 26 26 } … … 79 79 } 80 80 81 if ($nom = _request('session_nom') ANDstrlen($nom) < 2) {81 if ($nom = _request('session_nom') and strlen($nom) < 2) { 82 82 $erreurs['session_nom'] = _T('form_indiquer_nom'); 83 83 } … … 86 86 if (($mail = _request('session_email')) == _T('info_mail_fournisseur')) { 87 87 $erreurs['session_email'] = _T('form_indiquer_email'); 88 } elseif ($mail AND!email_valide($mail)) {88 } elseif ($mail and !email_valide($mail)) { 89 89 $erreurs['session_email'] = _T('form_email_non_valide'); 90 90 } elseif (strlen(_request('nobot')) 91 OR(@preg_match_all(',\bhref=[\'"]?http,i', // bug PHP91 or (@preg_match_all(',\bhref=[\'"]?http,i', // bug PHP 92 92 _request('message') 93 93 # , PREG_PATTERN_ORDER … … 208 208 ( 209 209 isset($GLOBALS['visiteur_session']['statut']) 210 AND$GLOBALS['visiteur_session']['session_email'] == $GLOBALS['visiteur_session']['email']211 ANDstrlen($GLOBALS['visiteur_session']['email'])210 and $GLOBALS['visiteur_session']['session_email'] == $GLOBALS['visiteur_session']['email'] 211 and strlen($GLOBALS['visiteur_session']['email']) 212 212 ) 213 213 214 214 // Cas 2: on a deja signe une petition, et on conserve le meme email 215 OR(215 or ( 216 216 isset($GLOBALS['visiteur_session']['email_confirme']) 217 AND$GLOBALS['visiteur_session']['session_email'] == $GLOBALS['visiteur_session']['email_confirme']218 ANDstrlen($GLOBALS['visiteur_session']['session_email'])217 and $GLOBALS['visiteur_session']['session_email'] == $GLOBALS['visiteur_session']['email_confirme'] 218 and strlen($GLOBALS['visiteur_session']['session_email']) 219 219 ) 220 220 ) { … … 285 285 return $passw; 286 286 } 287 288 ?> -
_core_/plugins/petitions/petitions_administrations.php
r93619 r93649 29 29 $trouver_table = charger_fonction('trouver_table', 'base'); 30 30 if ($desc = $trouver_table('spip_signatures') 31 ANDisset($desc['field']['id_article'])31 and isset($desc['field']['id_article']) 32 32 ) { 33 33 ecrire_meta($nom_meta_base_version, '1.0.0'); … … 97 97 effacer_meta($nom_meta_base_version); 98 98 } 99 100 ?> -
_core_/plugins/petitions/petitions_autoriser.php
r93619 r93649 151 151 return false; 152 152 } 153 154 ?> -
_core_/plugins/petitions/petitions_fonctions.php
r93619 r93649 73 73 } 74 74 } 75 76 ?> -
_core_/plugins/petitions/petitions_options.php
r93619 r93649 21 21 $confirmer_signature($_GET['var_confirm']); 22 22 } 23 24 25 ?> -
_core_/plugins/petitions/petitions_pipelines.php
r93619 r93649 29 29 function petitions_afficher_config_objet($flux) { 30 30 if ((($type = $flux['args']['type']) == 'article') 31 AND($id = $flux['args']['id'])31 and ($id = $flux['args']['id']) 32 32 ) { 33 33 if (autoriser('modererpetition', $type, $id)) { … … 69 69 70 70 } 71 72 ?>
Note: See TracChangeset
for help on using the changeset viewer.