[wp-trac] [WordPress Trac] #21234: Recursive directory creation & get_calendar() for custom post types

WordPress Trac wp-trac at lists.automattic.com
Fri Jul 13 00:28:44 UTC 2012


#21234: Recursive directory creation & get_calendar() for custom post types
--------------------------+------------------------------
 Reporter:  avaddon       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  3.4.1
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by dd32):

 See [http://codex.wordpress.org/IRC this codex page] for a list of the IRC
 channels.

 The patch in the above Github link mixes up what the code is actually
 doing:
 {{{
 $dir_perms = $stat['mode'] & 0007777;
 }}}
 vs
 {{{
  @mkdir( $target, 0777, true )
 }}}

 The latter creates a direcotory wth 777 permissions, the first copies the
 parents permissions to the child (the 7777 is limiting it to a specific
 set of permissions).

 It can indeed be made simpler however, The permission logic can be pulled
 out and moved to before the mkdir() call is ever made. Unfortunately,
 Error suppression is needed for cases where the function emits uncatchable
 warnings (PHP Safe mode IIRC)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21234#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list