xowiki::Package instproc item_info_from_url
<instance of xowiki::Package> item_info_from_url
Defined in
- Testcases:
-
path_resolve, xowiki
Source code:
if {$with_package_prefix && [string match "/*" $url]} {
set url [string range $url [string length [:package_url]] end]
}
if {$default_lang eq ""} {set default_lang [:default_language]}
:get_lang_and_name -default_lang $default_lang -path $url (lang) stripped_url
set (parent_id) [:get_parent_and_name -lang $(lang) -path $stripped_url -parent_id ${:folder_id} parent local_name]
if {![regexp {^(download)/(.+)$} $(lang) _ (method) (lang)]} {
set (method) ""
if {$(lang) eq "tag"} {
set tag $stripped_url
:validate_tag $tag
set summary [string is true -strict [::xo::cc query_parameter summary:boolean 0]]
set popular [string is true -strict [::xo::cc query_parameter popular:boolean 0]]
set tag_kind [expr {$popular ? "ptag" :"tag"}]
set weblog_page [:get_parameter -check_query_parameter false weblog_page:graph]
:get_lang_and_name -default_lang $default_lang -name $weblog_page (lang) local_name
set :object $weblog_page
::xo::cc set actual_query $tag_kind=$tag&summary=$summary
}
}
array set "" [:prefixed_lookup -parent_id $(parent_id) -default_lang $default_lang -lang $(lang) -stripped_name $local_name]
if {$(item_id) == 0} {
::xo::db::CrClass get_instance_from_db -item_id $(parent_id)
if {[$(parent_id) is_link_page]} {
set link_id $(parent_id)
set target [::$link_id get_target_from_link_page]
$target set_resolve_context -package_id ${:id} -parent_id $link_id
array set "" [list logical_package_id ${:id} logical_parent_id $link_id]
array set "" [[$target package_id] prefixed_lookup -parent_id [$target item_id] -default_lang $default_lang -lang $(lang) -stripped_name $(stripped_name)]
}
}
return [array get ""]
XQL Not present:Generic, PostgreSQL, Oracle
[
hide source ]
| [
make this the default ]