Permalink
Browse files

Merge pull request #58 from mahagr/master

Fix Notice: Undefined property: KunenaUser::$ty_received
  • Loading branch information...
2 parents 6be5340 + 684f7f1 commit bbec92d73e3a6ba6bacc4b57ec93c114b48f09ce @mahagr mahagr committed Aug 1, 2011
@@ -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" />
@@ -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>
@@ -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 ?>
@@ -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) ) : ?>
@@ -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>
@@ -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>
@@ -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;
}
@@ -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>
@@ -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);
}

0 comments on commit bbec92d

Please sign in to comment.