mirror of
https://github.com/prasathmani/tinyfilemanager.git
synced 2026-04-26 19:05:54 +03:00
[GH-ISSUE #120] User's subfolder problem #84
Labels
No labels
Feature
Feature
Is It Really an Issue?
Need More Info
Request
Security
bug
duplicate
enhancement
enhancement
help wanted
invalid
pull-request
question
suggestion
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tinyfilemanager#84
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @panverger on GitHub (Jan 19, 2019).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/120
When you set specific directory for user direct link is not formed correct
I added a new line under 143 and now is ok
Check it yourself
// clean $root_url
$root_url = fm_clean_path($root_url);
New line
$root_url = isset($directories_users[$_SESSION[FM_SESSION_ID]['logged']]) ? $root_url.'fm/'.$directories_users[$_SESSION[FM_SESSION_ID]['logged']] : $root_url;
@panverger commented on GitHub (Jan 20, 2019):
final solution - adding these lines all are ok
if (isset($_SESSION[FM_SESSION_ID]['logged'])) {
$wd = dirname($_SERVER['PHP_SELF']);
$wd = ltrim($wd, '/');
$root_url = !empty($directories_users[$_SESSION[FM_SESSION_ID]['logged']]) ? $root_url. $wd. '/'.$directories_users[$_SESSION[FM_SESSION_ID]['logged']] : $root_url;
}
@prasathmani commented on GitHub (Jan 20, 2019):
@panverger added your solution. It will work for normal flow(using
DOCUMENT_ROOT),Problem still exist on flowing cases,
$root_path@panverger commented on GitHub (Jan 20, 2019):
Thank's a lot. It's a very useful code. I'll be using this file while teaching my class. Every student has his own folder where he can save his exercises.
@simon511000 commented on GitHub (Jan 20, 2019):
Hey @panverger ! I also recommend agora, my technology teacher uses it
@prasathmani commented on GitHub (Jan 21, 2019):
Closing the ticket as the primary problem solved and with known issues.