Merge
This commit is contained in:
commit
de077b0e51
10 changed files with 42 additions and 54 deletions
|
|
@ -35,10 +35,10 @@ fn blagh_init {
|
|||
<link rel="alternate" type="application/rss+xml" title="RSS" href="'$"u'.rss" />'
|
||||
}
|
||||
if not if(~ $req_path $blagh_uri^index.atom)
|
||||
blagh_setup_feed_handlers atom.tpl
|
||||
blagh_setup_feed_handlers atom.tpl 'application/atom+xml'
|
||||
|
||||
if not if(~ $req_path $blagh_uri^index.rss)
|
||||
blagh_setup_feed_handlers rss20.tpl
|
||||
blagh_setup_feed_handlers rss20.tpl 'text/xml; charset=utf-8'
|
||||
|
||||
if not if(~ $req_path $blagh_uri^new_post && ! ~ $#editor_mode 0) {
|
||||
handler_body_main=( tpl_handler `{get_lib_file blagh/new_post.tpl apps/blagh/new_post.tpl} )
|
||||
|
|
@ -56,6 +56,7 @@ fn blagh_init {
|
|||
fn blagh_setup_feed_handlers {
|
||||
handler_body_main=NOT_USED_by_blagh_feeds
|
||||
res_tail=()
|
||||
http_content_type=$2
|
||||
headers=()
|
||||
master_template=apps/blagh/$1 # Should we allow tempalte override?
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
Content-Type: application/atom+xml
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
%{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
Content-Type: text/xml; charset=utf-8
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
%{
|
||||
|
|
|
|||
|
|
@ -8,32 +8,15 @@ fn dirdir_init {
|
|||
if(! ~ $#enable_wiki 0 && check_user $wiki_editors_groups) {
|
||||
dirdir_file=$local_path.md
|
||||
dirdir_dir=$dirdir_file^'_werc/dirdir/'
|
||||
|
||||
if(test -f $local_path.md) {
|
||||
if(~ $#post_arg_dirdir_save 1 && ! ~ $"post_arg_edit_text '')
|
||||
save_page
|
||||
|
||||
if(~ 1 $#post_arg_dirdir_edit $#post_arg_dirdir_preview)
|
||||
handler_body_main=(tpl_handler `{get_lib_file dirdir/edit.tpl apps/dirdir/edit.tpl})
|
||||
|
||||
if not if(~ 1 $#post_arg_dirdir_edit $#post_arg_dirdir_preview)
|
||||
handler_body_main=(tpl_handler \
|
||||
`{get_lib_file dirdir/edit.tpl apps/dirdir/edit.tpl})
|
||||
|
||||
if not if(! ~ $REQUEST_METHOD POST)
|
||||
ll_add handlers_bar_left tpl_handler \
|
||||
apps/dirdir/sidebar_controls.tpl
|
||||
}
|
||||
|
||||
if not if(~ 1 $#post_arg_dirdir_edit)
|
||||
handler_body_main=(tpl_handler \
|
||||
`{get_lib_file dirdir/edit.tpl apps/dirdir/edit.tpl})
|
||||
|
||||
if not if(~ 1 $#post_arg_dirdir_save) {
|
||||
mkdir -p `{basename -d $local_path}
|
||||
if not if(! ~ '' $"post_arg_dirdir_save $"post_arg_edit_text)
|
||||
save_page
|
||||
}
|
||||
if not if(~ $"handler_body_main '')
|
||||
ll_add handlers_bar_left tpl_handler \
|
||||
apps/dirdir/sidebar_controls.tpl
|
||||
|
||||
if not if(~ $"handler_body_main '' || {~ $REQUEST_METHOD GET && test -f $local_path.md})
|
||||
ll_add handlers_bar_left tpl_handler apps/dirdir/sidebar_controls.tpl
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue