mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
Report previous patches
This commit is contained in:
@@ -11,14 +11,11 @@
|
|||||||
|
|
||||||
namespace KonsoleKommander;
|
namespace KonsoleKommander;
|
||||||
|
|
||||||
|
|
||||||
use Alchemy\Phrasea\Command\BuildSubdefs;
|
use Alchemy\Phrasea\Command\BuildSubdefs;
|
||||||
use Alchemy\Phrasea\Command\Plugin\ListPlugin;
|
use Alchemy\Phrasea\Command\Plugin\ListPlugin;
|
||||||
use Alchemy\Phrasea\Command\Setup\H264ConfigurationDumper;
|
use Alchemy\Phrasea\Command\Setup\H264ConfigurationDumper;
|
||||||
use Alchemy\Phrasea\Command\Setup\H264MappingGenerator;
|
use Alchemy\Phrasea\Command\Setup\H264MappingGenerator;
|
||||||
use Alchemy\Phrasea\Command\Setup\StaticConfigurationDumper;
|
use Alchemy\Phrasea\Command\Setup\StaticConfigurationDumper;
|
||||||
use Alchemy\Phrasea\Command\SearchEngine\IndexFull;
|
|
||||||
use Alchemy\Phrasea\Command\WebsocketServer;
|
|
||||||
use Alchemy\Phrasea\Core\Version;
|
use Alchemy\Phrasea\Core\Version;
|
||||||
use Alchemy\Phrasea\Command\BuildMissingSubdefs;
|
use Alchemy\Phrasea\Command\BuildMissingSubdefs;
|
||||||
use Alchemy\Phrasea\Command\CreateCollection;
|
use Alchemy\Phrasea\Command\CreateCollection;
|
||||||
|
@@ -40,7 +40,8 @@
|
|||||||
"alchemy/geonames-api-consumer" : "~0.1.0",
|
"alchemy/geonames-api-consumer" : "~0.1.0",
|
||||||
"goodby/csv" : "~1.0",
|
"goodby/csv" : "~1.0",
|
||||||
"guzzle/guzzle" : "~3.0",
|
"guzzle/guzzle" : "~3.0",
|
||||||
"imagine/imagine" : "dev-alchemy-0.6.2 as 0.6.2","igorw/get-in" : "~1.0",
|
"imagine/imagine" : "dev-alchemy-0.6.2 as 0.6.2",
|
||||||
|
"igorw/get-in" : "~1.0",
|
||||||
"ircmaxell/random-lib" : "~1.0",
|
"ircmaxell/random-lib" : "~1.0",
|
||||||
"jms/serializer" : "~0.10",
|
"jms/serializer" : "~0.10",
|
||||||
"jms/translation-bundle" : "~1.1",
|
"jms/translation-bundle" : "~1.1",
|
||||||
|
@@ -555,7 +555,8 @@ class V1 implements ControllerProviderInterface
|
|||||||
return $this->getBadRequest($app, $request, sprintf('Invalid forceBehavior value `%s`', $request->get('forceBehavior')));
|
return $this->getBadRequest($app, $request, sprintf('Invalid forceBehavior value `%s`', $request->get('forceBehavior')));
|
||||||
}
|
}
|
||||||
|
|
||||||
$app['border-manager']->process($session, $Package, $callback, $behavior);
|
$nosubdef = $request->get('nosubdefs')==='' || \p4field::isyes($request->get('nosubdefs'));
|
||||||
|
$app['border-manager']->process($session, $Package, $callback, $behavior, $nosubdef);
|
||||||
|
|
||||||
$ret = ['entity' => null,];
|
$ret = ['entity' => null,];
|
||||||
|
|
||||||
@@ -1325,13 +1326,38 @@ class V1 implements ControllerProviderInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($media->get_name() != 'document') {
|
||||||
|
$databox = $record->get_databox();
|
||||||
|
try {
|
||||||
|
$subDefDefinition = $databox->get_subdef_structure()->get_subdef($record->get_type(), $media->get_name());
|
||||||
|
} catch (\Exception_Databox_SubdefNotFound $e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($media->get_name() != 'document' && false === $subDefDefinition->is_downloadable()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if ($media->get_permalink() instanceof \media_Permalink_Adapter) {
|
if ($media->get_permalink() instanceof \media_Permalink_Adapter) {
|
||||||
$permalink = $this->list_permalink($media->get_permalink());
|
$permalink = $this->list_permalink($media->get_permalink());
|
||||||
} else {
|
} else {
|
||||||
$permalink = null;
|
$permalink = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ['name' => $media->get_name(), 'permalink' => $permalink, 'height' => $media->get_height(), 'width' => $media->get_width(), 'filesize' => $media->get_size(), 'devices' => $media->getDevices(), 'player_type' => $media->get_type(), 'mime_type' => $media->get_mime(),];
|
return [
|
||||||
|
'name' => $media->get_name(),
|
||||||
|
'permalink' => $permalink,
|
||||||
|
'height' => $media->get_height(),
|
||||||
|
'width' => $media->get_width(),
|
||||||
|
'filesize' => $media->get_size(),
|
||||||
|
'devices' => $media->getDevices(),
|
||||||
|
'player_type' => $media->get_type(),
|
||||||
|
'mime_type' => $media->get_mime(),
|
||||||
|
'substituted' => $media->is_substituted(),
|
||||||
|
'created_on' => $media->get_creation_date()->format(DATE_ATOM),
|
||||||
|
'updated_on' => $media->get_modification_date()->format(DATE_ATOM),
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -217,6 +217,7 @@ class UserManager
|
|||||||
$this->cleanFtpExports($user);
|
$this->cleanFtpExports($user);
|
||||||
$this->cleanAuthProvider($user);
|
$this->cleanAuthProvider($user);
|
||||||
$this->cleanUserSessions($user);
|
$this->cleanUserSessions($user);
|
||||||
|
$this->cleanOauthApplication($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -235,4 +236,18 @@ class UserManager
|
|||||||
$stmt->closeCursor();
|
$stmt->closeCursor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private function cleanOauthApplication(User $user)
|
||||||
|
{
|
||||||
|
$accounts = $this->objectManager->getRepository('Phraseanet:ApiAccount')->findByUser($user);
|
||||||
|
|
||||||
|
foreach ($accounts as $account) {
|
||||||
|
$this->objectManager->remove($account);
|
||||||
|
}
|
||||||
|
|
||||||
|
$apps = $this->objectManager->getRepository('Phraseanet:ApiApplication')->findByCreator($user);
|
||||||
|
|
||||||
|
foreach ($apps as $app) {
|
||||||
|
$this->objectManager->remove($app);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -24,4 +24,13 @@ class ApiAccountRepository extends EntityRepository
|
|||||||
|
|
||||||
return $qb->getQuery()->getOneOrNullResult();
|
return $qb->getQuery()->getOneOrNullResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function findByUser(User $user)
|
||||||
|
{
|
||||||
|
$qb = $this->createQueryBuilder('acc');
|
||||||
|
$qb->where($qb->expr()->eq('acc.user', ':user'));
|
||||||
|
$qb->setParameter(':user', $user);
|
||||||
|
|
||||||
|
return $qb->getQuery()->getResult();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -118,6 +118,7 @@ class BridgeJob extends AbstractJob
|
|||||||
try {
|
try {
|
||||||
$dist_id = $account->get_api()->upload($element->get_record(), $element->get_datas());
|
$dist_id = $account->get_api()->upload($element->get_record(), $element->get_datas());
|
||||||
$element->set_uploaded_on(new \DateTime());
|
$element->set_uploaded_on(new \DateTime());
|
||||||
|
$element->set_status(\Bridge_Element::STATUS_DONE);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->log('debug', 'Error while uploading : ' . $e->getMessage());
|
$this->log('debug', 'Error while uploading : ' . $e->getMessage());
|
||||||
$element->set_status(\Bridge_Element::STATUS_ERROR);
|
$element->set_status(\Bridge_Element::STATUS_ERROR);
|
||||||
|
@@ -89,7 +89,6 @@ class patch_320alpha4b extends patchAbstract
|
|||||||
if (null === $user = $this->loadUser($app['EM'], $row['usr_id'])) {
|
if (null === $user = $this->loadUser($app['EM'], $row['usr_id'])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$feed = $this->get_feed($appbox, $user, $row['pub_restrict'], $row['homelink'], $app);
|
|
||||||
|
|
||||||
$feed = $this->get_feed($app, $appbox, $user, $row['pub_restrict'], $row['homelink']);
|
$feed = $this->get_feed($app, $appbox, $user, $row['pub_restrict'], $row['homelink']);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user