mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Fix ob get clean
This commit is contained in:
parent
33bc92914a
commit
56f5a8574c
8 changed files with 24 additions and 30 deletions
|
@ -7999,7 +7999,7 @@ function _ob_start($force=false) {
|
||||||
$global['ob_start_callback'] = null;
|
$global['ob_start_callback'] = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (empty($force) && ob_get_level()) {
|
if (!empty($global['ob_start_callback']) && empty($force) && ob_get_level()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ob_start($global['ob_start_callback']);
|
ob_start($global['ob_start_callback']);
|
||||||
|
@ -8024,7 +8024,7 @@ function _ob_get_clean() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getIncludeFileContent($filePath, $varsArray=array()){
|
function getIncludeFileContent($filePath, $varsArray=array()){
|
||||||
global $global;
|
global $global, $config;
|
||||||
if(!empty($global['getIncludeFileContent'])){
|
if(!empty($global['getIncludeFileContent'])){
|
||||||
return getIncludeFileContentV2($filePath, $varsArray);
|
return getIncludeFileContentV2($filePath, $varsArray);
|
||||||
}else{
|
}else{
|
||||||
|
@ -8033,7 +8033,7 @@ function getIncludeFileContent($filePath, $varsArray=array()){
|
||||||
}
|
}
|
||||||
|
|
||||||
function getIncludeFileContentV1($filePath, $varsArray=array()){
|
function getIncludeFileContentV1($filePath, $varsArray=array()){
|
||||||
global $global;
|
global $global, $config;
|
||||||
foreach ($varsArray as $key => $value) {
|
foreach ($varsArray as $key => $value) {
|
||||||
$$key = $value;
|
$$key = $value;
|
||||||
}
|
}
|
||||||
|
@ -8067,7 +8067,7 @@ function getIncludeFileContentV1($filePath, $varsArray=array()){
|
||||||
}
|
}
|
||||||
|
|
||||||
function getIncludeFileContentV2($filePath, $varsArray=array()){
|
function getIncludeFileContentV2($filePath, $varsArray=array()){
|
||||||
global $global;
|
global $global, $config;
|
||||||
foreach ($varsArray as $key => $value) {
|
foreach ($varsArray as $key => $value) {
|
||||||
$$key = $value;
|
$$key = $value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,7 +188,7 @@ class Cache extends PluginAbstract
|
||||||
global $global;
|
global $global;
|
||||||
$obj = $this->getDataObject();
|
$obj = $this->getDataObject();
|
||||||
echo PHP_EOL . '<!-- Page Generated in ' . getScriptRunMicrotimeInSeconds() . ' Seconds -->';
|
echo PHP_EOL . '<!-- Page Generated in ' . getScriptRunMicrotimeInSeconds() . ' Seconds -->';
|
||||||
$c = ob_get_clean();
|
$c = _ob_get_clean();
|
||||||
$c = optimizeHTMLTags($c);
|
$c = optimizeHTMLTags($c);
|
||||||
_ob_start();
|
_ob_start();
|
||||||
echo $c;
|
echo $c;
|
||||||
|
|
|
@ -231,12 +231,9 @@ class Gallery extends PluginAbstract {
|
||||||
|
|
||||||
public static function getAddChannelToGalleryButton($users_id){
|
public static function getAddChannelToGalleryButton($users_id){
|
||||||
global $global, $config;
|
global $global, $config;
|
||||||
$variable = ob_get_clean();
|
$filePath = $global['systemRootPath'] . 'plugin/Gallery/buttonChannelToGallery.php';
|
||||||
_ob_start();
|
$varsArray=array('users_id'=>$users_id);
|
||||||
include $global['systemRootPath'] . 'plugin/Gallery/buttonChannelToGallery.php';
|
$button = getIncludeFileContent($filePath, $varsArray);
|
||||||
$button = ob_get_clean();
|
|
||||||
_ob_start();
|
|
||||||
echo $variable;
|
|
||||||
return $button;
|
return $button;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -117,10 +117,10 @@
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
include $global['systemRootPath'] . 'plugin/Gallery/view/modeGalleryCategoryLive.php';
|
include $global['systemRootPath'] . 'plugin/Gallery/view/modeGalleryCategoryLive.php';
|
||||||
$ob = ob_get_clean();
|
$ob = _ob_get_clean();
|
||||||
_ob_start();
|
_ob_start();
|
||||||
echo AVideoPlugin::getGallerySection();
|
echo AVideoPlugin::getGallerySection();
|
||||||
$ob2 = ob_get_clean();
|
$ob2 = _ob_get_clean();
|
||||||
echo $ob;
|
echo $ob;
|
||||||
if (empty($contentSearchFound) && empty($ob2)) {
|
if (empty($contentSearchFound) && empty($ob2)) {
|
||||||
$contentSearchFound = false;
|
$contentSearchFound = false;
|
||||||
|
|
|
@ -105,6 +105,6 @@ if (!$ms->getPublic()) {
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
$obj->html = ob_get_clean();
|
$obj->html = _ob_get_clean();
|
||||||
die(json_encode($obj));
|
die(json_encode($obj));
|
||||||
?>
|
?>
|
|
@ -282,12 +282,11 @@ class ReportVideo extends PluginAbstract
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
global $global, $config;
|
global $global, $config;
|
||||||
$variable = ob_get_clean();
|
|
||||||
_ob_start();
|
$filePath = $global['systemRootPath'] . 'plugin/ReportVideo/buttonBlockUser.php';
|
||||||
include $global['systemRootPath'] . 'plugin/ReportVideo/buttonBlockUser.php';
|
$varsArray=array('users_id'=>$users_id);
|
||||||
$button = ob_get_clean();
|
$button = getIncludeFileContent($filePath, $varsArray);
|
||||||
_ob_start();
|
|
||||||
echo $variable;
|
|
||||||
return $button;
|
return $button;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -297,12 +296,10 @@ class ReportVideo extends PluginAbstract
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
global $global, $config;
|
global $global, $config;
|
||||||
$variable = ob_get_clean();
|
|
||||||
_ob_start();
|
$filePath = $global['systemRootPath'] . 'plugin/ReportVideo/actionButtonBlockUser.php';
|
||||||
include $global['systemRootPath'] . 'plugin/ReportVideo/actionButtonBlockUser.php';
|
$varsArray=array('users_id'=>$users_id);
|
||||||
$button = ob_get_clean();
|
$button = getIncludeFileContent($filePath, $varsArray);
|
||||||
_ob_start();
|
|
||||||
echo $variable;
|
|
||||||
return $button;
|
return $button;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,7 +139,7 @@ $videosCounter = 0;
|
||||||
<a class="pagination__next" href="<?php echo $global['webSiteRootURL']; ?>plugin/YouPHPFlix2/view/modeFlixCategory.php?current=<?php echo count($categories) ? $_REQUEST['current'] + 1 : $_REQUEST['current']; ?>&rrating=<?php echo @$_GET['rrating']; ?>"></a>
|
<a class="pagination__next" href="<?php echo $global['webSiteRootURL']; ?>plugin/YouPHPFlix2/view/modeFlixCategory.php?current=<?php echo count($categories) ? $_REQUEST['current'] + 1 : $_REQUEST['current']; ?>&rrating=<?php echo @$_GET['rrating']; ?>"></a>
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
$cache = ob_get_clean();
|
$cache = _ob_get_clean();
|
||||||
|
|
||||||
ObjectYPT::setCache($cacheName, $cache);
|
ObjectYPT::setCache($cacheName, $cache);
|
||||||
|
|
||||||
|
|
|
@ -512,10 +512,10 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
||||||
</li>
|
</li>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
$output = ob_get_clean();
|
$output = _ob_get_clean();
|
||||||
_ob_start();
|
_ob_start();
|
||||||
echo AVideoPlugin::getUploadMenuButton();
|
echo AVideoPlugin::getUploadMenuButton();
|
||||||
$getUploadMenuButton = ob_get_clean();
|
$getUploadMenuButton = _ob_get_clean();
|
||||||
_ob_start();
|
_ob_start();
|
||||||
if (!empty($getUploadMenuButton)) {
|
if (!empty($getUploadMenuButton)) {
|
||||||
?>
|
?>
|
||||||
|
@ -532,7 +532,7 @@ if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !emp
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<?php
|
<?php
|
||||||
$getUploadMenuButton = ob_get_clean();
|
$getUploadMenuButton = _ob_get_clean();
|
||||||
_ob_start();
|
_ob_start();
|
||||||
}
|
}
|
||||||
echo $output . $getUploadMenuButton;
|
echo $output . $getUploadMenuButton;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue