1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 19:42:38 +02:00

Minor code style patch.

This commit is contained in:
Caleb Mazalevskis 2019-12-23 21:02:31 +08:00
parent 8108fc1e68
commit 172fa35b49
No known key found for this signature in database
GPG key ID: 082E6BC1046FAB95
15 changed files with 72 additions and 79 deletions

View file

@ -1,8 +1,8 @@
<?php
function createTable($pluginName, $filter = array()){
function createTable($pluginName, $filter = array()) {
$plugin = AVideoPlugin::getObjectData($pluginName);
if(empty($filter)){
if (empty($filter)) {
foreach ($plugin as $keyJson => $valueJson) {
$filter[$keyJson] = "&nbsp;";
}
@ -15,13 +15,13 @@ function createTable($pluginName, $filter = array()){
$pluginsList = array();
if (!AVideoPlugin::exists($pluginName)) {
echo "<tr><td colspan='2'> Sorry you do not have the plugin </td></tr>";
}else{
if(!empty($plugin)){
} else {
if (!empty($plugin)) {
$form = jsonToFormElements($plugin,$filter);
//var_dump($form);
echo implode("", $form);
}
echo "<tr><td colspan='2'> <button class='btn btn-block btn-primary'><i class='fa fa-save'></i> Save</button> </td></tr>";
}
echo '</table></form>';
@ -63,9 +63,9 @@ function jsonToFormElements($json, $filter = array()) {
}
function getPluginSwitch($pluginName) {
if(!AVideoPlugin::exists($pluginName)){
$input = '<a href="https://www.avideo.com/plugins/" class="btn btn-danger btn-sm btn-xs">Buy this plugin now</a>';
}else{
if (!AVideoPlugin::exists($pluginName)) {
$input = '<a href="https://www.avideo.com/plugins/" class="btn btn-danger btn-sm btn-xs">Buy this plugin now</a>';
} else {
$plugin = AVideoPlugin::loadPluginIfEnabled($pluginName);
$pluginForced = AVideoPlugin::loadPlugin($pluginName);
$id = uniqid();