Write .htaccess update only if not already written
Write .htaccess update only if not already written

The ownCloud update routine also runs the "updateHtaccess" code in case only an application gets updated. This leads to having entries multiple time in the .htaccess file leading to unpredictable behaviour.

With 9.0 we added the "#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####" entry to the .htaccess file, this change uses it to ensure that only to the .htaccess gets written if the file has not been modified already. Since the .htaccess modifications are optional this is not a big deal.

Without this change updates of applications can break the rewrite rules (ending in endless redirects) as well as breaking the code integrity checker.

Ardinis/server,cernbox/core,endsguy/server,nextcloud/server,sharidas/core,sharidas/core,owncloud/core,pixelipo/server,cernbox/core,xx621998xx/server,pmattern/server,whitekiba/server,cernbox/core,michaelletzgus/nextcloud-server,whitekiba/server,endsguy/server,nextcloud/server,IljaN/core,andreas-p/nextcloud-server,andreas-p/nextcloud-server,pmattern/server,michaelletzgus/nextcloud-server,endsguy/server,Ardinis/server,jbicha/server,cernbox/core,jbicha/server,owncloud/core,andreas-p/nextcloud-server,whitekiba/server,Ardinis/server,bluelml/core,owncloud/core,pixelipo/server,pixelipo/server,IljaN/core,Ardinis/server,jbicha/server,pollopolea/core,whitekiba/server,sharidas/core,IljaN/core,pixelipo/server,IljaN/core,sharidas/core,michaelletzgus/nextcloud-server,Ardinis/server,jbicha/server,bluelml/core,pollopolea/core,pixelipo/server,xx621998xx/server,pmattern/server,owncloud/core,bluelml/core,sharidas/core,whitekiba/server,pmattern/server,endsguy/server,nextcloud/server,xx621998xx/server,pollopolea/core,endsguy/server,pollopolea/core,andreas-p/nextcloud-server,xx621998xx/server,xx621998xx/server,pmattern/server,owncloud/core,IljaN/core,nextcloud/server,michaelletzgus/nextcloud-server,jbicha/server,bluelml/core,pollopolea/core,phil-davis/core,cernbox/core,andreas-p/nextcloud-server,bluelml/core