diff --git a/lib/Alchemy/Phrasea/Border/File.php b/lib/Alchemy/Phrasea/Border/File.php
index f05e62a7e7..3e861ddfd4 100644
--- a/lib/Alchemy/Phrasea/Border/File.php
+++ b/lib/Alchemy/Phrasea/Border/File.php
@@ -21,12 +21,10 @@ use Alchemy\Phrasea\Border\Attribute\AttributeInterface;
use MediaVorus\Media\MediaInterface;
use MediaVorus\MediaVorus;
use MediaVorus\Exception\FileNotFoundException;
-use PHPExiftool\Writer;
use PHPExiftool\Driver\TagFactory;
use PHPExiftool\Driver\Metadata\Metadata;
use PHPExiftool\Driver\Metadata\MetadataBag as ExiftoolMetadataBag;
use PHPExiftool\Driver\Value\Mono as MonoValue;
-use PHPExiftool\Exiftool;
use PHPExiftool\Exception\ExceptionInterface as PHPExiftoolException;
/**
@@ -149,8 +147,6 @@ class File
}
}
- $reader = $metadatas = null;
-
return $this->uuid;
}
diff --git a/lib/Alchemy/Phrasea/Command/Plugin/AbstractPluginCommand.php b/lib/Alchemy/Phrasea/Command/Plugin/AbstractPluginCommand.php
index 41cd31b4b3..5831d03a65 100644
--- a/lib/Alchemy/Phrasea/Command/Plugin/AbstractPluginCommand.php
+++ b/lib/Alchemy/Phrasea/Command/Plugin/AbstractPluginCommand.php
@@ -23,7 +23,7 @@ abstract class AbstractPluginCommand extends Command
$output->write("Validating plugins...");
foreach ($this->container['plugins.explorer'] as $directory) {
- $manifests[] = $manifest = $this->container['plugins.plugins-validator']->validatePlugin($directory);
+ $manifests[] = $this->container['plugins.plugins-validator']->validatePlugin($directory);
}
$output->writeln("
\n", $url);
printf("
" . $ret2->saveXML() . ""); } } @@ -2651,7 +2638,6 @@ class Thesaurus implements ControllerProviderInterface if ($sl = $ret2->getElementsByTagName("sy_list")->item(0)) { $sl = $ret->importNode($sl, true); - $sy_list = $root->appendChild($sl); } if ($request->get('debug')) { @@ -3018,9 +3004,6 @@ class Thesaurus implements ControllerProviderInterface } } elseif ($n->nodeName == "sy") { $t = $n->getAttribute("v"); - if ($k = $n->getAttribute("k")) { - // $t .= " ($k)"; - } $allsy .= ( $allsy ? " ; " : "") . $t; } } @@ -3113,7 +3096,7 @@ class Thesaurus implements ControllerProviderInterface public function searchCandidateXml(Application $app, Request $request) { - if (null === $bid = $request->get("bid")) { + if (null === $request->get("bid")) { return new Response('Missing bid parameter', 400); } diff --git a/lib/Alchemy/Phrasea/Controller/Thesaurus/Xmlhttp.php b/lib/Alchemy/Phrasea/Controller/Thesaurus/Xmlhttp.php index d887f07dcb..2a6bac4ca1 100644 --- a/lib/Alchemy/Phrasea/Controller/Thesaurus/Xmlhttp.php +++ b/lib/Alchemy/Phrasea/Controller/Thesaurus/Xmlhttp.php @@ -933,13 +933,9 @@ class Xmlhttp implements ControllerProviderInterface } if ($dom) { - $term0 = ''; - $firstTerm0 = ''; - $xpath = new \DOMXPath($dom); if ($thid == 'T' || $thid == 'C') { $q = '/' . $xqroot; - $term0 = $dbname; } else { $q = '/' . $xqroot . '//te[@id=\'' . $thid . '\']'; } @@ -1454,7 +1450,7 @@ class Xmlhttp implements ControllerProviderInterface $xp = '//te[@id="' . $tid . '"]/sy'; $nodes = $xpathct->query($xp); if ($nodes->length == 1) { - $sy = $term = $nodes->item(0); + $sy = $nodes->item(0); $syid = str_replace('.', 'd', $sy->getAttribute('id')) . 'd'; $lid .= ( $lid ? ',' : '') . "'" . $syid . "'"; $field = $sy->parentNode->parentNode->getAttribute('field'); @@ -1625,7 +1621,6 @@ class Xmlhttp implements ControllerProviderInterface $html = ''; $sbid = (int) $request->get('sbid'); - $dbname = ''; try { $databox = $app['phraseanet.appbox']->get_databox($sbid); diff --git a/lib/Alchemy/Phrasea/Form/Login/PhraseaRegisterForm.php b/lib/Alchemy/Phrasea/Form/Login/PhraseaRegisterForm.php index 1b0b7a4c14..01e2888c0a 100644 --- a/lib/Alchemy/Phrasea/Form/Login/PhraseaRegisterForm.php +++ b/lib/Alchemy/Phrasea/Form/Login/PhraseaRegisterForm.php @@ -152,14 +152,4 @@ class PhraseaRegisterForm extends AbstractType { return $this->available[$name]['type']; } - - private function getLabel($name) - { - return $this->available[$name]['label']; - } - - private function getConstraints($name, array $constraints = array()) - { - return isset($this->available[$name]['constraints']) ? $this->available[$name]['constraints'] : array(); - } } diff --git a/lib/Alchemy/Phrasea/Helper/User/Edit.php b/lib/Alchemy/Phrasea/Helper/User/Edit.php index 8d22e09402..5cfc9fe37a 100644 --- a/lib/Alchemy/Phrasea/Helper/User/Edit.php +++ b/lib/Alchemy/Phrasea/Helper/User/Edit.php @@ -229,8 +229,6 @@ class Edit extends \Alchemy\Phrasea\Helper\Helper $rs = $stmt->fetchAll(\PDO::FETCH_ASSOC); $stmt->closeCursor(); - $msk_and = null; - $msk_xor = null; $tbits_and = array(); $tbits_xor = array(); diff --git a/lib/Alchemy/Phrasea/Helper/User/Manage.php b/lib/Alchemy/Phrasea/Helper/User/Manage.php index 2c0dc57eea..34fd6f587f 100644 --- a/lib/Alchemy/Phrasea/Helper/User/Manage.php +++ b/lib/Alchemy/Phrasea/Helper/User/Manage.php @@ -81,8 +81,6 @@ class Manage extends Helper public function search() { - $request = $this->request; - $offset_start = (int) $this->request->get('offset_start'); $offset_start = $offset_start < 0 ? 0 : $offset_start; $results_quantity = (int) $this->request->get('per_page'); diff --git a/lib/Alchemy/Phrasea/Helper/WorkZone.php b/lib/Alchemy/Phrasea/Helper/WorkZone.php index 04ef770b4e..aaa444a2e7 100644 --- a/lib/Alchemy/Phrasea/Helper/WorkZone.php +++ b/lib/Alchemy/Phrasea/Helper/WorkZone.php @@ -78,6 +78,5 @@ class WorkZone extends Helper protected function sortBaskets(array $baskets) { - $tmp_baskets = array(); } } diff --git a/lib/Alchemy/Phrasea/Out/Module/PDF.php b/lib/Alchemy/Phrasea/Out/Module/PDF.php index 0761623052..8c4a28cf9b 100644 --- a/lib/Alchemy/Phrasea/Out/Module/PDF.php +++ b/lib/Alchemy/Phrasea/Out/Module/PDF.php @@ -219,15 +219,12 @@ class PDF $this->pdf->AddPage(); $oldMargins = $this->pdf->getMargins(); - $tmargin = $oldMargins['top']; $lmargin = $oldMargins['left']; - $bmargin = $oldMargins['bottom']; $rmargin = $oldMargins['right']; $this->pdf->SetLeftMargin($lmargin + 55); $ndoc = 0; - $lastpage = $this->pdf->PageNo(); foreach ($this->records as $rec) { /* @var $rec record_adapter */ $subdef = $rec->get_subdef('thumbnail'); @@ -324,7 +321,6 @@ class PDF $rec->set_number($this->pdf->PageNo()); } $lmargin = $this->pdf->GetX(); - $tmargin = $this->pdf->GetY(); $himg = 0; $y = 0; $miniConv = NULL; diff --git a/lib/Alchemy/Phrasea/Out/Tool/PhraseaPDF.php b/lib/Alchemy/Phrasea/Out/Tool/PhraseaPDF.php index 774525e9fb..3f390d91b7 100644 --- a/lib/Alchemy/Phrasea/Out/Tool/PhraseaPDF.php +++ b/lib/Alchemy/Phrasea/Out/Tool/PhraseaPDF.php @@ -27,7 +27,7 @@ class PhraseaPDF extends \TCPDF public function Footer() { - $ml = $this->SetLeftMargin(0); + $this->SetLeftMargin(0); $mr = $this->SetRightMargin(0); $this->SetY(-15); diff --git a/lib/Alchemy/Phrasea/SearchEngine/Phrasea/PhraseaEngineQueryParser.php b/lib/Alchemy/Phrasea/SearchEngine/Phrasea/PhraseaEngineQueryParser.php index a44de4cd47..8104305cf3 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Phrasea/PhraseaEngineQueryParser.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Phrasea/PhraseaEngineQueryParser.php @@ -454,8 +454,6 @@ class PhraseaEngineQueryParser public function _extendThesaurusOnTerms(&$tree, &$copy, $useFullText, $useThesaurus, $keepfuzzy, $depth, $path) { - if ($depth == 0) - $ret = $tree; if (!$useThesaurus) { return; // full-text only : inchangé } @@ -586,7 +584,7 @@ class PhraseaEngineQueryParser $ambigus = 0; if ($tree["CLASS"] == "OPK" && $tree["NODETYPE"] == PHRASEA_OP_COLON) { - $ambigus = $this->setTids($tree, $bid, $domthe, $searchsynonyms); + $ambigus = $this->setTids($tree, $bid, $domthe); } elseif ($tree["CLASS"] == "OPS" || $tree["CLASS"] == "OPK") { $ambigus += $this->thesaurus2($tree["LB"], $bid, $name, $domthe, $searchsynonyms, $depth + 1); $ambigus += $this->thesaurus2($tree["RB"], $bid, $name, $domthe, $searchsynonyms, $depth + 1); @@ -597,7 +595,6 @@ class PhraseaEngineQueryParser public function propAsHTML(&$node, &$html, $path, $depth = 0) { - global $parm; if ($depth > 0) { $tsy = array(); $lngfound = "?"; @@ -676,9 +673,6 @@ class PhraseaEngineQueryParser public function _queryAsHTML($tree, $depth = 0) { - if ($depth == 0) { - $ambiguites = array("n" => 0, "refs" => array()); - } switch ($tree["CLASS"]) { case "SIMPLE": case "QSIMPLE": @@ -720,7 +714,7 @@ class PhraseaEngineQueryParser } } - public function setTids(&$tree, $bid, &$domthe, $searchsynonyms) + public function setTids(&$tree, $bid, &$domthe) { if ($this->debug) print("============================ setTids:\n\$tree=" . var_export($tree, true) . "\n"); @@ -761,7 +755,6 @@ class PhraseaEngineQueryParser // $this->thesaurusDOMNodes[] = $nodes->item(0); } else { // on cherche plusieurs id's, on utilisera la syntaxe 'regexp' (l'extension repérera elle meme la syntaxe car la value finira par '$') - $val = ""; foreach ($nodes as $node) { if (!isset($tree["CONTEXT"])) $ambigus++; @@ -865,7 +858,6 @@ class PhraseaEngineQueryParser switch ($tree["CLASS"]) { case "SIMPLE": case "QSIMPLE": - $prelink = $postlink = ""; $w = is_array($tree["VALUE"]) ? implode(" ", $tree["VALUE"]) : $tree["VALUE"]; $tab = "\n" . str_repeat("\t", $depth); if (isset($tree["TIDS"]) && count($tree["TIDS"]) > 1) { diff --git a/lib/Doctrine/Repositories/StoryWZRepository.php b/lib/Doctrine/Repositories/StoryWZRepository.php index a0f5ddd1d0..5e0827390f 100644 --- a/lib/Doctrine/Repositories/StoryWZRepository.php +++ b/lib/Doctrine/Repositories/StoryWZRepository.php @@ -96,7 +96,7 @@ class StoryWZRepository extends EntityRepository if ($story) { try { - $record = $story->getRecord($app); + $story->getRecord($app); } catch (NotFoundHttpException $e) { $this->getEntityManager()->remove($story); $this->getEntityManager()->flush(); @@ -122,7 +122,7 @@ class StoryWZRepository extends EntityRepository foreach ($stories as $key => $story) { try { - $record = $story->getRecord($app); + $story->getRecord($app); } catch (NotFoundHttpException $e) { $this->getEntityManager()->remove($story); $this->getEntityManager()->flush(); @@ -146,7 +146,7 @@ class StoryWZRepository extends EntityRepository foreach ($stories as $key => $story) { try { - $record = $story->getRecord($app); + $story->getRecord($app); } catch (NotFoundHttpException $e) { $this->getEntityManager()->remove($story); $this->getEntityManager()->flush(); diff --git a/lib/classes/ACL.php b/lib/classes/ACL.php index 48f226d3a5..a88d474787 100644 --- a/lib/classes/ACL.php +++ b/lib/classes/ACL.php @@ -687,7 +687,6 @@ class ACL implements cache_cacheableInterface } $base_id = $collection->get_base_id(); - $datas = $this->_rights_bas[$base_id]; foreach ($rights as $right) { if (!$this->has_right_on_base($base_id, $right)) { diff --git a/lib/classes/API/V1/Timer.php b/lib/classes/API/V1/Timer.php index 59c3c43834..5b5f233b05 100644 --- a/lib/classes/API/V1/Timer.php +++ b/lib/classes/API/V1/Timer.php @@ -9,7 +9,6 @@ use Symfony\Component\HttpKernel\KernelEvents; class API_V1_Timer implements ServiceProviderInterface { - private $app; private $starting; public function __construct() diff --git a/lib/classes/API/V1/adapter.php b/lib/classes/API/V1/adapter.php index e93dccc500..773c5d6eb5 100644 --- a/lib/classes/API/V1/adapter.php +++ b/lib/classes/API/V1/adapter.php @@ -1239,7 +1239,7 @@ class API_V1_adapter extends API_V1_Abstract { $result = new API_V1_result($this->app, $request, $this); - $usr_id = $session = $this->app['authentication']->getUser()->get_id(); + $usr_id = $this->app['authentication']->getUser()->get_id(); $result->set_datas(array('baskets' => $this->list_baskets($usr_id))); diff --git a/lib/classes/Bridge/Api/Dailymotion.php b/lib/classes/Bridge/Api/Dailymotion.php index de5c7c921d..0a2bff6b8b 100644 --- a/lib/classes/Bridge/Api/Dailymotion.php +++ b/lib/classes/Bridge/Api/Dailymotion.php @@ -375,7 +375,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I switch ($object) { case self::ELEMENT_TYPE_VIDEO : $url = sprintf("POST /video/%s", $object_id); - $result = $this->_api->call($url, $params, $this->oauth_token); + $this->_api->call($url, $params, $this->oauth_token); break; default: throw new Bridge_Exception_ElementUnknown('Unknown element ' . $type); @@ -432,7 +432,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I $url = sprintf('POST /%s/%s/%ss', $destination, $container_id, $element_type); - $result = $this->_api->call($url, array('ids' => implode(",", $array)), $this->oauth_token); + $this->_api->call($url, array('ids' => implode(",", $array)), $this->oauth_token); return $this->get_container_from_id(self::CONTAINER_TYPE_PLAYLIST, $container_id); break; @@ -458,10 +458,10 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I $url = sprintf("DELETE /%s/%s", $object, $object_id); switch ($object) { case self::ELEMENT_TYPE_VIDEO: - $result = $this->_api->call($url, array(), $this->oauth_token); + $this->_api->call($url, array(), $this->oauth_token); break; case self::CONTAINER_TYPE_PLAYLIST: - $result = $this->_api->call($url, array(), $this->oauth_token); + $this->_api->call($url, array(), $this->oauth_token); break; default: throw new Bridge_Exception_ObjectUnknown('Unknown object ' . $object); diff --git a/lib/classes/Bridge/Api/Flickr.php b/lib/classes/Bridge/Api/Flickr.php index 8a58f80f8c..3b5ac101e3 100644 --- a/lib/classes/Bridge/Api/Flickr.php +++ b/lib/classes/Bridge/Api/Flickr.php @@ -837,7 +837,6 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf $xml = $response->getXml(); $complete = isset($xml->uploader->ticket["complete"]) ? (string) $xml->uploader->ticket["complete"] : null; - $invalid = isset($xml->uploader->ticket["invalid"]) ? (string) $xml->uploader->ticket["invalid"] : null; if ($complete) { if ((int) $complete == 0) diff --git a/lib/classes/Bridge/Api/Youtube.php b/lib/classes/Bridge/Api/Youtube.php index 576ef05448..5a9dd092ba 100644 --- a/lib/classes/Bridge/Api/Youtube.php +++ b/lib/classes/Bridge/Api/Youtube.php @@ -564,7 +564,6 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter } if ($error = $this->parse_xml_error($response->getBody())) { - $type = $error['type']; $code = $error['code']; if ($code == "too_many_recent_calls") { diff --git a/lib/classes/User/Adapter.php b/lib/classes/User/Adapter.php index 8532fb039b..f65c1d8781 100644 --- a/lib/classes/User/Adapter.php +++ b/lib/classes/User/Adapter.php @@ -1079,7 +1079,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface protected function load_notifications_preferences(Application $app) { - $notifications = $app['events-manager']->list_notifications_available($this->id); + $notifications = $app['events-manager']->list_notifications_available(); foreach ($notifications as $notification_group => $nots) { foreach ($nots as $notification) { diff --git a/lib/classes/User/Query.php b/lib/classes/User/Query.php index ad10d3c752..45f650c9f4 100644 --- a/lib/classes/User/Query.php +++ b/lib/classes/User/Query.php @@ -266,8 +266,6 @@ class User_Query implements User_QueryInterface $sql .= $this->generate_field_constraints('lastModel', $this->templates); } - $baslist = array(); - if (count($this->base_ids) == 0) { if ($this->bases_restrictions) throw new Exception('No base available for you, not enough rights'); diff --git a/lib/classes/caption/Field/Value.php b/lib/classes/caption/Field/Value.php index d273654b43..b1722c1632 100644 --- a/lib/classes/caption/Field/Value.php +++ b/lib/classes/caption/Field/Value.php @@ -191,7 +191,6 @@ class caption_Field_Value implements cache_cacheableInterface $this->delete_data_from_cache(); $this->databox_field->delete_data_from_cache(); - $sbas_id = $this->record->get_sbas_id(); $this->record->get_caption()->delete_data_from_cache(); return $this; @@ -247,7 +246,6 @@ class caption_Field_Value implements cache_cacheableInterface { $this->value = $value; - $sbas_id = $this->databox_field->get_databox()->get_sbas_id(); $connbas = $this->databox_field->get_connection(); $params = array( @@ -491,7 +489,6 @@ class caption_Field_Value implements cache_cacheableInterface */ public function delete_data_from_cache($option = null) { - $databox = $this->record->get_databox(); $this->value = $this->VocabularyId = $this->VocabularyType = null; $this->record->delete_data_from_cache(record_adapter::CACHE_TITLE); diff --git a/lib/classes/databox.php b/lib/classes/databox.php index 54c6edfd2b..2aac36fc7c 100644 --- a/lib/classes/databox.php +++ b/lib/classes/databox.php @@ -586,7 +586,7 @@ class databox extends base */ public static function mount(Application $app, $host, $port, $user, $password, $dbname, registry $registry) { - $connection = new connection_pdo('test', $host, $port, $user, $password, $dbname, array(), $app['debug']); + new connection_pdo('test', $host, $port, $user, $password, $dbname, array(), $app['debug']); $conn = $app['phraseanet.appbox']->get_connection(); $sql = 'SELECT MAX(ord) as ord FROM sbas'; @@ -838,9 +838,6 @@ class databox extends base $this->_sxml_structure = $this->_dom_structure = $this->_xpath_structure = null; - $com_struct = $this->get_dom_structure(); - $xp_struct = $this->get_xpath_structure(); - $this->meta_struct = null; $this->app['phraseanet.appbox']->delete_data_from_cache(appbox::CACHE_LIST_BASES); @@ -1139,7 +1136,6 @@ class databox extends base unset($e); } - $thesaurus = false; try { $sql = 'SELECT value AS thesaurus FROM pref WHERE prop="thesaurus" LIMIT 1;'; $stmt = $this->get_connection()->prepare($sql); @@ -1418,7 +1414,6 @@ class databox extends base $stmt = $this->get_connection()->prepare($sql); $stmt->execute(array(':terms' => $terms, ':locale' => $locale)); $stmt->closeCursor(); - $update = true; $this->cgus = null; $this->delete_data_from_cache(self::CACHE_CGUS); diff --git a/lib/classes/databox/field.php b/lib/classes/databox/field.php index fdcfeed475..51eaa5387b 100644 --- a/lib/classes/databox/field.php +++ b/lib/classes/databox/field.php @@ -434,7 +434,6 @@ class databox_field implements cache_cacheableInterface } else { $meta = $nodes->item(0); - $current_name = $meta->nodeName; if ($this->name != $meta->nodeName) { $old_meta = $meta; $meta = $dom_struct->createElement($this->name); diff --git a/lib/classes/databox/status.php b/lib/classes/databox/status.php index 5ef8246636..2c22b9d335 100644 --- a/lib/classes/databox/status.php +++ b/lib/classes/databox/status.php @@ -260,7 +260,7 @@ class databox_status $doc = $databox->get_dom_structure(); if ($doc) { $xpath = $databox->get_xpath_structure(); - $entries = $xpath->query($q = "/record/statbits/bit[@n=" . $bit . "]"); + $entries = $xpath->query("/record/statbits/bit[@n=" . $bit . "]"); foreach ($entries as $sbit) { if ($p = $sbit->previousSibling) { diff --git a/lib/classes/databox/subdefsStructure.php b/lib/classes/databox/subdefsStructure.php index 596e6f92e7..6d838f8407 100644 --- a/lib/classes/databox/subdefsStructure.php +++ b/lib/classes/databox/subdefsStructure.php @@ -231,7 +231,7 @@ class databox_subdefsStructure implements IteratorAggregate, Countable foreach ($labels as $code => $label) { $child = $dom_struct->createElement('label'); - $labelElement = $child->appendChild($dom_struct->createTextNode($label)); + $child->appendChild($dom_struct->createTextNode($label)); $lang = $child->appendChild($dom_struct->createAttribute('lang')); $lang->value = $code; $subdef->appendChild($child); diff --git a/lib/classes/deprecated/inscript.api.php b/lib/classes/deprecated/inscript.api.php index 0dadb5e8c0..72906dc234 100644 --- a/lib/classes/deprecated/inscript.api.php +++ b/lib/classes/deprecated/inscript.api.php @@ -110,10 +110,8 @@ function giveMeBases(Application $app, $usr = null) $cguColl = false; $collInscript = $baseInscript; - $defined = false; $cguSpec = false; if (false !== $xml = simplexml_load_string($collection->get_prefs())) { - $defined = true; foreach ($xml->xpath('/baseprefs/caninscript') as $caninscript) { $tmp = (string) $caninscript; if ($tmp === "1") @@ -170,7 +168,7 @@ function giveMeBases(Application $app, $usr = null) return $inscriptions; } -function giveMeBaseUsr(Application $app, $usr, $lng) +function giveMeBaseUsr(Application $app, $usr) { $noDemand = true; @@ -308,7 +306,7 @@ function giveModInscript($usr, $lng) '