Compare commits
7 Commits
15f7b1e9a2
...
da2801560d
Author | SHA1 | Date | |
---|---|---|---|
da2801560d | |||
dd855a6d6b | |||
25548176bb | |||
f31b801c03 | |||
346b1a0ca9 | |||
6fdd25ae4b | |||
754a23706a |
@ -115,7 +115,7 @@ class PersistentDataManager implements IPersistentDataManager
|
||||
|
||||
if (count($modified) > 0) {
|
||||
if ($model instanceof ModelWithSlug && isset($modified['slug'])) {
|
||||
$modified['slug'] = $this->generateUniqueSlug($model, $modified['slug']);
|
||||
$diff['slug']['new'] = $modified['slug'] = $this->generateUniqueSlug($model, $modified['slug']);
|
||||
}
|
||||
|
||||
$modify->setId($id);
|
||||
@ -278,7 +278,10 @@ class PersistentDataManager implements IPersistentDataManager
|
||||
$method = 'set' . str_replace('_', '', ucwords($relation, '_'));
|
||||
$model->$method($relationModel);
|
||||
} else {
|
||||
next($data);
|
||||
while (substr($key, 0, strlen($relation . '__')) === $relation . '__') {
|
||||
next($data);
|
||||
$key = key($data);
|
||||
}
|
||||
}
|
||||
|
||||
next($relations);
|
||||
@ -302,6 +305,8 @@ class PersistentDataManager implements IPersistentDataManager
|
||||
|
||||
if ($relationModel !== null) {
|
||||
$model->$methodSet($relationModel->getId());
|
||||
} else {
|
||||
$model->$methodSet(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -97,7 +97,12 @@ class Linker
|
||||
|
||||
fwrite($outputFileHandle, $extra[0]);
|
||||
while (($line = fgets($inputFileHandle)) !== false) {
|
||||
fwrite($outputFileHandle, $line);
|
||||
if (preg_match('/^\s*@include\((.*)\)\s*$/', $line, $matches) === 1) {
|
||||
$include = file_get_contents(ROOT . '/views/' . $matches[1] . '.php');
|
||||
fwrite($outputFileHandle, $include);
|
||||
} else {
|
||||
fwrite($outputFileHandle, $line);
|
||||
}
|
||||
}
|
||||
fwrite($outputFileHandle, $extra[1]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user