Changeset 2baac48
- Timestamp:
- 11/12/11 00:35:51 (6 months ago)
- Branches:
- master
- Children:
- 7195cc7, e1d3d66
- Parents:
- 196ff59
- git-author:
- Michiel Rook <mrook@…> (11/12/11 00:35:51)
- git-committer:
- Michiel Rook <mrook@…> (11/12/11 00:35:51)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
classes/phing/tasks/system/ChownTask.php
rc7dadbf9 r2baac48 35 35 36 36 private $user; 37 private $group; 37 38 38 39 private $filesets = array(); … … 87 88 88 89 /** 90 * Sets the group 91 */ 92 function setGroup($group) { 93 $this->group = $group; 94 } 95 96 /** 89 97 * Nested creator, adds a set of files (nested fileset attribute). 90 98 */ … … 114 122 } 115 123 116 if ($this->user === null ) {117 throw new BuildException("You have to specify an ownerfor chown.");124 if ($this->user === null && $this->group === null) { 125 throw new BuildException("You have to specify either an owner or a group for chown."); 118 126 } 119 127 } … … 131 139 $group = $userElements[1]; 132 140 } else { 133 $group = null;141 $group = $this->group; 134 142 } 135 143 … … 185 193 186 194 try { 187 $file->setUser($user); 195 if (!empty($user)) { 196 $file->setUser($user); 197 } 188 198 189 199 if (!empty($group)) { -
docs/phing_guide/book/chapters/appendixes/AppendixB-CoreTasks.html
rb71d117 r2baac48 365 365 groupname, separated by a dot.</td> 366 366 <td>n/a</td> 367 <td>Yes</td> 367 <td>No</td> 368 </tr> 369 <tr> 370 <td>group</td> 371 <td>String</td> 372 <td>The new group owner of the file.</td> 373 <td>n/a</td> 374 <td>No</td> 368 375 </tr> 369 376 <tr>
Note: See TracChangeset
for help on using the changeset viewer.
