Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#7059 closed defect (bug) (fixed)

WP_filesystem changes to work with new directory constants

Reported by: dd32's profile DD32 Owned by:
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.6
Component: Administration Keywords: has-patch needs-testing
Focuses: Cc:

Description

Thanks to #6938 and [7999] the WP Filesystem abstraction classes need a update in order for the plugin upgrader to continue working.

  • All Fielsystem classes now extend the WP_Filesystem_Base class
  • The code now has a few methods to get the various folders needed: wp_content_dir(), wp_plugins_dir(), abspath(), wp_themes_dir()
  • The find_folder() method should locate any real path on the server hopefully. Be warned there will be cases where it'll locate the wrong folder if the requested folder doesnt exist.
  • The gethchmod() and getnumchmodfromh() methods which were common have been moved to the base calss
  • The upgrader code has a few extra error cases builtin (Eg. Copy Failed messages will now indicate what copy process failed)
  • A lot of whitespace additions to the classes

Warning: Tested in a few setups, Needs a full testing with a variety of custom setups.

Attachments (4)

7059.diff (52.4 KB) - added by DD32 16 years ago.
7059.2.diff (52.9 KB) - added by DD32 16 years ago.
oops, a extra function sliped in :)
7059.3.diff (13.5 KB) - added by DD32 16 years ago.
page_templates.diff (567 bytes) - added by ionfish 16 years ago.

Download all attachments as: .zip

Change History (13)

@DD32
16 years ago

@DD32
16 years ago

oops, a extra function sliped in :)

#1 @ryan
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [8009]) Make WP_Filesystem work with new directory constants. Props DD32. fixes #7059

#2 @ryan
16 years ago

(In [8010]) Typo fixes from azaozz. see #7059

#3 @DD32
16 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

(In [8009]) Make WP_Filesystem work with new directory constants. Props DD32. fixes #7059

The patch included an extra file wp-admin/includes/class-wp-filesystem-base.php which wasnt commited.

Thanks for the catch on the typo's Azaozz, I really need a spellcheck plugin for Dreamweaver that understands literal strings..

@DD32
16 years ago

#4 @DD32
16 years ago

attachment 7059.3.diff added.

  • The Base class
  • Corrections to the ftpsockets class.

#5 @DD32
16 years ago

Corrections to the ftpsockets class.

Note: That this is not the same as the one in the original patch.

#6 @ryan
16 years ago

(In [8018]) WP_Filesystem updates from DD32. See #7059

#7 @ionfish
16 years ago

get_page_templates() was breaking for me, attached patch fixed it.

#8 @ryan
16 years ago

(In [8051]) Use WP_CONTENT_DIR in get_page_templates(). Props ionfish. see #7059

#9 @ryan
16 years ago

  • Milestone changed from 2.9 to 2.6
  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.