namespace Friendica\Database;
-use Friendica\Core\Config\Cache\ConfigCache;
+use Friendica\Core\Config\Cache;
use Friendica\Core\System;
use Friendica\Network\HTTPException\InternalServerErrorException;
use Friendica\Util\DateTimeFormat;
protected $connected = false;
/**
- * @var ConfigCache
+ * @var Cache
*/
protected $configCache;
/**
protected $in_retrial = false;
private $relation = [];
- public function __construct(ConfigCache $configCache, Profiler $profiler, LoggerInterface $logger, array $server = [])
+ public function __construct(Cache $configCache, Profiler $profiler, LoggerInterface $logger, array $server = [])
{
// We are storing these values for being able to perform a reconnect
$this->configCache = $configCache;
}
}
- $do_update = (count($old_fields) == 0);
-
foreach ($old_fields AS $fieldname => $content) {
- if (isset($fields[$fieldname])) {
- if (($fields[$fieldname] == $content) && !is_null($content)) {
- unset($fields[$fieldname]);
- } else {
- $do_update = true;
- }
+ if (isset($fields[$fieldname]) && !is_null($content) && ($fields[$fieldname] == $content)) {
+ unset($fields[$fieldname]);
}
}
- if (!$do_update || (count($fields) == 0)) {
+ if (count($fields) == 0) {
return true;
}