mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Remove unecessary mysql_connect
This commit is contained in:
parent
8e24038533
commit
f3d50e60e0
7 changed files with 45 additions and 45 deletions
|
@ -1282,7 +1282,7 @@ if (!class_exists('Video')) {
|
|||
$videosArrayId = VideoTags::getAllVideosIdFromTagsId($_GET['tags_id']);
|
||||
}
|
||||
}
|
||||
_mysql_connect();
|
||||
//_mysql_connect();
|
||||
$sql = "SELECT STRAIGHT_JOIN u.*, u.externalOptions as userExternalOptions, v.*, "
|
||||
. " nv.title as next_title,"
|
||||
. " nv.clean_title as next_clean_title,"
|
||||
|
|
|
@ -1856,7 +1856,7 @@ class AVideoPlugin
|
|||
|
||||
public static function onUserSocketConnect()
|
||||
{
|
||||
_mysql_connect();
|
||||
//_mysql_connect();
|
||||
$plugins = Plugin::getAllEnabled();
|
||||
foreach ($plugins as $value) {
|
||||
self::YPTstart();
|
||||
|
@ -1871,7 +1871,7 @@ class AVideoPlugin
|
|||
|
||||
public static function onUserSocketDisconnect()
|
||||
{
|
||||
_mysql_connect();
|
||||
//_mysql_connect();
|
||||
$plugins = Plugin::getAllEnabled();
|
||||
foreach ($plugins as $value) {
|
||||
self::YPTstart();
|
||||
|
|
|
@ -282,7 +282,7 @@ class CDNStorage
|
|||
|
||||
public static function setSite($videos_id, $isOnTheStorage)
|
||||
{
|
||||
_mysql_connect();
|
||||
//_mysql_connect();
|
||||
$v = new Video('', '', $videos_id);
|
||||
if ($isOnTheStorage) {
|
||||
$site = self::getOrCreateSite();
|
||||
|
|
|
@ -232,7 +232,7 @@ class LiveTransmition extends ObjectYPT {
|
|||
|
||||
public static function getFromDbByUserName($userName) {
|
||||
global $global;
|
||||
_mysql_connect();
|
||||
//_mysql_connect();
|
||||
$sql = "SELECT * FROM users WHERE user = ? LIMIT 1";
|
||||
$res = sqlDAL::readSql($sql, "s", [$userName]);
|
||||
$data = sqlDAL::fetchAssoc($res);
|
||||
|
@ -252,7 +252,7 @@ class LiveTransmition extends ObjectYPT {
|
|||
|
||||
public static function getFromDbByChannelName($channelName, $allowOnlineIndex = false) {
|
||||
global $global;
|
||||
_mysql_connect();
|
||||
//_mysql_connect();
|
||||
$sql = "SELECT * FROM users WHERE channelName = ? LIMIT 1";
|
||||
$res = sqlDAL::readSql($sql, "s", [$channelName]);
|
||||
$data = sqlDAL::fetchAssoc($res);
|
||||
|
|
|
@ -76,7 +76,7 @@ class LiveLinks extends PluginAbstract {
|
|||
|
||||
static function getAllActive($future = false, $activeOnly = true, $notStarted = false, $users_id=0, $categories_id=0) {
|
||||
global $global;
|
||||
_mysql_connect();
|
||||
//_mysql_connect();
|
||||
$sql = "SELECT * FROM LiveLinks WHERE 1=1 ";
|
||||
|
||||
if (!empty($future)) {
|
||||
|
|
|
@ -89,7 +89,7 @@ class Menu extends ObjectYPT {
|
|||
$sql .= " AND type = $type ";
|
||||
}
|
||||
$sql .= " ORDER BY menu_order ";
|
||||
_mysql_connect();
|
||||
//_mysql_connect();
|
||||
$res = $global['mysqli']->query($sql);
|
||||
$rows = array();
|
||||
if ($res) {
|
||||
|
|
|
@ -102,7 +102,7 @@ function getTotalViewsLive_key($live_key) {
|
|||
return false;
|
||||
}
|
||||
$live_key = object_to_array($live_key);
|
||||
_mysql_connect();
|
||||
//_mysql_connect();
|
||||
$liveUsersEnabled = \AVideoPlugin::isEnabledByName("LiveUsers");
|
||||
if ($liveUsersEnabled) {
|
||||
$liveUsers = new \LiveOnlineUsers(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue