WordPress.org

Make WordPress Core

Ticket #37412: 37412.patch

File 37412.patch, 5.5 KB (added by ocean90, 5 years ago)
  • src/wp-admin/includes/class-automatic-upgrader-skin.php

     
    2323
    2424        /**
    2525         *
    26          * @param bool   $error
    27          * @param string $context
    28          * @param bool   $allow_relaxed_file_ownership
    29          * @return bool
     26         *
     27         * @uses request_filesystem_credentials()
     28         *
     29         * @param bool   $error                        Optional. Whether the current request has failed to connect.
     30         *                                             Default false.
     31         * @param string $context                      Optional. Full path to the directory that is tested
     32         *                                             for being writable. Default empty.
     33         * @param bool   $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable.
     34         *                                             Default false.
     35         * @return bool False on failure, true on success.
    3036         */
    3137        public function request_filesystem_credentials( $error = false, $context = '', $allow_relaxed_file_ownership = false ) {
    3238                if ( $context ) {
  • src/wp-admin/includes/class-wp-upgrader-skin.php

     
    6060
    6161        /**
    6262         *
    63          * @param bool   $error
    64          * @param string $context
    65          * @param bool   $allow_relaxed_file_ownership
    66          * @return type
     63         *
     64         * @uses request_filesystem_credentials()
     65         *
     66         * @param bool   $error                        Optional. Whether the current request has failed to connect.
     67         *                                             Default false.
     68         * @param string $context                      Optional. Full path to the directory that is tested
     69         *                                             for being writable. Default empty.
     70         * @param bool   $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable.
     71         *                                             Default false.
     72         * @return bool False on failure, true on success.
    6773         */
    68         public function request_filesystem_credentials( $error = false, $context = false, $allow_relaxed_file_ownership = false ) {
     74        public function request_filesystem_credentials( $error = false, $context = '', $allow_relaxed_file_ownership = false ) {
    6975                $url = $this->options['url'];
    7076                if ( ! $context ) {
    7177                        $context = $this->options['context'];
  • src/wp-admin/includes/file.php

     
    957957 *
    958958 * @param array  $args                         Optional. Connection details. Default empty array.
    959959 * @param string $context                      Optional. Full path to the directory that is tested
    960  *                                             for being writable. Default false.
     960 *                                             for being writable. Default empty.
    961961 * @param bool   $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable.
    962962 *                                             Default false.
    963963 * @return string The transport to use, see description for valid return values.
    964964 */
    965 function get_filesystem_method( $args = array(), $context = false, $allow_relaxed_file_ownership = false ) {
     965function get_filesystem_method( $args = array(), $context = '', $allow_relaxed_file_ownership = false ) {
    966966        $method = defined('FS_METHOD') ? FS_METHOD : false; // Please ensure that this is either 'direct', 'ssh2', 'ftpext' or 'ftpsockets'
    967967
    968968        if ( ! $context ) {
     
    10271027 * Displays a form to the user to request for their FTP/SSH details in order
    10281028 * to connect to the filesystem.
    10291029 *
    1030  * All chosen/entered details are saved, Excluding the Password.
     1030 * All chosen/entered details are saved, excluding the password.
    10311031 *
    10321032 * Hostnames may be in the form of hostname:portnumber (eg: wordpress.org:2467)
    10331033 * to specify an alternate FTP/SSH port.
     
    10351035 * Plugins may override this form by returning true|false via the
    10361036 * {@see 'request_filesystem_credentials'} filter.
    10371037 *
    1038  * @since 2.5.
     1038 * @since 2.5.0
    10391039 *
    10401040 * @global string $pagenow
    10411041 *
     
    10441044 * @param bool   $error                        Optional. Whether the current request has failed to connect.
    10451045 *                                             Default false.
    10461046 * @param string $context                      Optional. Full path to the directory that is tested
    1047  *                                             for being writable. Default false.
     1047 *                                             for being writable. Default empty.
    10481048 * @param array  $extra_fields                 Optional. Extra POST fields which should be checked for
    10491049 *                                             to be included in the post. Default null.
    10501050 * @param bool   $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable.
     
    10521052 *
    10531053 * @return bool False on failure, true on success.
    10541054 */
    1055 function request_filesystem_credentials( $form_post, $type = '', $error = false, $context = false, $extra_fields = null, $allow_relaxed_file_ownership = false ) {
     1055function request_filesystem_credentials( $form_post, $type = '', $error = false, $context = '', $extra_fields = null, $allow_relaxed_file_ownership = false ) {
    10561056        global $pagenow;
    10571057
    10581058        /**