User Profile

User
 lucascaro
Location
 Cordoba, Argentina
URL
 http://www.triplesmart.com

Recent Comments

Posted 31/05/2010 02:28pm
Thanks for sharing this! I think i've found a little bug: in line 64 it says:

unset($Model->data[$Model->alias][$field]);

And it was overwriting the fields on the original model when I used an associative array for the 'fields' setting. I've changed that line to:


unset($Model->data[$Model->alias][$translatable_field]);

And now seems to be using the except parameter correctly :)

cheers!
Posted 28/04/2010 09:32pm
For some reason the bakery login redirected me to other article and I've posted this on the wrong page, so here I post it again:
---

One issue i ran into: the auto loader won't save the loader_instance on the first run (for initialize) so i've changed the loaderExecute method to:

<?php
function loaderExecute($method) {
        foreach (
App::objects('plugin') as $plugin) {
            
$loader_file Inflector::underscore($plugin).'_auto_loader';
            
$loader_class Inflector::classify($loader_file);
            
$loader_instance null;

            if (!
ClassRegistry::isKeySet($loader_class)) {
                
App::import('Plugin'$loader_classInflector::underscore($plugin).DS.$loader_file.'.php');
                if (
class_exists($loader_class)) {
                    
ClassRegistry::addObject($loader_class, new $loader_class());
                }
            }
            
$loader_instance =& ClassRegistry::getObject($loader_class);
            if (!empty(
$loader_instance) && in_array($methodget_class_methods($loader_class))) {
                
$loader_instance->{$method}($this->__controller);
            }
        }
    }
?>
and now it works.
thanks for sharing!
Posted 28/04/2010 09:29pm
One issue i ran into: the auto loader won't save the loader_instance on the first run (for initialize) so i've changed the loaderExecute method to:

function loaderExecute($method) {
        foreach (App::objects('plugin') as $plugin) {
            $loader_file = Inflector::underscore($plugin).'_auto_loader';
            $loader_class = Inflector::classify($loader_file);
            $loader_instance = null;

            if (!ClassRegistry::isKeySet($loader_class)) {
                App::import('Plugin', $loader_class, Inflector::underscore($plugin).DS.$loader_file.'.php');
                if (class_exists($loader_class)) {
                    ClassRegistry::addObject($loader_class, new $loader_class());
                }
            }
            $loader_instance =& ClassRegistry::getObject($loader_class);
            if (!empty($loader_instance) && in_array($method, get_class_methods($loader_class))) {
                $loader_instance->{$method}($this->__controller);
            }
        }
    }
and now it works.
thanks for sharing!
Posted 25/04/2010 11:40am
Impressive, congratulations and thanks for the hard work!
Posted 31/03/2010 07:28pm
Been using 1.3 since the beta and it's great!
Keep the great job, guys!