-
Notifications
You must be signed in to change notification settings - Fork 975
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
daniel
authored and
daniel
committed
Jul 16, 2019
1 parent
cb42f5e
commit 1341fae
Showing
5 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
//streamer config | ||
require_once '../videos/configuration.php'; | ||
|
||
if(!isCommandLineInterface()){ | ||
return die('Command Line only'); | ||
} | ||
|
||
function rsearch($folder, $pattern) { | ||
$dir = new RecursiveDirectoryIterator($folder); | ||
$ite = new RecursiveIteratorIterator($dir); | ||
$files = new RegexIterator($ite, $pattern, RegexIterator::GET_MATCH); | ||
$fileList = array(); | ||
foreach($files as $file) { | ||
foreach ($file as $key => $value) { | ||
$file[$key] = "{$folder}{$dir}/{$value}"; | ||
} | ||
$fileList = array_merge($fileList, $file); | ||
} | ||
return $fileList; | ||
} | ||
|
||
$files = rsearch("{$global['systemRootPath']}plugin/", "/install\/install.sql$/i"); | ||
$templine = ''; | ||
foreach ($files as $value) { | ||
$lines = file($value); | ||
foreach ($lines as $line) { | ||
if (substr($line, 0, 2) == '--' || $line == '') | ||
continue; | ||
$templine .= $line; | ||
if (substr(trim($line), -1, 1) == ';') { | ||
if (!$global['mysqli']->query($templine)) { | ||
echo ($value.' Error performing query \'<strong>' . $templine . '\': ' . $global['mysqli']->error . '<br /><br />'); | ||
die(json_encode($obj)); | ||
} | ||
$templine = ''; | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.