Skip to content

Commit

Permalink
mwEmbedframe: fixed wp, removed not needed exit call
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Dale committed Apr 22, 2013
1 parent 960c3d6 commit b82bdba
Showing 1 changed file with 23 additions and 24 deletions.
47 changes: 23 additions & 24 deletions mwEmbedFrame.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

// Include configuration: ( will include LocalSettings.php )
require( dirname( __FILE__ ) . '/includes/DefaultSettings.php' );
require( dirname( __FILE__ ) . '/includes/DefaultSettings.php' );

// Include MwEmbedWebStartSetup.php for all of mediawiki support
require ( dirname( __FILE__ ) . '/includes/MwEmbedWebStartSetup.php' );
Expand All @@ -26,7 +26,7 @@
// can extend / override entry points

if( isset( $myMwEmbedFrame->kwidgetid ) || isset($_REQUEST['wid']) ){
require( dirname( __FILE__ ) . '/modules/KalturaSupport/kalturaIframe.php');
require( dirname( __FILE__ ) . '/modules/KalturaSupport/kalturaIframe.php');
exit();
}

Expand Down Expand Up @@ -57,8 +57,8 @@ class mwEmbedFrame {
);
var $playerIframeId = 'iframeVid';
var $debug = false;
var $theme = 'kdark';
var $theme = 'kdark';

// When used in direct source mode the source asset.
// NOTE: can be an array of sources in cases of "many" sources set
Expand Down Expand Up @@ -99,14 +99,14 @@ private function parseRequest(){
}
}

// Check for non-default theme.
if( isset( $_REQUEST['theme'] ) &&
in_array($_REQUEST['theme'],
array('darkness','le-frog', 'redmond','start',
'sunny', 'kdark')) ){
$this->theme = $_REQUEST['theme'];
}
// Check for non-default theme.
if( isset( $_REQUEST['theme'] ) &&
in_array($_REQUEST['theme'],
array('darkness','le-frog', 'redmond','start',
'sunny', 'kdark')) ){
$this->theme = $_REQUEST['theme'];
}
// Check for debug flag
if( isset( $_REQUEST['debug'] ) ){
$this->debug = true;
Expand Down Expand Up @@ -143,7 +143,7 @@ private function getVideoTag( ){
}
$o.= '</video>';
return $o;
}
}

function outputIFrame( ){
// Setup the embed string based on attribute set:
Expand Down Expand Up @@ -193,18 +193,17 @@ function outputIFrame( ){
});
});
</script>
</head>
<body>
<?php
// Check if we have a way to get sources:
if( isset( $this->apiTitleKey ) || isset( $this->kentryid ) || count( $this->sources ) != 0 ) {
</head>
<body>
<?php
// Check if we have a way to get sources:
if( isset( $this->apiTitleKey ) || isset( $this->kentryid ) || count( $this->sources ) != 0 ) {
echo $this->getVideoTag();
} else {
echo "Error: mwEmbedFrame missing required parameter for video sources</body></html>";
exit(1);
}
?>
</body>
} else {
echo "Error: mwEmbedFrame missing required parameter for video sources</body></html>";
}
?>
</body>
</html>
<?php
}
Expand Down

0 comments on commit b82bdba

Please sign in to comment.