Skip to content
This repository was archived by the owner on Mar 30, 2019. It is now read-only.

Commit 995d3c7

Browse files
committed
A round of small fixes for missing strings and version compatibility
1 parent 2692112 commit 995d3c7

File tree

5 files changed

+19
-6
lines changed

5 files changed

+19
-6
lines changed

com_podcastmanager/admin/language/en-GB/en-GB.com_podcastmanager.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,3 +236,11 @@ COM_PODCASTMANAGER_VIEW_PODCAST_EDIT_PODCAST="Podcast Manager: Edit Podcast Meta
236236
COM_PODCASTMANAGER_VIEW_PODCAST_FIELDSET_METADATA="Podcast Metadata"
237237
COM_PODCASTMANAGER_VIEW_PODCASTS_TITLE="Podcast Manager: Podcasts"
238238
COM_PODCASTMANAGER_XML_DESCRIPTION="The Podcast Manager component is used for managing podcasts."
239+
240+
; Overrides for strings that may not exist
241+
JGLOBAL_FIELD_CREATED_BY_LABEL="Created by"
242+
JGLOBAL_HISTORY_LIMIT_OPTIONS_DESC="The maximum number of old versions of an item to save. If zero, all old versions will be saved."
243+
JGLOBAL_HISTORY_LIMIT_OPTIONS_LABEL="Maximum Versions (Joomla! 3.2 and later only)"
244+
JGLOBAL_PUBLISHED_DATE="Published Date"
245+
JGLOBAL_SAVE_HISTORY_OPTIONS_DESC="Whether to automatically save old versions of an item. If set to Yes, old versions of items are saved automatically. When editing, you may restore from a previous version of the item."
246+
JGLOBAL_SAVE_HISTORY_OPTIONS_LABEL="Enable Versions (Joomla! 3.2 and later only)"

com_podcastmanager/site/language/en-GB/en-GB.com_podcastmanager.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,7 @@ COM_PODCASTMANAGER_OPTION_TOP="Top"
8282
COM_PODCASTMANAGER_PARSE_METADATA="Parse Metadata"
8383
COM_PODCASTMANAGER_SELECT_FEEDNAME=" - Select Feed - "
8484
COM_PODCASTMANAGER_TOO_MANY_MEDIA_PLUGINS="Too many media plugins are enabled, only one "_QQ_"podcastmedia"_QQ_" type plugin can be enabled. Media path reverting to default."
85+
86+
; Overrides for strings that may not exist
87+
JGLOBAL_FIELD_CREATED_BY_LABEL="Created by"
88+
JGLOBAL_PUBLISHED_DATE="Published Date"

com_podcastmanager/site/views/feed/tmpl/feed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
defined('_JEXEC') or die;
1616

1717
// Check if user is allowed to add/edit based on component permissions.
18-
$canEdit = $this->feed->id && $this->user->authorise('core.edit', 'com_podcastmanager.feed.' . $this->feed->id);
18+
$canEdit = isset($this->feed->id) && $this->user->authorise('core.edit', 'com_podcastmanager.feed.' . $this->feed->id);
1919
?>
2020
<div class="podcastmanager-feed<?php echo $this->pageclass_sfx;?>">
2121
<?php if ($this->params->def('show_page_heading', 1)) : ?>
2222
<h1><?php echo $this->escape($this->params->get('page_heading')); ?></h1>
2323
<?php endif;
24-
if ($this->feed->name && $this->params->get('show_feed_title', 1)) : ?>
24+
if (isset($this->feed->name) && $this->params->get('show_feed_title', 1)) : ?>
2525
<h2><?php echo JHtml::_('content.prepare', $this->feed->name); ?></h2>
2626
<?php endif;
2727
if ($this->params->get('show_feed_description', 1) || $this->params->get('show_feed_image', 1)) : ?>

com_podcastmanager/site/views/feed/tmpl/feed_items.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@
130130
</tbody>
131131
</table>
132132

133-
<?php if (($this->params->def('show_pagination', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->pagesTotal > 1)) : ?>
133+
<?php $paginationParam = version_compare(JVERSION, '3.0', 'lt') ? 'pages.total' : 'pagesTotal'; ?>
134+
<?php if (($this->params->def('show_pagination', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->get($paginationParam) > 1)) : ?>
134135
<div class="pagination">
135136
<?php if ($this->params->def('show_pagination_results', 1)) : ?>
136137
<p class="counter pull-right">

com_podcastmanager/site/views/feed/view.html.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ protected function prepareDocument($feed)
188188

189189
$id = (int) @$menu->query['id'];
190190

191-
if ($menu && ($menu->query['option'] != 'com_podcastmanager' || $id != $this->feed->id))
191+
if (isset($this->feed->id) && $menu && ($menu->query['option'] != 'com_podcastmanager' || $id != $this->feed->id))
192192
{
193193
$this->params->set('page_subheading', $this->feed->name);
194194
$path = array(array('title' => $this->feed->name, 'link' => ''));
@@ -233,13 +233,13 @@ protected function prepareDocument($feed)
233233
$this->document->setMetadata('robots', $this->params->get('robots'));
234234
}
235235

236-
if ($this->feed->author)
236+
if (isset($this->feed->author))
237237
{
238238
$this->document->setMetaData('author', $this->feed->author);
239239
}
240240

241241
// Add alternative feed link
242-
if ($this->feed->id && $this->params->get('show_feed_link', 1) == 1)
242+
if (isset($this->feed->id) && $this->params->get('show_feed_link', 1) == 1)
243243
{
244244
$link = '&format=raw&layout=default&feedname=' . $this->feed->id;
245245
$attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0');

0 commit comments

Comments
 (0)