Révision e253ff2a
Ajouté par Julien Enselme il y a presque 11 ans
bin/captcha.sh | ||
---|---|---|
1 |
#!/bin/bash |
|
2 | 1 |
#!/bin/sh |
3 | 2 |
PATH=/usr/local/bin:/usr/bin:/bin |
4 | 3 |
############## |
5 |
# Sets hidden captcha configuration for all D7 websites.
|
|
4 |
# Sets hidden captcha configuration for all D7 websites. |
|
6 | 5 |
############## |
7 |
cd /users/guest/assos/htmltest/sites |
|
8 |
for x in $(ls -1 | grep -v 'all' | grep -v file-*); do |
|
9 |
if [ -d $x -a ! -L $x ]; then |
|
10 |
cd $x; |
|
11 |
echo "Configuration hidden captcha pour "$x |
|
6 |
|
|
7 |
init_scripts.sh |
|
8 |
|
|
9 |
cd $d7_sites_dir |
|
10 |
|
|
11 |
for dir in $(ls) |
|
12 |
do |
|
13 |
if [ -d $dir -a ! -L $dir ] |
|
14 |
then |
|
15 |
cd $dir; |
|
16 |
echo "Configuration hidden captcha pour $x" |
|
12 | 17 |
# Enable hidden_captcha module. |
13 | 18 |
drush -y en hidden_captcha |
14 | 19 |
# Log wrong answers. |
... | ... | |
19 | 24 |
drush -y vdel captcha_placement_map_cache |
20 | 25 |
# Randomely generate a math question as the label of the hidden captcha field. |
21 | 26 |
drush -y vset hidden_captcha_label "$RANDOM + $RANDOM" |
22 |
cd -; |
|
27 |
cd -;
|
|
23 | 28 |
fi |
24 | 29 |
done |
Formats disponibles : Unified diff
Merge manuel performance
Nom de variables plus explicite
Ajout de init*.sh