Fix CS lib/classes

This commit is contained in:
Romain Neutron
2013-01-29 16:39:02 +01:00
parent 53206af159
commit 4414892b91
108 changed files with 178 additions and 249 deletions

View File

@@ -75,7 +75,6 @@ class Bridge_Api_Flickr_Container implements Bridge_Api_ContainerInterface
*/
public function get_thumbnail($width = 120, $height = 90)
{
return $this->thumbnail;
}

View File

@@ -84,4 +84,3 @@ class DailymotionWithoutOauth2 extends Dailymotion
return $result['url'];
}
}

View File

@@ -42,7 +42,6 @@ class Session_Authentication_PersistentCookie implements Session_Authentication_
$this->app= $app;
$this->persistent_cookie = $persistent_cookie;
$dql = 'SELECT s FROM Entities\Session s
WHERE s.token = :token';

View File

@@ -63,7 +63,6 @@ class Session_Authentication_Token implements Session_Authentication_Interface
*/
public function signOn()
{
return $this->user;
}
@@ -73,7 +72,6 @@ class Session_Authentication_Token implements Session_Authentication_Interface
*/
public function get_user()
{
return $this->user;
}

View File

@@ -1243,7 +1243,6 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
public function get_applied_template()
{
return $this->applied_template;
}
@@ -1474,7 +1473,6 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
$app['EM']->flush();
}
$usr_id = $app['phraseanet.user']->get_id();
$user = User_Adapter::getInstance($usr_id, $app);

View File

@@ -153,7 +153,6 @@ class cache_databox
$connbas = \connection::getPDOConnection($app, $sbas_id);
$sql = 'SELECT distinct site_id as site_id
FROM clients
WHERE site_id != :site_id';
@@ -181,7 +180,6 @@ class cache_databox
{
$connbas = $databox->get_connection();
$sql = 'SELECT site_id FROM clients WHERE site_id = :site_id';
$stmt = $connbas->prepare($sql);
$stmt->execute(array(':site_id' => $app['phraseanet.registry']->get('GV_ServerName')));

View File

@@ -396,4 +396,3 @@ class ftpclient
return $list;
}
}

View File

@@ -161,7 +161,6 @@ class gatekeeper
return $this;
}
/**
* Checks if session is open
* Redirect if session is missing

View File

@@ -529,14 +529,12 @@ class media_subdef extends media_abstract implements cache_cacheableInterface
}
try {
return $this->record
->get_databox()
->get_subdef_structure()
->get_subdef($this->record->get_type(), $this->get_name())
->getDevices();
} catch (\Exception_Databox_SubdefNotFound $e) {
return array();
}
}
@@ -719,6 +717,7 @@ class media_subdef extends media_abstract implements cache_cacheableInterface
}
unset($media);
return $subdef;
}
@@ -777,4 +776,3 @@ class media_subdef extends media_abstract implements cache_cacheableInterface
return $databox->delete_data_from_cache($this->get_cache_key($option));
}
}

View File

@@ -14,7 +14,6 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Core\Service\Builder;
/**

View File

@@ -14,7 +14,6 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Alchemy\Phrasea\Command\Command;
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Core\Service\Builder;
/**

View File

@@ -39,7 +39,6 @@ class module_console_schedulerStop extends Command
return 0;
} catch (\Exception $e) {
return 1;
}

View File

@@ -114,4 +114,3 @@ class module_console_taskState extends Command
return $exitCode;
}
}

View File

@@ -95,7 +95,6 @@ class module_console_taskrun extends Command
}
}
if ($input->getOption('verbose')) {
$this->container['monolog']->pushHandler(new StreamHandler('php://stdout'));
}

View File

@@ -362,7 +362,6 @@ class module_report_activity extends module_report
{
$this->title = _('report:: telechargements par jour');
$s = new module_report_sql($this->app, $this);
$filter = $s->getFilters();
$conn = $s->getConnBas();

View File

@@ -174,4 +174,3 @@ class module_report_connexion extends module_report
return (int) $row['nb'];
}
}

View File

@@ -237,4 +237,3 @@ class module_report_dashboard_feed implements module_report_dashboard_componentI
}
}
}

View File

@@ -94,4 +94,3 @@ class module_report_dashboard_group implements module_report_dashboard_component
return new module_report_dashboard_merge($this);
}
}

View File

@@ -205,4 +205,3 @@ class module_report_dashboard_merge implements module_report_dashboard_component
return new module_report_dashboard_sort($this);
}
}

View File

@@ -158,4 +158,3 @@ class module_report_dashboard_sort implements module_report_dashboard_componentI
return $tmp;
}
}

View File

@@ -272,4 +272,3 @@ class module_report_download extends module_report
return $array;
}
}

View File

@@ -127,4 +127,3 @@ class module_report_edit extends module_report
}
}
}

View File

@@ -130,4 +130,3 @@ class module_report_push extends module_report
}
}
}

View File

@@ -109,4 +109,3 @@ class module_report_question extends module_report
}
}
}

View File

@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
interface module_report_sqlReportinterface
interface module_report_sqlReportInterface
{
public function buildSql();

View File

@@ -258,4 +258,3 @@ class module_report_sqlfilter
return;
}
}

View File

@@ -103,4 +103,3 @@ class module_report_sqlquestion extends module_report_sql implements module_repo
return array('sql' => $sql, 'params' => $params);
}
}

View File

@@ -130,4 +130,3 @@ class module_report_validate extends module_report
}
}
}

View File

@@ -65,4 +65,3 @@ class patch_320 implements patchInterface
return true;
}
}

View File

@@ -128,4 +128,3 @@ class patch_361 implements patchInterface
return true;
}
}

View File

@@ -90,4 +90,3 @@ class patch_370 implements patchInterface
return true;
}
}

View File

@@ -70,4 +70,3 @@ class patch_370a3 implements patchInterface
}
}
}

View File

@@ -89,4 +89,3 @@ class patch_370a4 implements patchInterface
return true;
}
}

View File

@@ -83,4 +83,3 @@ class patch_370a5 implements patchInterface
return true;
}
}

View File

@@ -196,4 +196,3 @@ class patch_370a6 implements patchInterface
$root->set_subdef($groupname, $baseSubdef->get_name() . '_OGG', $baseSubdef->get_class(), false, $newSubdefOptionsOgg);
}
}

View File

@@ -70,6 +70,7 @@ class patch_370a7 implements patchInterface
if ($e->getCode() == '42S02') {
}
return;
}
@@ -148,7 +149,6 @@ class patch_370a7 implements patchInterface
$app['EM']->close();
}
$stmt->closeCursor();
return;
@@ -160,4 +160,3 @@ class patch_370a7 implements patchInterface
$query->execute();
}
}

View File

@@ -262,4 +262,3 @@ class patch_370a8 implements patchInterface
return true;
}
}

View File

@@ -142,4 +142,3 @@ class patch_370a9 implements patchInterface
$app['phraseanet.configuration']->setConfigurations($configs);
}
}

View File

@@ -10,7 +10,6 @@
*/
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Border\Checker;
/**
*
@@ -64,4 +63,3 @@ class patch_371 implements patchInterface
}
}
}

View File

@@ -131,4 +131,3 @@ class patch_373 implements patchInterface
return true;
}
}

View File

@@ -10,7 +10,6 @@
*/
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Border\Checker;
/**
*
@@ -68,4 +67,3 @@ class patch_380 implements patchInterface
$app['phraseanet.configuration']->setConnexions($connexions);
}
}

View File

@@ -10,7 +10,6 @@
*/
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Border\Checker;
/**
*
@@ -73,4 +72,3 @@ class patch_3802 implements patchInterface
return;
}
}

View File

@@ -116,4 +116,3 @@ class patch_3803 implements patchInterface
}
}

View File

@@ -81,4 +81,3 @@ class patch_3804 implements patchInterface
return false;
}
}

View File

@@ -13,10 +13,7 @@ use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\SearchEngine\SearchEngineInterface;
use Doctrine\ORM\EntityManager;
use MediaVorus\Media\MediaInterface;
use Monolog\Logger;
use MediaAlchemyst\Alchemyst;
use MediaVorus\MediaVorus;
use Symfony\Component\Filesystem\Filesystem;
/**
*

View File

@@ -41,7 +41,6 @@ class recordutils
public function binary_datas($type, $bas, $rec, $usr = false, $ses = false)
{
return false;
}
}

View File

@@ -157,4 +157,3 @@ class set_selection extends set_abstract
return $ret;
}
}

View File

@@ -29,4 +29,3 @@ class system_url
return $this->url;
}
}

View File

@@ -1,6 +1,5 @@
<?php
use Alchemy\Phrasea\Application;
use Monolog\Logger;
abstract class task_abstract
@@ -303,8 +302,7 @@ abstract class task_abstract
$dom = new DOMDocument('1.0', 'UTF-8');
$dom->preserveWhiteSpace = false;
$dom->formatOutput = true;
if(!@$dom->loadXML($settings))
{
if (!@$dom->loadXML($settings)) {
throw new Exception_InvalidArgument('Bad XML');
}

View File

@@ -174,4 +174,3 @@ abstract class task_databoxAbstract extends task_abstract
return $ret;
}
}

View File

@@ -152,8 +152,7 @@ class task_period_RecordMover extends task_appboxAbstract
{
$("#sqlu").text("");
$("#sqls").text("");
if(xml)
{
if (xml) {
xml2 = $.parseXML(xml);
xml2 = $(xml2);
@@ -258,8 +257,7 @@ class task_period_RecordMover extends task_appboxAbstract
} ;
$(".formElem").change(function(){
fieldname = $(this).attr("name");
switch((this.nodeName+$(this).attr("type")).toLowerCase())
{
switch ((this.nodeName+$(this).attr("type")).toLowerCase()) {
case "inputtext":
if (typeof(limits[fieldname])!='undefined') {
var v = 0|this.value;
@@ -301,6 +299,7 @@ class task_period_RecordMover extends task_appboxAbstract
<div class="terminal" id="sqla"></div>
</center>
<?php
return ob_get_clean();
}
/**

View File

@@ -146,8 +146,7 @@ class task_period_archive extends task_abstract
<script type="text/javascript">
function taskFillGraphic_<?php echo(get_class($this));?>(xml)
{
if(xml)
{
if (xml) {
xml2 = $.parseXML(xml);
xml2 = $(xml2);
@@ -182,8 +181,7 @@ class task_period_archive extends task_abstract
} ;
$(".formElem").change(function(){
fieldname = $(this).attr("name");
switch((this.nodeName+$(this).attr("type")).toLowerCase())
{
switch ((this.nodeName+$(this).attr("type")).toLowerCase()) {
case "inputtext":
if (typeof(limits[fieldname])!='undefined') {
var v = 0|this.value;
@@ -201,6 +199,7 @@ class task_period_archive extends task_abstract
</script>
<?php
return;
}
@@ -245,6 +244,7 @@ class task_period_archive extends task_abstract
<input class="formElem" type="checkbox" name="delfolder">&nbsp;<?php echo _('task::archive:supprimer les repertoires apres archivage') ?><br/>
</form>
<?php
return ob_get_clean();
}
@@ -602,10 +602,8 @@ class task_period_archive extends task_abstract
// something happened : a least one file has moved
return 'MAXRECSDONE';
} elseif (memory_get_usage() >> 20 > 25) {
return 'MAXMEGSREACHED';
} else {
return 'NORECSTODO';
}
}

View File

@@ -176,13 +176,13 @@ class task_period_cindexer extends task_abstract
function taskFillGraphic_<?php echo(get_class($this));?>(xml)
{
if(xml)
{
if (xml) {
xml = $.parseXML(xml);
xml = $(xml);
var isyes = function(v) {
v = v.toUpperCase().trim();
return v=='O' || v=='Y' || v=='OUI' || v=='YES' || v=='1';
}
@@ -247,6 +247,7 @@ class task_period_cindexer extends task_abstract
</script>
<?php
return;
}
@@ -296,7 +297,6 @@ class task_period_cindexer extends task_abstract
<input type="checkbox" name="nolog">&nbsp;<?php echo _('task::cindexer:do not (sys)log, but out to console)') ?>
<br/>
<?php echo _('task::cindexer:windows specific') ?>&nbsp;:<br/>
<input type="checkbox" name="winsvc_run">&nbsp;<?php echo _('task::cindexer:run as application, not as service') ?>
</form>
@@ -305,6 +305,7 @@ class task_period_cindexer extends task_abstract
<div style="margin:10px; padding:5px; border:1px #000000 solid; font-family:monospace; font-size:14px; text-align:left; color:#00e000; background-color:#404040" id="cmd">cmd</div>
</center>
<?php
return ob_get_clean();
}

View File

@@ -91,8 +91,7 @@ class task_period_ftp extends task_appboxAbstract
<script type="text/javascript">
function taskFillGraphic_<?php echo(get_class($this));?>(xml)
{
if(xml)
{
if (xml) {
xml = $.parseXML(xml);
xml = $(xml);
@@ -111,8 +110,7 @@ class task_period_ftp extends task_appboxAbstract
} ;
$(".formElem").change(function(){
fieldname = $(this).attr("name");
switch((this.nodeName+$(this).attr("type")).toLowerCase())
{
switch ((this.nodeName+$(this).attr("type")).toLowerCase()) {
case "inputtext":
if (typeof(limits[fieldname])!='undefined') {
var v = 0|this.value;
@@ -129,6 +127,7 @@ class task_period_ftp extends task_appboxAbstract
});
</script>
<?php
return;
}
@@ -153,6 +152,7 @@ class task_period_ftp extends task_appboxAbstract
&nbsp;<?php echo _('task::_common_:secondes (unite temporelle)') ?><br/>
</form>
<?php
return ob_get_clean();
}
@@ -696,4 +696,3 @@ class task_period_ftp extends task_appboxAbstract
return $this;
}
}

View File

@@ -109,8 +109,7 @@ class task_period_ftpPull extends task_appboxAbstract
function taskFillGraphic_<?php echo(get_class($this));?>(xml)
{
if(xml)
{
if (xml) {
xml = $.parseXML(xml);
xml = $(xml);
@@ -137,8 +136,7 @@ class task_period_ftpPull extends task_appboxAbstract
} ;
$(".formElem").change(function(){
fieldname = $(this).attr("name");
switch((this.nodeName+$(this).attr("type")).toLowerCase())
{
switch ((this.nodeName+$(this).attr("type")).toLowerCase()) {
case "inputtext":
if (typeof(limits[fieldname])!='undefined') {
var v = 0|this.value;
@@ -203,6 +201,7 @@ class task_period_ftpPull extends task_appboxAbstract
&nbsp;<?php echo('task::_common_:minutes (unite temporelle)') ?><br/>
</form>
<?php
return ob_get_clean();
}
@@ -297,11 +296,9 @@ class task_period_ftpPull extends task_appboxAbstract
return true;
} catch (Exception $e) {
return false;
}
} else {
return true;
}
}
@@ -424,4 +421,3 @@ class task_period_ftpPull extends task_appboxAbstract
}
}

View File

@@ -138,6 +138,7 @@ class task_period_subdef extends task_databoxAbstract
</script>
<?php
return("");
} else {
return("BAD XML");
@@ -155,8 +156,7 @@ class task_period_subdef extends task_databoxAbstract
<script type="text/javascript">
function taskFillGraphic_<?php echo(get_class($this));?>(xml)
{
if(xml)
{
if (xml) {
xml = $.parseXML(xml);
xml = $(xml);
@@ -179,8 +179,7 @@ class task_period_subdef extends task_databoxAbstract
} ;
$(".formElem").change(function(){
fieldname = $(this).attr("name");
switch((this.nodeName+$(this).attr("type")).toLowerCase())
{
switch ((this.nodeName+$(this).attr("type")).toLowerCase()) {
case "inputtext":
if (typeof(limits[fieldname])!='undefined') {
var v = 0|this.value;
@@ -225,6 +224,7 @@ class task_period_subdef extends task_databoxAbstract
<br/>
</form>
<?php
return ob_get_clean();
}
@@ -318,4 +318,3 @@ class task_period_subdef extends task_databoxAbstract
return $this;
}
}

View File

@@ -123,8 +123,7 @@ class task_period_writemeta extends task_databoxAbstract
<script type="text/javascript">
function taskFillGraphic_<?php echo(get_class($this));?>(xml)
{
if(xml)
{
if (xml) {
xml = $.parseXML(xml);
xml = $(xml);
@@ -146,8 +145,7 @@ class task_period_writemeta extends task_databoxAbstract
} ;
$(".formElem").change(function(){
fieldname = $(this).attr("name");
switch((this.nodeName+$(this).attr("type")).toLowerCase())
{
switch ((this.nodeName+$(this).attr("type")).toLowerCase()) {
case "inputtext":
if (typeof(limits[fieldname])!='undefined') {
var v = 0|this.value;
@@ -331,4 +329,3 @@ class task_period_writemeta extends task_databoxAbstract
return $this;
}
}

View File

@@ -41,4 +41,3 @@ class thesaurus_xpath extends DOMXPath
return(self::$r[$context_path]);
}
}