Skip to content

Commit

Permalink
Merge pull request #182 from Globulopolis/master
Browse files Browse the repository at this point in the history
Bugfixes
  • Loading branch information
Globulopolis authored Jun 3, 2024
2 parents 58b0183 + 71dabbf commit 9e9386a
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 120 deletions.
4 changes: 2 additions & 2 deletions build/pkg_jcomments.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<extension type="package" method="upgrade">
<name>JComments package</name>
<author>JComments team</author>
<creationDate>May 2024</creationDate>
<creationDate>June 2024</creationDate>
<packagename>jcomments</packagename>
<version>4.0.32</version>
<version>4.0.33</version>
<url>https://github.com/exstreme/Jcomments-4</url>
<packager>JComments team</packager>
<packagerurl>https://github.com/exstreme/Jcomments-4</packagerurl>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
INSERT INTO `#__jcomments_smilies`(`id`,`code`,`alias`,`image`,`name`,`published`,`ordering`,`checked_out`,`checked_out_time`) values (1,':D','','grin.png','Grin',1,1,0,'0000-00-00 00:00:00'),(2,':lol:','','laugh.png','Lol',1,2,0,'0000-00-00 00:00:00'),(3,':-)','','smile.png','Smile',1,3,0,'0000-00-00 00:00:00'),(4,';-)','','wink.png','Wink',1,4,0,'0000-00-00 00:00:00'),(5,'8)','','cool.png','Cool',1,5,0,'0000-00-00 00:00:00'),(6,':-|','','normal.png','Normal',1,6,0,'0000-00-00 00:00:00'),(7,':-*','','whistling.png','Whistling',1,7,0,'0000-00-00 00:00:00'),(8,':oops:','','blush.png','Blush',1,8,0,'0000-00-00 00:00:00'),(9,':sad:','','sad.png','Sad',1,9,0,'0000-00-00 00:00:00'),(10,':cry:','','cry.png','Cry',1,10,0,'0000-00-00 00:00:00'),(11,':o','','surprised.png','Surprised',1,11,0,'0000-00-00 00:00:00'),(12,':-?','','confused.png','Confused',1,12,0,'0000-00-00 00:00:00'),(13,':-x','','sick.png','Sick',1,13,0,'0000-00-00 00:00:00'),(14,':eek:','','shocked.png','Shocked',1,14,0,'0000-00-00 00:00:00'),(15,':zzz','','sleeping.png','Sleeping',1,15,0,'0000-00-00 00:00:00'),(16,':P','','tongue.png','Tongue',1,16,0,'0000-00-00 00:00:00'),(17,':roll:','','rolleyes.gif','Rolleyes',1,17,0,'0000-00-00 00:00:00'),(18,':sigh:','','unsure.png','Unsure',1,18,0,'0000-00-00 00:00:00'),(19,'<3','','love.png','Love',1,19,0,'0000-00-00 00:00:00'),(20,'>:(','','angry.png','Angry',1,20,0,'0000-00-00 00:00:00'),(21,':doh:','','doh.png','Doh',1,21,0,'0000-00-00 00:00:00'),(22,':dry:','','dry.png','Dry',1,22,0,'0000-00-00 00:00:00'),(23,'^_^','','happy.png','Happy',1,23,0,'0000-00-00 00:00:00'),(24,':huh:','','huh.png','Huh',1,24,0,'0000-00-00 00:00:00'),(25,'=]','','ironic.png','Ironic',1,25,0,'0000-00-00 00:00:00'),(26,':kiss:','','kiss.png','Kiss',1,26,0,'0000-00-00 00:00:00'),(27,':ninja:','','ninja.png','Ninja',1,27,0,'0000-00-00 00:00:00'),(28,':rofl:','','rofl.png','Rofl',1,28,0,'0000-00-00 00:00:00'),(29,'8-s','','wacko.png','Wacko',1,29,0,'0000-00-00 00:00:00'),(30,'0:-)','','innocent.png','Innocent',1,30,0,'0000-00-00 00:00:00');
INSERT INTO `#__jcomments_smilies`(`id`,`code`,`alias`,`image`,`name`,`published`,`ordering`,`checked_out`,`checked_out_time`) values (1,':D','','laugh.png','Laugh',1,1,0,'0000-00-00 00:00:00'),(2,':lol:','','grin.png','Lol',1,2,0,'0000-00-00 00:00:00'),(3,':-)','','smile.png','Smile',1,3,0,'0000-00-00 00:00:00'),(4,';-)','','wink.png','Wink',1,4,0,'0000-00-00 00:00:00'),(5,'8)','','cool.png','Cool',1,5,0,'0000-00-00 00:00:00'),(6,':-|','','normal.png','Normal',1,6,0,'0000-00-00 00:00:00'),(7,':-*','','whistling.png','Whistling',1,7,0,'0000-00-00 00:00:00'),(8,':oops:','','blush.png','Blush',1,8,0,'0000-00-00 00:00:00'),(9,':sad:','','sad.png','Sad',1,9,0,'0000-00-00 00:00:00'),(10,':cry:','','cry.png','Cry',1,10,0,'0000-00-00 00:00:00'),(11,':o','','surprised.png','Surprised',1,11,0,'0000-00-00 00:00:00'),(12,':-?','','confused.png','Confused',1,12,0,'0000-00-00 00:00:00'),(13,':-x','','sick.png','Sick',1,13,0,'0000-00-00 00:00:00'),(14,':eek:','','shocked.png','Shocked',1,14,0,'0000-00-00 00:00:00'),(15,':zzz','','sleeping.png','Sleeping',1,15,0,'0000-00-00 00:00:00'),(16,':P','','tongue.png','Tongue',1,16,0,'0000-00-00 00:00:00'),(17,':roll:','','rolleyes.gif','Rolleyes',1,17,0,'0000-00-00 00:00:00'),(18,':sigh:','','unsure.png','Unsure',1,18,0,'0000-00-00 00:00:00'),(19,'<3','','love.png','Love',1,19,0,'0000-00-00 00:00:00'),(20,'>:(','','angry.png','Angry',1,20,0,'0000-00-00 00:00:00'),(21,':doh:','','doh.png','Doh',1,21,0,'0000-00-00 00:00:00'),(22,':dry:','','dry.png','Dry',1,22,0,'0000-00-00 00:00:00'),(23,'^_^','','happy.png','Happy',1,23,0,'0000-00-00 00:00:00'),(24,':huh:','','huh.png','Huh',1,24,0,'0000-00-00 00:00:00'),(25,'=]','','ironic.png','Ironic',1,25,0,'0000-00-00 00:00:00'),(26,':kiss:','','kiss.png','Kiss',1,26,0,'0000-00-00 00:00:00'),(27,':ninja:','','ninja.png','Ninja',1,27,0,'0000-00-00 00:00:00'),(28,':rofl:','','rofl.png','Rofl',1,28,0,'0000-00-00 00:00:00'),(29,'8-s','','wacko.png','Wacko',1,29,0,'0000-00-00 00:00:00'),(30,'0:-)','','innocent.png','Innocent',1,30,0,'0000-00-00 00:00:00');
3 changes: 3 additions & 0 deletions component/administrator/install/sql/updates/mysql/4.0.33.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
UPDATE `#__jcomments_smilies` SET `image` = 'grin.png' WHERE `id` = '2';
UPDATE `#__jcomments_smilies` SET `image` = 'blush.png' WHERE `id` = '8';
UPDATE `#__jcomments_smilies` SET `image` = 'rolleyes.gif' WHERE `id` = '17';
5 changes: 3 additions & 2 deletions component/administrator/models/comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,12 @@ public function getForm($data = array(), $loadData = true)

