pluf2

pluf2 Commit Details


Date:2010-12-06 09:16:25 (14 years 15 days ago)
Author:Thomas Riché
Branch:master
Commit:cbc4fb6876314de0f33653f02e94812a95e96e83
Parents: bc1a0d2a46d252c404532664194ae4a59b971c2b
Message:Fixed Pluf model to handle automatic methode from a model toward itself

Changes:

File differences

src/Pluf/Model.php
10001000
10011001
10021002
1003
1003
1004
1005
10041006
10051007
10061008
if (isset($GLOBALS['_PX_models_related'][$type][$current_model])) {
$relations = $GLOBALS['_PX_models_related'][$type][$current_model];
foreach ($relations as $related) {
$model = new $related();
if ($related != $current_model) {
$model = new $related();
} else $model = clone $this;
$fkeys = $model->getRelationKeysToModel($current_model, $type);
foreach ($fkeys as $fkey => $val) {
$mname = (isset($val['relate_name'])) ? $val['relate_name'] : $related;

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.05360s using 13 queries.