浏览代码

Only if custom image is present

Bob Mottram 7 年前
父节点
当前提交
9ce9d5dae4
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5
    5
      src/freedombone-utils-gnusocialtools

+ 5
- 5
src/freedombone-utils-gnusocialtools 查看文件

@@ -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
 }