protected function loadFormData()
{
$data = Factory::getApplication()->getUserState('com_jcomments.edit.comment.data', array());
$app = Factory::getApplication();
$data = $app->getUserState('com_jcomments.edit.comment.data', array());

if (empty($data))
{
$data = $this->getItem();
$data = $this->getItem($app->input->getInt('id'));
$data->comment = strip_tags(str_replace('<br />', "\n", $data->comment));
}

Expand Down
5 changes: 3 additions & 2 deletions component/administrator/models/forms/filter_comments.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@
sql_select="c.lang AS value, l.title AS name"
sql_from="#__jcomments AS c"
sql_join="#__languages AS l ON l.lang_code = c.lang"
sql_order="value ASC"
sql_where="c.lang != '*'"
sql_order="c.lang ASC"
key_field="value"
value_field="name"
sql_group="value"
sql_group="c.lang"
onchange="this.form.submit();"
>
<option value="">JOPTION_SELECT_LANGUAGE</option>
Expand Down
75 changes: 0 additions & 75 deletions component/administrator/tables/comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,81 +25,6 @@ class JCommentsTableComment extends Table
{
protected $_supportNullValue = true;

/** @var integer Primary key */
public $id = null;

/** @var integer */
public $parent = null;

/** @var integer */
public $thread_id = null;

/** @var string */
public $path = null;

/** @var integer */
public $level = null;

/** @var integer */
public $object_id = null;

/** @var string */
public $object_group = null;

/** @var string */
public $lang = null;

/** @var integer */
public $userid = null;

/** @var string */
public $name = null;

/** @var string */
public $username = null;

/** @var string */
public $title = null;

/** @var string */
public $comment = null;

/** @var string */
public $email = null;

/** @var string */
public $homepage = null;

/** @var datetime */
public $date = null;

/** @var string */
public $ip = null;

/** @var integer */
public $isgood = null;

/** @var integer */
public $ispoor = null;

/** @var boolean */
public $published = null;

/** @var boolean */
public $deleted = null;

/** @var boolean */
public $subscribe = null;

/** @var string */
public $source = null;

/** @var boolean */
public $checked_out = null;

/** @var datetime */
public $checked_out_time = null;

/**
* Object constructor to set table and key fields. In most cases this will
* be overridden by child classes to explicitly set the table and key fields
Expand Down
36 changes: 0 additions & 36 deletions component/administrator/tables/subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,42 +23,6 @@ class JCommentsTableSubscription extends Table
{
protected $_supportNullValue = true;

/** @var integer Primary key */
public $id = null;

/** @var integer */
public $object_id = null;

/** @var string */
public $object_group = null;

/** @var string */
public $lang = null;

/** @var integer */
public $userid = null;

/** @var string */
public $name = null;

/** @var string */
public $email = null;

/** @var string */
public $hash = null;

/** @var boolean */
public $published = null;

/** @var string */
public $source = null;

/** @var boolean */
public $checked_out = null;

/** @var datetime */
public $checked_out_time = null;

public function __construct($table)
{
parent::__construct('#__jcomments_subscriptions', 'id', $table);
Expand Down
2 changes: 1 addition & 1 deletion component/jcomments.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<author>JComments team</author>
<authorUrl>https://github.com/exstreme/Jcomments-4</authorUrl>
<license>https://www.gnu.org/copyleft/gpl.html GNU/GPL</license>
<version>4.0.32</version>
<version>4.0.33</version>
<description>JComments lets your users comment on content items.</description>
<namespace path="src">Joomla\Component\Jcomments</namespace>

Expand Down
2 changes: 1 addition & 1 deletion component/media/js/jcomments-v4.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ JCommentsEditor.prototype = {
return;
}
var th = this, e = document.createElement('img');
e.setAttribute('src', this.smilesPath + '/' + image);
e.setAttribute('src', this.smilesPath + image);
e.setAttribute('alt', code);
e.className = 'smile';
e.onclick = function () {
Expand Down

0 comments on commit 9e9386a

Please sign in to comment.