Kirill Subbotin
|
Friday 08 September 2006 9:53:10 am
Yes, this seems to be a bug. Gonna be ok in OE 4.1.3. Meanwhile here is the patch, please check it. This patch also includes fix for bug #8985 (Uploading of an object under the current object doesn't work properly).
Index: design/standard/templates/ezdhtml/insertobject.tpl
===================================================================
--- design/standard/templates/ezdhtml/insertobject.tpl (revision 15077)
+++ design/standard/templates/ezdhtml/insertobject.tpl (working copy)
@@ -18,27 +18,27 @@
<label>{"Location"|i18n("design/standard/ezdhtml")}:</label>
<select name="location">
<option value="auto">{"Automatic"|i18n("design/standard/ezdhtml")}</option>
- {def $root_node_value=ezini( 'LocationSettings', 'RootNode', 'upload.ini' )
+ {let $root_node_value=ezini( 'LocationSettings', 'RootNode', 'upload.ini' )
$root_node=cond( $root_node_value|is_numeric, fetch( content, node, hash( node_id, $root_node_value ) ),
fetch( content, node, hash( node_path, $root_node_value ) ) )
$content_object=fetch( content, object, hash( object_id, $object_id ) )}
- {section show=$content_object.current_version|gt(1)}
+ {section show=$content_object.published}
<option value="{$content_object.main_node_id}">{$content_object.name}</option>
{/section}
- {def $selection_list=fetch( 'content', 'tree',
+ {let $selection_list=fetch( 'content', 'tree',
hash( 'parent_node_id', $root_node.node_id,
'class_filter_type', include,
'class_filter_array', ezini( 'LocationSettings', 'ClassList', 'upload.ini' ),
'depth', ezini( 'LocationSettings', 'MaxDepth', 'upload.ini' ),
- 'depth_operator', 'lt',
+ 'depth_operator', 'lt',
'limit', ezini( 'LocationSettings', 'MaxItems', 'upload.ini' ) ) )}
- {foreach $selection_list as $selection}
- {if $selection.can_create}
- <option value="{$selection.node_id}">{' '|repeat( sub( $selection.depth, $root_node.depth, 1 ) )}{$selection.name|wash}</option>
- {/if}
- {/foreach}
- {undef $root_node_value $root_node $selection_list $content_object $selection_first}
+ {section loop=$selection_list}
+ {section show=$item.can_create}
+ <option value="{$item.node_id}">{' '|repeat( sub( $item.depth, $root_node.depth, 1 ) )}{$item.name|wash}</option>
+ {/section}
+ {/section}
+ {/let}{/let}
</select>
</div>
Index: design/standard/templates/ezdhtml/insertobject_gecko.tpl
===================================================================
--- design/standard/templates/ezdhtml/insertobject_gecko.tpl (revision 15077)
+++ design/standard/templates/ezdhtml/insertobject_gecko.tpl (working copy)
@@ -25,27 +25,26 @@
<label>{"Location"|i18n("design/standard/ezdhtml")}:</label>
<select name="location">
<option value="auto">{"Automatic"|i18n("design/standard/ezdhtml")}</option>
- {def $root_node_value=ezini( 'LocationSettings', 'RootNode', 'upload.ini' )
+ {let $root_node_value=ezini( 'LocationSettings', 'RootNode', 'upload.ini' )
$root_node=cond( $root_node_value|is_numeric, fetch( content, node, hash( node_id, $root_node_value ) ),
fetch( content, node, hash( node_path, $root_node_value ) ) )
$content_object=fetch( content, object, hash( object_id, $object_id ) )}
- {section show=$content_object.current_version|gt(1)}
+ {section show=$content_object.published}
<option value="{$content_object.main_node_id}">{$content_object.name}</option>
{/section}
- {def $selection_list=fetch( 'content', 'tree',
+ {let $selection_list=fetch( 'content', 'tree',
hash( 'parent_node_id', $root_node.node_id,
'class_filter_type', include,
'class_filter_array', ezini( 'LocationSettings', 'ClassList', 'upload.ini' ),
'depth', ezini( 'LocationSettings', 'MaxDepth', 'upload.ini' ),
'depth_operator', 'lt',
'limit', ezini( 'LocationSettings', 'MaxItems', 'upload.ini' ) ) )}
-
- {foreach $selection_list as $selection}
- {if $selection.can_create}
- <option value="{$selection.node_id}">{' '|repeat( sub( $selection.depth, $root_node.depth, 1 ) )}{$selection.name|wash}</option>
- {/if}
- {/foreach}
- {undef $root_node_value $root_node $selection_list $content_object $selection_first}
+ {section loop=$selection_list}
+ {section show=$item.can_create}
+ <option value="{$item.node_id}">{' '|repeat( sub( $item.depth, $root_node.depth, 1 ) )}{$item.name|wash}</option>
+ {/section}
+ {/section}
+ {/let}{/let}
</select>
</div>
|