Skip to content

Commit

Permalink
Merge pull request Kunena#58 from mahagr/master
Browse files Browse the repository at this point in the history
Fix Notice: Undefined property: KunenaUser::$ty_received
  • Loading branch information
mahagr committed Aug 1, 2011
2 parents 6be5340 + 684f7f1 commit bbec92d
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion administrator/components/com_kunena/install/install.xml
Expand Up @@ -496,7 +496,7 @@
<field name="rank" type="tinyint(4)" null="0" default="0" />
<field name="hideEmail" type="tinyint(1)" null="0" default="1" />
<field name="showOnline" type="tinyint(1)" null="0" default="1" />
<field name="ty_received" type="int(11)" null="1" default="0" />
<field name="thankyou" type="int(11)" null="1" default="0" />
<key name="PRIMARY" unique="1" columns="userid" />
<key name="group_id" columns="group_id" />
<key name="posts" columns="posts" />
Expand Down
Expand Up @@ -291,6 +291,7 @@
<query mode="silenterror">ALTER TABLE `#__kunena_categories` ADD `topic_ordering` VARCHAR(16) NOT NULL default 'lastpost' AFTER `allow_polls`;</query>
</version>
<version version="@kunenaversion@" versiondate="@kunenaversiondate@" versionname="@kunenaversionname@">
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD `thankyou` int(11) NULL default '0' AFTER `showOnline`;</query>
</version>
</upgrade>
</comupgrade>
Expand Up @@ -31,7 +31,7 @@
<?php if ($this->userposts) : ?><li class="kpost-user-posts"><?php echo JText::_('COM_KUNENA_POSTS') .' '. intval($this->userposts) ?></li><?php endif ?>
<?php if ($this->userpoints) : ?><li class="kpost-user-points"><?php echo JText::_('COM_KUNENA_AUP_POINTS') .' '. intval($this->userpoints); ?></li><?php endif ?>
<?php if ( $this->userkarma ) : ?><li class="kpost-user-karma"><?php echo $this->userkarma ?></li><?php endif ?>
<?php if ( $this->usertyr ) : ?><li class="kpost-user-karma"><?php echo JText::_('COM_KUNENA_MYPROFILE_THANKYOU_RECEIVED') .' '. intval($this->usertyr ) ?></li><?php endif ?>
<?php if ( $this->thankyou ) : ?><li class="kpost-user-karma"><?php echo JText::_('COM_KUNENA_MYPROFILE_THANKYOU_RECEIVED') .' '. intval($this->thankyou ) ?></li><?php endif ?>
<?php if ( !empty($this->usermedals) ) : ?>
<li class="kpost-user-medals">
<?php foreach ( $this->usermedals as $medal ) : ?><?php echo $medal; ?><?php endforeach ?>
Expand Down
Expand Up @@ -39,7 +39,7 @@
<?php if (!empty($this->usermedals)) : ?><li><?php foreach ( $this->usermedals as $medal ) : echo $medal,' '; endforeach ?></li><?php endif ?>
<li><strong><?php echo JText::_('COM_KUNENA_MYPROFILE_PROFILEVIEW') ?>:</strong> <?php echo intval($this->profile->uhits) ?></li>
<li><?php echo $this->displayKarma(); ?></li>
<?php if (!empty($this->usertyr)): ?><li><strong><?php echo JText::_('COM_KUNENA_MYPROFILE_THANKYOU_RECEIVED') ?></strong> <?php echo intval($this->usertyr) ?></li><?php endif; ?>
<?php if (!empty($this->thankyou)): ?><li><strong><?php echo JText::_('COM_KUNENA_MYPROFILE_THANKYOU_RECEIVED') ?></strong> <?php echo intval($this->thankyou) ?></li><?php endif; ?>
<?php if (!empty($this->pmLink)) : ?><li><?php echo $this->pmLink ?></li><?php endif ?>
</ul>
<?php if( !empty($this->personalText) ) : ?>
Expand Down
Expand Up @@ -24,8 +24,8 @@
<?php if ($this->userposts) : ?>
<span class="kpost-userposts"><?php echo JText::_('COM_KUNENA_POSTS') . intval($this->userposts); ?></span>
<?php endif ?>
<?php if ($this->usertyr) : ?>
<span class="kpost-userposts"><?php echo JText::_('COM_KUNENA_MYPROFILE_THANKYOU_RECEIVED') .' '. intval($this->usertyr); ?></span>
<?php if ($this->thankyou) : ?>
<span class="kpost-userposts"><?php echo JText::_('COM_KUNENA_MYPROFILE_THANKYOU_RECEIVED') .' '. intval($this->thankyou); ?></span>
<?php endif ?>
<?php if ($this->userpoints) : ?>
<span class="kpost-userposts"><?php echo JText::_('COM_KUNENA_AUP_POINTS') . intval($this->userpoints); ?></span>
Expand Down
Expand Up @@ -54,8 +54,8 @@
<?php if ($this->userposts) : ?>
<li class="kpost-userposts"><?php echo JText::_('COM_KUNENA_POSTS') .' '. intval($this->userposts); ?></li>
<?php endif ?>
<?php if ($this->usertyr) : ?>
<li class="kpost-usertyr"><?php echo JText::_('COM_KUNENA_MYPROFILE_THANKYOU_RECEIVED') .' '. intval($this->usertyr); ?></li>
<?php if ($this->thankyou) : ?>
<li class="kpost-usertyr"><?php echo JText::_('COM_KUNENA_MYPROFILE_THANKYOU_RECEIVED') .' '. intval($this->thankyou); ?></li>
<?php endif ?>
<?php if ($this->userpoints) : ?>
<li class="kpost-userposts"><?php echo JText::_('COM_KUNENA_AUP_POINTS') .' '. intval($this->userpoints); ?></li>
Expand Down
4 changes: 2 additions & 2 deletions components/com_kunena/views/topic/view.html.php
Expand Up @@ -565,15 +565,15 @@ function getMessageProfileBox() {
$this->userranktitle = $this->profile->getRank ( $this->topic->category_id, 'title' );
$this->userposts = $this->profile->posts;
$activityIntegration = KunenaFactory::getActivityIntegration ();
$this->usertyr = $this->profile->ty_received;
$this->thankyou = $this->profile->thankyou;
$this->userpoints = $activityIntegration->getUserPoints ( $this->profile->userid );
$this->usermedals = $activityIntegration->getUserMedals ( $this->profile->userid );
} else {
$this->usertype = null;
$this->userrankimage = null;
$this->userranktitle = null;
$this->userposts = null;
$this->usertyr = null;
$this->thankyou = null;
$this->userpoints = null;
$this->usermedals = null;
}
Expand Down
2 changes: 1 addition & 1 deletion components/com_kunena/views/user/tmpl/default_summary.php
Expand Up @@ -33,7 +33,7 @@
<li><strong><?php echo JText::_('COM_KUNENA_MYPROFILE_TIMEZONE'); ?>:</strong> GMT <?php echo $this->localtime->toTimezone(); ?></li>
<li><strong><?php echo JText::_('COM_KUNENA_MYPROFILE_LOCAL_TIME'); ?>:</strong> <?php echo $this->localtime->toKunena('time'); ?></li>
<?php if (!empty($this->posts)): ?><li><strong><?php echo JText::_('COM_KUNENA_MYPROFILE_POSTS'); ?>:</strong> <?php echo intval($this->posts); ?></li><?php endif; ?>
<?php if (!empty($this->usertyr)): ?><li><strong><?php echo JText::_('COM_KUNENA_MYPROFILE_THANKYOU_RECEIVED'); ?>:</strong> <?php echo intval($this->usertyr); ?></li><?php endif; ?>
<?php if (!empty($this->thankyou)): ?><li><strong><?php echo JText::_('COM_KUNENA_MYPROFILE_THANKYOU_RECEIVED'); ?>:</strong> <?php echo intval($this->thankyou); ?></li><?php endif; ?>
<?php if (!empty($this->userpoints)): ?><li><strong><?php echo JText::_('COM_KUNENA_AUP_POINTS'); ?></strong> <?php echo intval($this->userpoints); ?></li><?php endif; ?>
<?php if (!empty($this->usermedals)) : ?><li><?php foreach ( $this->usermedals as $medal ) : echo $medal,' '; endforeach ?></li><?php endif ?>
<li><strong><?php echo JText::_('COM_KUNENA_MYPROFILE_PROFILEVIEW'); ?>:</strong> <?php echo intval($this->profile->uhits); ?></li>
Expand Down
2 changes: 1 addition & 1 deletion components/com_kunena/views/user/view.html.php
Expand Up @@ -104,7 +104,7 @@ protected function displayCommon($tpl = null) {
$this->rank_image = $this->profile->getRank (0, 'image');
$this->rank_title = $this->profile->getRank (0, 'title');
$this->posts = $this->profile->posts;
$this->usertyr = $this->profile->ty_received;
$this->thankyou = $this->profile->thankyou;
$this->userpoints = $activityIntegration->getUserPoints($this->profile->userid);
$this->usermedals = $activityIntegration->getUserMedals($this->profile->userid);
}
Expand Down

0 comments on commit bbec92d

Please sign in to comment.