mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 10:49:36 +02:00
This commit is contained in:
parent
d1f7920784
commit
ff7830cc08
2 changed files with 30 additions and 14 deletions
|
@ -78,7 +78,8 @@ class CustomizeUser extends PluginAbstract {
|
|||
$obj->afterLogoffGoToMyChannel = false;
|
||||
$obj->afterLogoffGoToURL = "";
|
||||
$obj->allowDonationLink = false;
|
||||
$obj->donationButtonLabel = __('Donation');;
|
||||
$obj->donationButtonLabel = __('Donation');
|
||||
;
|
||||
|
||||
$obj->showEmailVerifiedMark = true;
|
||||
|
||||
|
@ -294,4 +295,19 @@ class CustomizeUser extends PluginAbstract {
|
|||
$this->getModeYouTube($videos_id);
|
||||
}
|
||||
|
||||
public function getStart() {
|
||||
global $global;
|
||||
$obj = $this->getDataObject();
|
||||
$thisScriptFile = pathinfo($_SERVER["SCRIPT_FILENAME"]);
|
||||
if (!empty($obj->userMustBeLoggedIn) &&
|
||||
($thisScriptFile["basename"] === 'index.php' ||
|
||||
$thisScriptFile["basename"] === "channel.php" ||
|
||||
$thisScriptFile["basename"] === "channels.php" ||
|
||||
$thisScriptFile["basename"] === "trending.php") &&
|
||||
!User::isLogged()) {
|
||||
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||
header("Location: {$global['webSiteRootURL']}user?redirectUri=" . urlencode($actual_link));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1029,7 +1029,7 @@ if (((empty($advancedCustomUser->userMustBeLoggedIn) && empty($advancedCustom->d
|
|||
echo $advancedCustom->underMenuBarHTMLCode->value;
|
||||
}
|
||||
} else if ($thisScriptFile["basename"] !== 'user.php' && empty($advancedCustom->disableNavbar)) {
|
||||
header("Location: {$global['webSiteRootURL']}user");
|
||||
|
||||
}
|
||||
unset($_GET['parentsOnly']);
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue