Improve Filesystem method choice for 'direct'; introduce FS_METHOD constant.
|Reported by:||dd32||Owned by:||dd32|
Just talking with azaozz on IRC, It seems that the core upgrades are failing on some hosts due to filesystem permissions errors, Which can be traced back to the systems temporary directory being writable, whilst the actual ABSPATH directory is unwritable.
The attached patch changes get_filesystem_method() to attempt to create a file in ABSPATH called .<current unix time>.
The checks for file ownership are still present.
Patch also introduces the constant 'FS_METHOD' which can be used along side the filesystem_method filter & other filesystem constants to work around any incorrect-choices which come up.