move check for latest_update one abstraction layer up
This commit is contained in:
parent
0a2166ed1b
commit
8cb0a48009
2 changed files with 8 additions and 8 deletions
|
@ -152,6 +152,14 @@ class TwingleApiCall {
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set latest_update
|
||||||
|
$values['last_update'] = $values['last_update'] > $project_options['last_update']
|
||||||
|
? $values['last_update']
|
||||||
|
: $project_options['last_update'];
|
||||||
|
|
||||||
|
// Delete $options['last_update']
|
||||||
|
unset($project_options['last_update']);
|
||||||
|
|
||||||
// Instantiate TwingleProject
|
// Instantiate TwingleProject
|
||||||
try {
|
try {
|
||||||
$project = new TwingleProject(
|
$project = new TwingleProject(
|
||||||
|
|
|
@ -63,14 +63,6 @@ class TwingleProject {
|
||||||
// If values come from Twingle API
|
// If values come from Twingle API
|
||||||
elseif ($origin == self::TWINGLE) {
|
elseif ($origin == self::TWINGLE) {
|
||||||
|
|
||||||
// Set latest_update
|
|
||||||
$project['last_update'] = $project['last_update'] > $options['last_update']
|
|
||||||
? $project['last_update']
|
|
||||||
: $options['last_update'];
|
|
||||||
|
|
||||||
// Delete $options['last_update']
|
|
||||||
unset($options['last_update']);
|
|
||||||
|
|
||||||
// Translate keys for import
|
// Translate keys for import
|
||||||
self::translateKeys($project, self::IN);
|
self::translateKeys($project, self::IN);
|
||||||
self::translateKeys($options, self::IN);
|
self::translateKeys($options, self::IN);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue