Make WordPress Core

Opened 18 years ago

Closed 18 years ago

#7059 closed defect (bug) (fixed)

WP_filesystem changes to work with new directory constants

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

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 18 years ago.
7059.2.diff (52.9 KB ) - added by DD32 18 years ago.
oops, a extra function sliped in :)
7059.3.diff (13.5 KB ) - added by DD32 18 years ago.
page_templates.diff (567 bytes ) - added by ionfish 18 years ago.

Download all attachments as: .zip

Change History (13)

@DD32
18 years ago

@DD32
18 years ago

oops, a extra function sliped in :)

#1 @ryan
18 years ago

  • Resolutionfixed
  • Status newclosed

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

#2 @ryan
18 years ago

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

#3 @DD32
18 years ago

  • Resolution fixed
  • Status closedreopened

(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
18 years ago

#4 @DD32
18 years ago

attachment 7059.3.diff added.

  • The Base class
  • Corrections to the ftpsockets class.

#5 @DD32
18 years ago

Corrections to the ftpsockets class.

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

#6 @ryan
18 years ago

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

#7 @ionfish
18 years ago

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

#8 @ryan
18 years ago

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

#9 @ryan
18 years ago

  • Milestone 2.92.6
  • Resolutionfixed
  • Status reopenedclosed
Note: See TracTickets for help on using tickets.