purplebeanie / pbevents

an events plugin / component for joomla.
2 stars 3 forks source link

Support for Unique fields. #2

Closed mattiasr closed 12 years ago

mattiasr commented 12 years ago

you can now set a field as Unique, like email and users can nolonger sign up for a event with the same email.

Signed-off-by: Mattias Ryrlén mattiasr@op5.com

purplebeanie commented 12 years ago

Hi Mattias, thanks for that mate. I've merged it in.

Eric.

mattiasr commented 12 years ago

Hi Eric,

i hope you review my patches and test them before, i only do basic testing and when i think it works as i expect i commit.

i have seen some tendency that if you have required fields and press send and they should change color and not send the form, it still send the form. but if that is my modifications or some other parameter, i can't tell.

/Mattias Ryrlén

On Tue, Aug 7, 2012 at 1:34 AM, Eric Fernance notifications@github.comwrote:

Hi Mattias, thanks for that mate. I've merged it in.

Eric.

— Reply to this email directly or view it on GitHubhttps://github.com/purplebeanie/pbevents/pull/2#issuecomment-7539745.

purplebeanie commented 12 years ago

Yes Mattias. I review them and then pull into the development branch for proper testing and integration.

Which reminds me, I noticed on the last commit you made there was a line that went:

$db2 = &JFactory::getDbo();

It was line 164 on the _process_rsvp method.

It's worth noting that JFactory::getDbo() returns a global database object rather than separate database objects for each call. So $db and $db2 would be different references to the same object.

The docs for JFactory::getDbo() are here http://docs.joomla.org/JFactory/getDBO

but the best way to see it is in the implementation itself:

public static function getDbo() { if (!self::$database) { //get the debug configuration setting $conf = self::getConfig(); $debug = $conf->get('debug');

self::$database = self::createDbo(); self::$database->setDebug($debug); }

return self::$database; }

I really appreciate what you've been doing Mattias and when I update the pbevents page I'd really like to list you as a contributor if you're happy for that?

Eric.

On Wednesday, 8 August 2012 at 6:28 AM, Mattias Ryrlén wrote:

Hi Eric,

i hope you review my patches and test them before, i only do basic testing
and when i think it works as i expect i commit.

i have seen some tendency that if you have required fields and press send
and they should change color and not send the form, it still send the form.
but if that is my modifications or some other parameter, i can't tell.

/Mattias Ryrlén

On Tue, Aug 7, 2012 at 1:34 AM, Eric Fernance <notifications@github.com (mailto:notifications@github.com)>wrote:

Hi Mattias, thanks for that mate. I've merged it in.

Eric.


Reply to this email directly or view it on GitHubhttps://github.com/purplebeanie/pbevents/pull/2#issuecomment-7539745.

— Reply to this email directly or view it on GitHub (https://github.com/purplebeanie/pbevents/pull/2#issuecomment-7565724).

mattiasr commented 12 years ago

Hi Eric

8 aug 2012 kl. 01:28 skrev Eric Fernance notifications@github.com:

Yes Mattias. I review them and then pull into the development branch for proper testing and integration.

Which reminds me, I noticed on the last commit you made there was a line that went:

$db2 = &JFactory::getDbo();

It was line 164 on the _process_rsvp method.

It's worth noting that JFactory::getDbo() returns a global database object rather than separate database objects for each call. So $db and $db2 would be different references to the same object.

The docs for JFactory::getDbo() are here http://docs.joomla.org/JFactory/getDBO

but the best way to see it is in the implementation itself:

public static function getDbo() { if (!self::$database) { //get the debug configuration setting $conf = self::getConfig(); $debug = $conf->get('debug');

self::$database = self::createDbo(); self::$database->setDebug($debug); }

return self::$database; }

Ok i thought i tested with only $db but it didnt work in a subquery.

I really appreciate what you've been doing Mattias and when I update the pbevents page I'd really like to list you as a contributor if you're happy for that?

Cool, im fine with that, it's my first time with hack of joomla plugins.

Im trying to figure out a way to have the attendee list editable from a admin, so you can go in and change.

And have a extra field thats for admin only, to eg mark a attendee as "payed".

If you have sugestions for this, patches are welcome ;)

/Mattias

Eric.

On Wednesday, 8 August 2012 at 6:28 AM, Mattias Ryrlén wrote:

Hi Eric,

i hope you review my patches and test them before, i only do basic testing and when i think it works as i expect i commit.

i have seen some tendency that if you have required fields and press send and they should change color and not send the form, it still send the form. but if that is my modifications or some other parameter, i can't tell.

/Mattias Ryrlén

On Tue, Aug 7, 2012 at 1:34 AM, Eric Fernance <notifications@github.com ( mailto:notifications@github.com notifications@github.com)>wrote:

Hi Mattias, thanks for that mate. I've merged it in.

Eric.

— Reply to this email directly or view it on GitHub< https://github.com/purplebeanie/pbevents/pull/2#issuecomment-7539745>.

— Reply to this email directly or view it on GitHub ( https://github.com/purplebeanie/pbevents/pull/2#issuecomment-7565724).

— Reply to this email directly or view it on GitHubhttps://github.com/purplebeanie/pbevents/pull/2#issuecomment-7570461.