aboutsummaryrefslogtreecommitdiffstats
path: root/mod/fbrowser.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/fbrowser.php')
-rw-r--r--mod/fbrowser.php32
1 files changed, 16 insertions, 16 deletions
diff --git a/mod/fbrowser.php b/mod/fbrowser.php
index 13abbfd8a..96e0fe953 100644
--- a/mod/fbrowser.php
+++ b/mod/fbrowser.php
@@ -15,19 +15,19 @@ function fbrowser_content($a){
if (!local_channel())
killme();
- if ($a->argc==1)
+ if (App::$argc==1)
killme();
- //echo "<pre>"; var_dump($a->argv); killme();
+ //echo "<pre>"; var_dump(App::$argv); killme();
- switch($a->argv[1]){
+ switch(App::$argv[1]){
case "image":
- $path = array( array($a->get_baseurl()."/fbrowser/image/", t("Photos")));
+ $path = array( array(z_root()."/fbrowser/image/", t("Photos")));
$albums = false;
$sql_extra = "";
$sql_extra2 = " ORDER BY created DESC LIMIT 0, 10";
- if ($a->argc==2){
+ if (App::$argc==2){
$albums = q("SELECT distinct(`album`) AS `album` FROM `photo` WHERE `uid` = %d ",
intval(local_channel())
);
@@ -38,11 +38,11 @@ function fbrowser_content($a){
}
$album = "";
- if ($a->argc==3){
- $album = hex2bin($a->argv[2]);
+ if (App::$argc==3){
+ $album = hex2bin(App::$argv[2]);
$sql_extra = sprintf("AND `album` = '%s' ",dbesc($album));
$sql_extra2 = "";
- $path[]=array($a->get_baseurl()."/fbrowser/image/".$a->argv[2]."/", $album);
+ $path[]=array(z_root()."/fbrowser/image/".App::$argv[2]."/", $album);
}
$r = q("SELECT `resource_id`, `id`, `filename`, type, min(`scale`) AS `hiq`,max(`scale`) AS `loq`, `description`
@@ -60,9 +60,9 @@ function fbrowser_content($a){
$filename_e = $rr['filename'];
return array(
- $a->get_baseurl() . '/photo/' . $rr['resource_id'] . '-' . $rr['hiq'] . '.' .$ext,
+ z_root() . '/photo/' . $rr['resource_id'] . '-' . $rr['hiq'] . '.' .$ext,
$filename_e,
- $a->get_baseurl() . '/photo/' . $rr['resource_id'] . '-' . $rr['loq'] . '.'. $ext
+ z_root() . '/photo/' . $rr['resource_id'] . '-' . $rr['loq'] . '.'. $ext
);
}
$files = array_map("files1", $r);
@@ -70,7 +70,7 @@ function fbrowser_content($a){
$tpl = get_markup_template("filebrowser.tpl");
echo replace_macros($tpl, array(
'$type' => 'image',
- '$baseurl' => $a->get_baseurl(),
+ '$baseurl' => z_root(),
'$path' => $path,
'$folders' => $albums,
'$files' =>$files,
@@ -80,7 +80,7 @@ function fbrowser_content($a){
break;
case "file":
- if ($a->argc==2){
+ if (App::$argc==2){
$files = q("SELECT id, filename, filetype FROM `attach` WHERE `uid` = %d ",
intval(local_channel())
);
@@ -89,14 +89,14 @@ function fbrowser_content($a){
list($m1,$m2) = explode("/",$rr['filetype']);
$filetype = ( (file_exists("images/icons/$m1.png"))?$m1:"zip");
- if($a->get_template_engine() === 'internal') {
+ if(App::get_template_engine() === 'internal') {
$filename_e = template_escape($rr['filename']);
}
else {
$filename_e = $rr['filename'];
}
- return array( $a->get_baseurl() . '/attach/' . $rr['id'], $filename_e, $a->get_baseurl() . '/images/icons/16/' . $filetype . '.png');
+ return array( z_root() . '/attach/' . $rr['id'], $filename_e, z_root() . '/images/icons/16/' . $filetype . '.png');
}
$files = array_map("files2", $files);
//echo "<pre>"; var_dump($files); killme();
@@ -105,8 +105,8 @@ function fbrowser_content($a){
$tpl = get_markup_template("filebrowser.tpl");
echo replace_macros($tpl, array(
'$type' => 'file',
- '$baseurl' => $a->get_baseurl(),
- '$path' => array( array($a->get_baseurl()."/fbrowser/image/", t("Files")) ),
+ '$baseurl' => z_root(),
+ '$path' => array( array(z_root()."/fbrowser/image/", t("Files")) ),
'$folders' => false,
'$files' =>$files,
'$cancel' => t('Cancel'),