mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Remove dead code
This commit is contained in:
@@ -973,8 +973,6 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
{
|
||||
$newfilename = $this->record_id . '_0_' . $name . '.' . $media->getFile()->getExtension();
|
||||
|
||||
$base_url = '';
|
||||
|
||||
$subdef_def = false;
|
||||
|
||||
if ($name == 'document') {
|
||||
@@ -1351,7 +1349,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
$app['filesystem']->copy($file->getFile()->getRealPath(), $pathhd . $newname, true);
|
||||
|
||||
$media = $app['mediavorus']->guess($pathhd . $newname);
|
||||
$subdef = media_subdef::create($app, $record, 'document', $media);
|
||||
media_subdef::create($app, $record, 'document', $media);
|
||||
|
||||
$record->delete_data_from_cache(\record_adapter::CACHE_SUBDEFS);
|
||||
|
||||
@@ -1500,8 +1498,6 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
public function delete()
|
||||
{
|
||||
$connbas = $this->get_databox()->get_connection();
|
||||
$sbas_id = $this->get_databox()->get_sbas_id();
|
||||
$conn = $this->app['phraseanet.appbox']->get_connection();
|
||||
|
||||
$ftodel = array();
|
||||
foreach ($this->get_subdefs() as $subdef) {
|
||||
@@ -1529,12 +1525,6 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
$stmt->execute(array(':record_id' => $this->get_record_id()));
|
||||
$stmt->closeCursor();
|
||||
|
||||
$sql = 'SELECT id FROM metadatas WHERE record_id = :record_id';
|
||||
$stmt = $connbas->prepare($sql);
|
||||
$stmt->execute(array(':record_id' => $this->get_record_id()));
|
||||
$rs = $stmt->fetchAll();
|
||||
$stmt->closeCursor();
|
||||
|
||||
$sql = "DELETE FROM metadatas WHERE record_id = :record_id";
|
||||
$stmt = $connbas->prepare($sql);
|
||||
$stmt->execute(array(':record_id' => $this->get_record_id()));
|
||||
@@ -1582,10 +1572,6 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
$stmt->execute(array(':record_id' => $this->get_record_id()));
|
||||
$stmt->closeCursor();
|
||||
|
||||
$base_ids = array_map(function($collection) {
|
||||
return $collection->get_base_id();
|
||||
}, $this->databox->get_collections());
|
||||
|
||||
$orderElementRepository = $this->app['EM']->getRepository('\Entities\OrderElement');
|
||||
|
||||
/* @var $repository \Repositories\OrderElementRepository */
|
||||
|
@@ -127,7 +127,6 @@ class record_preview extends record_adapter
|
||||
$this->original_item = $this->container;
|
||||
if ($pos == 0) {
|
||||
$number = 0;
|
||||
$title = _('preview:: regroupement ');
|
||||
} else {
|
||||
$children = $this->container->get_children();
|
||||
foreach ($children as $child) {
|
||||
@@ -219,7 +218,6 @@ class record_preview extends record_adapter
|
||||
case 'RESULT':
|
||||
$perPage = 56;
|
||||
$index = ($pos - 3) < 0 ? 0 : ($pos - 3);
|
||||
$page = (int) ceil($pos / $perPage);
|
||||
$results = $search_engine->query($query, $index, $perPage);
|
||||
|
||||
$this->train = $results->getResults()->toArray();
|
||||
@@ -593,8 +591,6 @@ class record_preview extends record_adapter
|
||||
$views = $dwnls = array();
|
||||
$top = 1;
|
||||
$day = 30;
|
||||
$min = 0;
|
||||
$average = 0;
|
||||
|
||||
while ($day >= 0) {
|
||||
|
||||
|
Reference in New Issue
Block a user