little bug in

18 years 4 months ago #514 by Viames
little bug in was created by Viames
I just found a little bug and a fix in the file pms.mypmspro.php when use myPMS OS 2.5. When you send a new message, you will get a fatal error.

i changed the line: 59-60

$sql="INSERT INTO #__pms (username,whofrom,date,time,readstate,subject,message) VALUES('"
.$to."','".$from."',CURDATE(),CURTIME(),0,'".$sub."','".$msg."');";


into:

$sql="INSERT INTO #__pms (username,whofrom,date,readstate,subject,message) VALUES('"
.$to."','".$from."',NOW(),0,'".$sub."','".$msg."');";


Problem was that myPMS II used two fields: 'date' and 'time'. The new myPMS Open Source 2.5 uses a unique field for datetime(), and it's called 'date'. Here the SQL query in the original 2.5 pms.xml:

CREATE TABLE `#__pms` (
`id` int(10) unsigned NOT NULL auto_increment,
`username` varchar(20) NOT NULL default '',
`whofrom` varchar(20) NOT NULL default '',
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`readstate` smallint(1) unsigned NOT NULL default '0',
`subject` varchar(255) NOT NULL default '',
`message` text NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM;


After the change I shown, you will use myPMS OS 2.5, but you can't use myPMS II anymore.

CB italian translation & testing
translations on joomla.it
homesites: Viames.it , Crotone on Web

Please Log in to join the conversation.

18 years 4 months ago #523 by Machiel
Replied by Machiel on topic Re:little bug in
Maybe the creator of the plugin could make an option for pms 2.5 Because when we change all the other pms enhanced modified versions etc. Based om My PMS 2 also aren't working anymore. So maybe another option in the plugin.

Best Regards
Machiel

CB tester

Please Log in to join the conversation.

18 years 4 months ago #556 by beat
Replied by beat on topic Re:little bug in
Viames wrote:

I just found a little bug and a fix in the file pms.mypmspro.php when use myPMS OS 2.5. ...



Hi Viames,
Thanks for the bug report :), and thank you very much for the fix suggestion. B)

Machiel wrote:

Maybe the creator of the plugin could make an option for pms 2.5 Because when we change all the other pms enhanced modified versions etc. Based om My PMS 2 also aren't working anymore. So maybe another option in the plugin.


Hi Machiel,
I'm the author of the plugin, which also incorporates ideas and code from Benjamin (UddeIM creator).
Please log quickly a bug at developer.joomla.org for this with a link to this thread, so I don't forget to correct this :)

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.275 seconds

Facebook Twitter LinkedIn