$this->config = $config;
}
+
+ public function addScheme($url, $scheme = 'http://')
+ {
+ return parse_url($url, PHP_URL_SCHEME) === null ?
+ $scheme . $url : $url;
+ }
/*
* Perform Model Action
if (isset($_REQUEST['option']) && $_REQUEST['option'] != '') {
$option = $_REQUEST['option'];
}
+
switch($option) {
case 'transfer_videos':
+
$resultMessage = '<pre>$_REQUEST: ' . print_r($_REQUEST, true) . '</pre>';
$sql = "
SELECT id,descr,video_url
// match 0 is the whole iframe
$iframeCode = $matches[0];
// from the first matched element get the src attribute
+ echo "TEST". $this->addScheme($srcMatches[0])."TESTEND";
if ( preg_match( '%youtube.com/embed/([^?"]*)%', $matches[1], $srcMatches ) ) {
echo '<pre>$srcMatches: ' . print_r($srcMatches, true) . '</pre>';
+
}
$sqlUpdate = "
UPDATE " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "member_info
// }
//}
-if (!function_exists('addScheme')) {
- function addScheme($url, $scheme = 'http://')
- {
- return parse_url($url, PHP_URL_SCHEME) === null ?
- $scheme . $url : $url;
- }
-}
?>
\ No newline at end of file