diff --git a/mod/fbrowser.php b/mod/fbrowser.php index 09ecf032e7..9a0e9244c1 100644 --- a/mod/fbrowser.php +++ b/mod/fbrowser.php @@ -12,24 +12,23 @@ require_once('include/Photo.php'); */ function fbrowser_content(App $a) { - if (!local_user()) + if (!local_user()) { killme(); + } - if ($a->argc==1) + if ($a->argc == 1) { killme(); + } $template_file = "filebrowser.tpl"; $mode = ""; if (x($_GET,'mode')) { - $template_file = "filebrowser_plain.tpl"; $mode = "?mode=".$_GET['mode']; } - //echo "
"; var_dump($a->argv); killme(); - - switch($a->argv[1]){ + switch ($a->argv[1]) { case "image": - $path = array( array("", t("Photos"))); + $path = array(array("", t("Photos"))); $albums = false; $sql_extra = ""; $sql_extra2 = " ORDER BY created DESC LIMIT 0, 10"; diff --git a/view/templates/filebrowser.tpl b/view/templates/filebrowser.tpl index c40b854743..2c683f784a 100644 --- a/view/templates/filebrowser.tpl +++ b/view/templates/filebrowser.tpl @@ -1,88 +1,50 @@ - - - - - - + + ++- // insert information now - win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = URL; ++ {{foreach $path as $p}}{{$p.1}}{{/foreach}} +- // are we an image browser - if (typeof(win.ImageDialog) != "undefined") { - // we are, so update image dimensions... - if (win.ImageDialog.getImageData) - win.ImageDialog.getImageData(); - - // ... and preview if necessary - if (win.ImageDialog.showPreviewImage) - win.ImageDialog.showPreviewImage(URL); - } - - // close popup window - tinyMCEPopup.close(); - } - } - - tinyMCEPopup.onInit.add(FileBrowserDialogue.init, FileBrowserDialogue); - - - - ---
- FileBrowser
+ {{if $folders }} ++-+ {{foreach $folders as $f}}
- {{$f.1}}
{{/foreach}}+ {{/if}} --+ + - + diff --git a/view/templates/filebrowser_plain.tpl b/view/templates/filebrowser_plain.tpl deleted file mode 100644 index 1ebf8a2ccb..0000000000 --- a/view/templates/filebrowser_plain.tpl +++ /dev/null @@ -1,51 +0,0 @@ - - - - - -- {{foreach $path as $p}}{{$p.1}}{{/foreach}} ----- {{foreach $folders as $f}}
-- {{$f.1}}
{{/foreach}} --+- {{foreach $files as $f}} -
-- {{$f.1}}
- {{/foreach}} -+ {{foreach $files as $f}} + + {{/foreach}}-- -+ ++ ++-- - - - -- {{foreach $path as $p}}{{$p.1}}{{/foreach}} -- - {{if $folders }} --- {{/if}} - -- {{foreach $folders as $f}}
-- {{$f.1}}
{{/foreach}} -- {{foreach $files as $f}} -- -- - -- {{/foreach}} -{{$f.1}}
- -- --