Skip to content

Commit

Permalink
Merge pull request #636 from Joomla-Bible-Study/development
Browse files Browse the repository at this point in the history
beta3 Bug fix for sermon view and edit mod for mediafile holding old …
  • Loading branch information
bcordis committed Mar 5, 2016
2 parents d59b13c + c3c2c71 commit d98f20b
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 27 deletions.
Binary file modified build/packages/component/com_biblestudy.zip
Binary file not shown.
Binary file modified build/packages/modules/mod_biblestudy.zip
Binary file not shown.
Binary file modified build/packages/modules/mod_biblestudy_podcast.zip
Binary file not shown.
Binary file removed build/packages/pkg_biblestudy.zip
Binary file not shown.
Binary file modified build/packages/plugins/plg_biblestudy_backup.zip
Binary file not shown.
Binary file modified build/packages/plugins/plg_biblestudy_finder.zip
Binary file not shown.
Binary file modified build/packages/plugins/plg_biblestudy_podcast.zip
Binary file not shown.
Binary file modified build/packages/plugins/plg_biblestudy_search.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion com_biblestudy/admin/addons/servers/youtube/youtube.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @package BibleStudy.Admin
* @since 9.0.0
*/
class JBSMAddonYoutube extends JBSMAddon
class JBSMAddonYouTube extends JBSMAddon
{
protected $config;

Expand Down
3 changes: 2 additions & 1 deletion com_biblestudy/admin/models/mediafile.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,9 @@ public function getMediaForm()
}
}
// Reverse lookup server_id to server type
/** @type BiblestudyModelServer $model */
$model = JModelLegacy::getInstance('Server', 'BibleStudyModel');
$server_type = $model->getType($server_id);
$server_type = $model->getType($server_id, true);

$path = JPath::clean(JPATH_ADMINISTRATOR . '/components/com_biblestudy/addons/servers/' . $server_type);

Expand Down
18 changes: 12 additions & 6 deletions com_biblestudy/admin/models/server.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,29 @@ public function __construct($config = array())
/**
* Reverse look up of id to server_type
*
* @param int $pk ID to get
* @param int $pk ID to get
* @param bool $ext If comfing from externl
*
* @return String
*/
public function getType($pk)
public function getType($pk, $ext = false)
{
$item = $this->getItem($pk);
$item = $this->getItem($pk, $ext);

return $item->type;
}

/**
* Method to get a server item.
*
* @param null $pk An optional id of the object to get
* @param null $pk An optional id of the object to get
* @param bool $ext If comfing from externl
*
* @return mixed Server Server data object, false on failure
*
* @since 9.0.0
*/
public function getItem($pk = null)
public function getItem($pk = null, $ext = false)
{
if (!empty($this->data))
{
Expand All @@ -90,7 +92,11 @@ public function getItem($pk = null)
$server_name = $this->getState('server.server_name');
$this->data->server_name = empty($server_name) ? $this->data->server_name : $server_name;

$type = $this->getState('server.type');
$type = null;
if (!$ext)
{
$type = $this->getState('server.type');
}
$this->data->type = empty($type) ? $this->data->type : $type;

// Load server type configuration if available
Expand Down
24 changes: 9 additions & 15 deletions com_biblestudy/site/lib/listing.php
Original file line number Diff line number Diff line change
Expand Up @@ -2114,11 +2114,13 @@ public function getFluidMediaFiles($item, $params, $template)
{
$med = new JBSMMedia;

$mediarow = '';
$mediarow = '<div class="bsms_media_contaner" style="display: inline-block;" >';
foreach ($item->mediafiles as $media)
{
$mediarow .= '<div style="display:inline; padding-right:1px;">' . $med->getFluidMedia($media, $params, $template) . '</div>';
$mediarow .= '<div id="bsms_media_file' . $media->id . '" class="bsms_media_file" style="display:inline; padding-right:1px;">' .
$med->getFluidMedia($media, $params, $template) . '</div>';
}
$mediarow .= '</div>';

return $mediarow;
}
Expand Down Expand Up @@ -2570,29 +2572,21 @@ public function getPassage($params, $row)
*/
public function getShare($link, $row, $params)
{
jimport('joomla.html.parameter');

// Find a better way to do this.
$db = JFactory::getDbo();
$template = new TableTemplate($db);
$template->id = (int) '1';

$sharetype = $params->get('socialnetworking', 1);

$shareit = '<div class="row-fluid">';
if ($sharetype == 1)
{
$shareit = '<div class="row-fluid">
<div class="span2 pull-right">
';
$shareit .= '<!-- AddThis Button BEGIN -->
$shareit .= '<div class="span2 pull-right">
<!-- AddThis Button BEGIN -->
<a class="addthis_button" href="//www.addthis.com/bookmark.php?v=250">
<img src="//s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" border="0" alt="Share" />
</a>
<script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script>
<script type="text/javascript" src="//s7.addthis.com/js/250/addthis_widget.js"></script>
<!-- AddThis Button END --></div>';
<!-- AddThis Button END -->
</div>';
}

$shareit .= '</div>';

return $shareit;
Expand Down
10 changes: 6 additions & 4 deletions com_biblestudy/site/router.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ function biblestudyBuildRoute(&$query)
{
return $segments;
}
if ($query['view'] == 'message')
{
return $segments;
}
if ($query['view'] == 'comment')
{
return $segments;
Expand All @@ -48,6 +44,12 @@ function biblestudyBuildRoute(&$query)
unset($query['id']);
}

if (isset($query['mid']))
{
$segments[] = $query['mid'];
unset($query['mid']);
}

if (isset($query['t']))
{
$segments[] = $query['t'];
Expand Down

0 comments on commit d98f20b

Please sign in to comment.