Files
webmin/filemin/bookmark.cgi
Ilia Rostovtsev 3d5e013f59 get_paths(); doesn't return proper results
For wheel users (non-root but admins) `get_paths();` has a bug and doesn't work correctly.

It causes some other issues in user mode. Probably, if you on the `inthebox` login as `blog` user and go to File Manager, click copy - Perl Error happens. (under all themes)
2016-04-29 13:19:27 +04:00

24 lines
482 B
Perl
Executable File

#!/usr/local/bin/perl
require './filemin-lib.pl';
use lib './lib';
&ReadParse();
switch_to_remote_user();
$confdir = "$remote_user_info[7]/.filemin";
if(!-e $confdir) {
mkdir $confdir or &error("$text{'error_creating_conf'}: $!");
}
if(!-e "$confdir/.bookmarks") {
utime time, time, "$configdir/.bookmarks";
}
$bookmarks = &read_file_lines($confdir.'/.bookmarks');
push @$bookmarks, $path;
&flush_file_lines("$confdir/.bookmarks");
&redirect("index.cgi?path=$path");