Przeglądaj źródła

Only if custom image is present

Bob Mottram 7 lat temu
rodzic
commit
9ce9d5dae4
1 zmienionych plików z 5 dodań i 5 usunięć
  1. 5
    5
      src/freedombone-utils-gnusocialtools

+ 5
- 5
src/freedombone-utils-gnusocialtools Wyświetl plik

@@ -52,12 +52,12 @@ function qvitter_update_background {
52 52
     if [ -d /var/www/${domain_name}/htdocs/local/plugins/Qvitter/img ]; then
53 53
         if [ -f bg_custom.${ext} ]; then
54 54
             cp bg_custom.${ext} /var/www/${domain_name}/htdocs/local/plugins/Qvitter/img
55
-        fi
56
-        if ! grep -q "bg_custom.${ext}" /var/www/${domain_name}/htdocs/config.php; then
57
-            if grep -q 'sitebackground' /var/www/${domain_name}/htdocs/config.php; then
58
-                sed -i '/sitebackground/d' /var/www/${domain_name}/htdocs/config.php
55
+            if ! grep -q "bg_custom.${ext}" /var/www/${domain_name}/htdocs/config.php; then
56
+                if grep -q 'sitebackground' /var/www/${domain_name}/htdocs/config.php; then
57
+                    sed -i '/sitebackground/d' /var/www/${domain_name}/htdocs/config.php
58
+                fi
59
+                echo "\$config['site']['qvitter']['sitebackground'] = 'img/bg_custom.${ext}';" >> /var/www/${domain_name}/htdocs/config.php
59 60
             fi
60
-            echo "\$config['site']['qvitter']['sitebackground'] = 'img/bg_custom.${ext}';" >> /var/www/${domain_name}/htdocs/config.php
61 61
         fi
62 62
     fi
63 63
 }