Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Properly setting multisite.name during create-project phase. #1170

Merged
merged 1 commit into from
Mar 9, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions phing/tasks/properties.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,18 @@
</not>
<!-- Build the sites list if not specified by the user. -->
<then>
<!-- Find directories in ${docroot}/sites/*/ and format into a comma-separated list. -->
<exec command="find ${docroot}/sites/* -maxdepth 0 -type d | sed -e 's%${docroot}/sites/%%g' -e '2,$s%^%,%' | tr -d '\n'"
outputProperty="multisite.name" logoutput="false" checkreturn="true"/>
<!-- If we are in the midst of project creation, docroot/sites will not exist yet. -->
<if>
<available file="${docroot}/sites"/>
<then>
<!-- Find directories in ${docroot}/sites/*/ and format into a comma-separated list. -->
<exec command="find ${docroot}/sites/* -maxdepth 0 -type d | sed -e 's%${docroot}/sites/%%g' -e '2,$s%^%,%' | tr -d '\n'"
outputProperty="multisite.name" logoutput="false" checkreturn="true"/>
</then>
<else>
<property name="multisite.name" value="default" override="true"/>
</else>
</if>
</then>
</if>

Expand Down