Welcome Guest, Not a member yet? Register   Sign In
[Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition)

[eluser]BrianDHall[/eluser]
Holy cow, I didn't even see you had an htmlform extension that is just what I was wanting, a way to easily and quickly create forms!

HTML Form Extension to DMZ

I just keep loving this addition to CI more and more, it's fast becoming one of the best things in favor of CI I've seen yet. I'm sorry for people that overlook CI because it supposedly doesn't have ORM, and all the people still doing things the old fashioned way :>

[eluser]OverZealous[/eluser]
DataMapper OverZealous Edition 1.5.2 Update

Quote:Core Changes:
• By default, DMZ now adds items to the all array using a normal, indexed order. The old method was to add them to the array by their ID.
This change could easily break existing code, because the old method effectively made every query DISTINCT.
To help with this, there is a new config option, all_array_uses_ids. Set this to TRUE to restore the original behavior. Using the new behavior is recommended whenever possible.

HTMLForm Extension
New File input.
New Option for setting a default value on custom fields.
New Option for specifying the separator for multiple-input rows (including checkboxes and radio sets)
• Fixed some bugs related to custom fields.

Bug Fixes
• Modified the way extensions are loaded, making loading libraries work better.
• Fixed several relationship query bugs.
• Fixed several other minor bugs.

Quote:Download the Latest Version Here

View the change log and the upgrade process
Having issues? Please look through the Troubleshooting Guide & FAQs
View the Complete Manual

[eluser]OverZealous[/eluser]
[quote author="BrianDHall" date="1252469241"]I just keep loving this addition to CI more and more, it's fast becoming one of the best things in favor of CI I've seen yet.[/quote]

Wow, thanks for the ego-boost! :lol:

FYI: you are in the credits for the latest update for finding those _template typos. ;-)

[eluser]BrianDHall[/eluser]
Aww, thanks - I hope I can one day contribute to the project that is helping me so much, but I've much to learn about the power that is already there Smile

Oh, and darned if I didn't find another bug...or, well, actually an error in the documentation.

On the array extension DMZ says to add 'array' to the extensions list, but this gives me an error - the extension class is actually 'arrayutils', which when used works just fine it seems.

[eluser]OverZealous[/eluser]
[quote author="BrianDHall" date="1252469545"]On the array extension DMZ says to add 'array' to the extensions list, but this gives me an error - the extension class is actually 'arrayutils', which when used works just fine it seems.[/quote]

Only in an outdated version. Anything 1.5.0 and newer re-named the extension to array due to a new way of handling classes. It's cleaner.

The downloaded copy you have should have come with its own docs. If you want to stick with the older version, you probably should reference those, as the online ones are for the latest release. ;-)

Don't forget to read the upgrade instructions when you upgrade, because there are often changes from version-to-version that may adversely affect your code!

[eluser]BrianDHall[/eluser]
Oh, I thought I did have the latest release, whoops Smile

Thankies, I'll upgrade now Big Grin

[eluser]12vunion[/eluser]
Wow, that was a quick turn around on the array[index] feature. Thanks again for the awesome library.

[eluser]12vunion[/eluser]
Correct me if I'm wrong, but I think get_rules are bypassed when an object is called directly from another object.

In this example, photo->path should be prefixed because of a get_rule
Code:
$gallery->set->where('is_public', true)->get();
                            
foreach($gallery->set->all as $set){
    //calls get_rules                                
    $photo = new Photo();
    $photo->where('is_public', true)->where_related($set)->get();
    echo $photo->path;
    //http://.......images/....

    //doesn't call get rules                                
    $set->photo->where('is_public', true)->get();
    echo $set->photo->path;
    //images/....
}

EDIT: On closer inspection, this has something to do with $set->photo->path trying to call the first object.

[eluser]OverZealous[/eluser]
[quote author="12vunion" date="1252553043"]Correct me if I'm wrong, but I think get_rules are bypassed when an object is called directly from another object.[/quote]

Yup, it looks like it only affects the main object. For now, you can do this:
Code:
$set->photo->all[0]->path;
// etc.

I think I need to consolidate the related and non-related queries, anyways, so I'll fix it eventually. :-)

UPDATE: Fixed in the trunk. I went ahead and consolidated the three main get-style query sections (normal, validate->get(), and related get) into a single function that will be easier to maintain in the future.

[eluser]12vunion[/eluser]
Again, you're the man. Any chance of you sending me the update? I didn't see a link to your repo posted anywhere.




Theme © iAndrew 2016 - Forum software by © MyBB