1. added missing controls files into flowplayer module.
{\r
$text .= '\r
<script language="JavaScript">\r
{\r
$text .= '\r
<script language="JavaScript">\r
- $f("a.flowplayerholder", "'.TR_BASE_HREF.'include/jscripts/flowplayer/flowplayer-3.2.5.swf", { \r
- clip: { autoPlay: false }, \r
- plugins: { \r
- controls: { \r
- buttons:true, \r
- play: true, \r
- scrubber: true \r
- } \r
- }\r
- });\r
+ $f("a.flowplayerholder", "'.TR_BASE_HREF.'include/jscripts/flowplayer/flowplayer-3.2.4.swf", { \r
+ clip: { autoPlay: false }, \r
+ plugins: { \r
+ controls: { \r
+ buttons:true, \r
+ play: true, \r
+ scrubber: true, \r
+ autoHide:false\r
+ } \r
+ }\r
+ });\r
* @return: none
*/
function populate_a4a($cid, $content, $formatting){
* @return: none
*/
function populate_a4a($cid, $content, $formatting){
+ global $my_files, $content_base_href, $contentManager;
include_once(TR_INCLUDE_PATH.'classes/A4a/A4a.class.php');
include_once(TR_INCLUDE_PATH.'classes/XML/XML_HTMLSax/XML_HTMLSax.php'); /* for XML_HTMLSax */
include_once(TR_INCLUDE_PATH.'classes/ContentOutputParser.class.php'); /* for parser */
include_once(TR_INCLUDE_PATH.'classes/A4a/A4a.class.php');
include_once(TR_INCLUDE_PATH.'classes/XML/XML_HTMLSax/XML_HTMLSax.php'); /* for XML_HTMLSax */
include_once(TR_INCLUDE_PATH.'classes/ContentOutputParser.class.php'); /* for parser */
+ // initialize content_base_href; used in format_content
+ if (!isset($content_base_href)) {
+ $result = $contentManager->getContentPage($cid);
+ // return if the cid is not found
+ if (!($content_row = @mysql_fetch_assoc($result))) return;
+ $content_base_href = $content_row["content_path"].'/';
+ }
+
$body = ContentUtility::formatContent($content, $formatting);
$handler = new ContentOutputParser();
$body = ContentUtility::formatContent($content, $formatting);
$handler = new ContentOutputParser();
$resources[] = convertAmp($file); // converts & to &
}
$resources[] = convertAmp($file); // converts & to &
}
- if (count($resources) == 0) return;
-
$a4a = new A4a($cid);
$db_primary_resources = $a4a->getPrimaryResources();
// clean up the removed resources
foreach ($db_primary_resources as $primary_rid=>$db_resource){
//if this file from our table is not found in the $resource, then it's not used.
$a4a = new A4a($cid);
$db_primary_resources = $a4a->getPrimaryResources();
// clean up the removed resources
foreach ($db_primary_resources as $primary_rid=>$db_resource){
//if this file from our table is not found in the $resource, then it's not used.
- if(in_array($db_resource['resource'], $resources)===false){
- $a4a->deletePrimaryResource($primary_rid);
+ if(count($resources) == 0 || !in_array($db_resource['resource'], $resources)){
+ $a4a->deletePrimaryResource($primary_rid);
+
+ if (count($resources) == 0) return;
// insert the new resources
foreach($resources as $primary_resource)
{
// insert the new resources
foreach($resources as $primary_resource)
{
- if (!is_array($a4a->getPrimaryResourceByName($primary_resource))){
+ if (!$a4a->getPrimaryResourceByName($primary_resource)){
$a4a->setPrimaryResource($cid, $primary_resource, $_SESSION['lang']);
}
}
$a4a->setPrimaryResource($cid, $primary_resource, $_SESSION['lang']);
}
}