diff --git a/plugins/php/install.sh b/plugins/php/install.sh index e28431f07..26d394747 100755 --- a/plugins/php/install.sh +++ b/plugins/php/install.sh @@ -78,6 +78,12 @@ if [ "${action}" == "install" ] && [ -d ${serverPath}/php/${type} ];then fi echo "install PHP${type} extend end" + + if [ ! -f /usr/local/bin/composer ];then + cd /tmp + curl -sS https://getcomposer.org/installer | php + mv composer.phar /usr/local/bin/composer + fi fi diff --git a/route/static/app/crontab.js b/route/static/app/crontab.js index 306242af9..9a65bbd3a 100755 --- a/route/static/app/crontab.js +++ b/route/static/app/crontab.js @@ -228,19 +228,21 @@ function planAdd(){ var sType = $(".planjs").find("b").attr("val"); var sBody = encodeURIComponent($("#implement textarea[name='sBody']").val()); - - if(sType == 'toFile'){ - if($("#viewfile").val() == ''){ - layer.msg('请选择脚本文件!',{icon:2}); - return; - } - } else { + + if (sType == 'toShell'){ if(sBody == ''){ $("#implement textarea[name='sBody']").focus(); layer.msg('脚本代码不能为空!',{icon:2}); return; } } + + if(sType == 'toFile'){ + if($("#viewfile").val() == ''){ + layer.msg('请选择脚本文件!',{icon:2}); + return; + } + } var urladdress = $("#urladdress").val(); if(sType == 'toUrl'){