mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-09 19:13:26 +00:00
Switch PHPMailer, MoovRelocator, Zend Gdata, TCPDF, Oauth2, PhlickR, PHPShortener from git submodules to Composer
This commit is contained in:
@@ -29,8 +29,47 @@
|
||||
"symfony/serializer": "2.1.*",
|
||||
"symfony/validator": "2.1.*",
|
||||
"symfony/yaml": "2.1.*",
|
||||
"silex/silex": "1.0.*"
|
||||
"phpexiftool/phpexiftool": "dev-master",
|
||||
"mediavorus/mediavorus": "dev-master",
|
||||
"silex/silex": "1.0.*",
|
||||
"alchemy/oauth2php": "master",
|
||||
"alchemy/tcpdf": "master",
|
||||
"alchemy/phlickr": "master",
|
||||
"alchemy/phpshortener": "master",
|
||||
"alchemy/phpmailer": "master",
|
||||
"alchemy/moovrelocator": "master",
|
||||
"alchemy/gdata": "master"
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/alchemy-fr/tcpdf"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/alchemy-fr/oauth2-php"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/alchemy-fr/Phlickr"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/alchemy-fr/PHPShortener"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/alchemy-fr/PHPMailer_v5.1"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/alchemy-fr/MoovRelocator"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/alchemy-fr/gdata"
|
||||
}
|
||||
],
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Alchemy": "lib"
|
||||
|
@@ -11,11 +11,8 @@
|
||||
|
||||
namespace Alchemy\Phrasea\Application;
|
||||
|
||||
require_once __DIR__ . "/../../../../lib/classes/API/OAuth2/Autoloader.class.php";
|
||||
require_once __DIR__ . "/../../../../lib/bootstrap.php";
|
||||
|
||||
\API_OAuth2_Autoloader::register();
|
||||
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\Exception;
|
||||
|
@@ -12,9 +12,6 @@
|
||||
namespace Alchemy\Phrasea\Application;
|
||||
|
||||
require_once __DIR__ . "/../../../../lib/bootstrap.php";
|
||||
require_once __DIR__ . "/../../../../lib/classes/API/OAuth2/Autoloader.class.php";
|
||||
|
||||
\API_OAuth2_Autoloader::register();
|
||||
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
|
||||
|
@@ -428,12 +428,10 @@ class Core extends \Pimple
|
||||
$loader = new Loader\Autoloader();
|
||||
}
|
||||
|
||||
|
||||
$getComposerNamespaces = function()
|
||||
{
|
||||
return require realpath(__DIR__ . '/../../../vendor/.composer/autoload_namespaces.php');
|
||||
};
|
||||
|
||||
|
||||
foreach ($getComposerNamespaces() as $prefix => $path)
|
||||
{
|
||||
|
@@ -23,11 +23,13 @@ use Symfony\Component\ClassLoader\UniversalClassLoader;
|
||||
*/
|
||||
class Autoloader extends UniversalClassLoader
|
||||
{
|
||||
|
||||
/**
|
||||
* An array of path to check
|
||||
* @var type
|
||||
*/
|
||||
private $paths = array();
|
||||
private $classmap = array();
|
||||
|
||||
/**
|
||||
* Construct a new phrasea Autoloader
|
||||
@@ -40,6 +42,13 @@ class Autoloader extends UniversalClassLoader
|
||||
{
|
||||
$this->paths['config'] = __DIR__ . '/../../../../config/classes/';
|
||||
$this->paths['library'] = __DIR__ . '/../../../classes/';
|
||||
|
||||
$getComposerClassMap = function()
|
||||
{
|
||||
return require realpath(__DIR__ . '/../../../../vendor/.composer/autoload_classmap.php');
|
||||
};
|
||||
|
||||
$this->classmap = $getComposerClassMap();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -71,13 +80,20 @@ class Autoloader extends UniversalClassLoader
|
||||
* @param string $class
|
||||
* @return mixed string|null
|
||||
*/
|
||||
private function checkFile($class)
|
||||
private function checkFile($classname)
|
||||
{
|
||||
foreach($this->paths as $path)
|
||||
if (isset($this->classmap[$classname]))
|
||||
{
|
||||
$file = $path. str_replace('_', '/', $class) . '.class.php';
|
||||
return $this->classmap[$classname];
|
||||
}
|
||||
|
||||
$normalized_classname = str_replace('_', '/', $classname);
|
||||
|
||||
if(file_exists($file))
|
||||
foreach ($this->paths as $path)
|
||||
{
|
||||
$file = $path . $normalized_classname . '.class.php';
|
||||
|
||||
if (file_exists($file))
|
||||
{
|
||||
return $file;
|
||||
}
|
||||
@@ -92,4 +108,5 @@ class Autoloader extends UniversalClassLoader
|
||||
{
|
||||
return $this->paths;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -13,8 +13,6 @@ namespace Alchemy\Phrasea\Out\Module;
|
||||
|
||||
use \Alchemy\Phrasea\Out\Tool\PhraseaPDF;
|
||||
|
||||
require_once __DIR__ . '/../../../../vendor/tcpdf/tcpdf.php';
|
||||
|
||||
/**
|
||||
* Creates a PDF
|
||||
*
|
||||
|
@@ -235,4 +235,4 @@ class Basket extends \Entities\Basket implements \Doctrine\ORM\Proxy\Proxy
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@@ -9,8 +9,6 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/../../../vendor/oauth2/lib/OAuth2.inc';
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . "/../../../../lib/vendor/oauth2/lib/OAuth2.inc";
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
|
@@ -9,13 +9,6 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
$include_path = realpath(__DIR__ . '/../../../../vendor/');
|
||||
if(strpos(get_include_path(), $include_path) === false)
|
||||
{
|
||||
$new_include_path = $include_path . PATH_SEPARATOR . get_include_path();
|
||||
set_include_path($new_include_path);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @package Bridge
|
||||
|
@@ -9,19 +9,8 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
$include_path = realpath(__DIR__ . '/../../../vendor');
|
||||
if (strpos(get_include_path(), $include_path . ':') === false)
|
||||
{
|
||||
$new_include_path = $include_path . PATH_SEPARATOR . get_include_path();
|
||||
set_include_path($new_include_path);
|
||||
}
|
||||
|
||||
use \Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
require_once __DIR__ . "/../../../vendor/Phlickr/Api.php";
|
||||
require_once __DIR__ . "/../../../vendor/Phlickr/Uploader.php";
|
||||
|
||||
/**
|
||||
*
|
||||
* @package Bridge
|
||||
|
@@ -9,19 +9,6 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
$include_path = realpath(__DIR__ . '/../../../vendor/gdata/');
|
||||
if(strpos(get_include_path(), $include_path) === false)
|
||||
{
|
||||
$new_include_path = $include_path . PATH_SEPARATOR . get_include_path();
|
||||
set_include_path($new_include_path);
|
||||
}
|
||||
|
||||
require_once('Zend/Loader.php');
|
||||
Zend_Loader::loadClass('Zend_Gdata_YouTube');
|
||||
Zend_Loader::loadClass('Zend_Gdata_HttpClient');
|
||||
Zend_Loader::loadClass('Zend_Gdata_Query');
|
||||
Zend_Loader::loadClass('Zend_Gdata_App_MediaFileSource');
|
||||
|
||||
use \Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../../../../vendor/moov/relocator.class.php';
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
|
@@ -188,9 +188,6 @@ class mail
|
||||
|
||||
public static function validateEmail($email)
|
||||
{
|
||||
$registry = registry::get_instance();
|
||||
require_once($registry->get('GV_RootPath') . 'lib/vendor/PHPMailer_v5.1/class.phpmailer.php');
|
||||
|
||||
return PHPMailer::ValidateAddress($email);
|
||||
}
|
||||
|
||||
@@ -198,7 +195,6 @@ class mail
|
||||
{
|
||||
|
||||
$registry = registry::get_instance();
|
||||
require_once($registry->get('GV_RootPath') . 'lib/vendor/PHPMailer_v5.1/class.phpmailer.php');
|
||||
|
||||
if (!isset($to['email']) || !PHPMailer::ValidateAddress($to['email']))
|
||||
|
||||
|
@@ -4,8 +4,6 @@ require_once __DIR__ . '/../../../PhraseanetWebTestCaseAbstract.class.inc';
|
||||
|
||||
require_once __DIR__ . '/../../../../Alchemy/Phrasea/Application/Api.php';
|
||||
|
||||
API_OAuth2_Autoloader::register();
|
||||
|
||||
use Silex\WebTestCase;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
|
@@ -4,8 +4,6 @@ require_once __DIR__ . '/../../../PhraseanetWebTestCaseAbstract.class.inc';
|
||||
|
||||
require_once __DIR__ . '/../../../../Alchemy/Phrasea/Application/Api.php';
|
||||
|
||||
API_OAuth2_Autoloader::register();
|
||||
|
||||
use Silex\WebTestCase;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
|
@@ -4,8 +4,6 @@ require_once __DIR__ . '/../../../PhraseanetWebTestCaseAuthenticatedAbstract.cla
|
||||
|
||||
require_once __DIR__ . '/../../../../Alchemy/Phrasea/Application/OAuth2.php';
|
||||
|
||||
API_OAuth2_Autoloader::register();
|
||||
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Silex\WebTestCase;
|
||||
|
||||
|
@@ -3,25 +3,6 @@
|
||||
require_once __DIR__ . '/../../../PhraseanetPHPUnitAuthenticatedAbstract.class.inc';
|
||||
require_once __DIR__ . '/../../Bridge_datas.inc';
|
||||
|
||||
$include_path = realpath(__DIR__ . '/../../../../vendor/gdata/');
|
||||
if(strpos(get_include_path(), $include_path) === false)
|
||||
{
|
||||
$new_include_path = $include_path . PATH_SEPARATOR . get_include_path();
|
||||
set_include_path($new_include_path);
|
||||
}
|
||||
|
||||
require_once('Zend/Loader.php');
|
||||
Zend_Loader::loadClass('Zend_Gdata_YouTube');
|
||||
Zend_Loader::loadClass('Zend_Gdata_YouTube_VideoEntry');
|
||||
Zend_Loader::loadClass('Zend_Gdata_YouTube_Extension_MediaGroup');
|
||||
Zend_Loader::loadClass('Zend_Gdata_YouTube_Extension_Statistics');
|
||||
Zend_Loader::loadClass('Zend_Gdata_Media_Extension_MediaPlayer');
|
||||
Zend_Loader::loadClass('Zend_Gdata_YouTube_Extension_Duration');
|
||||
Zend_Loader::loadClass('Zend_Gdata_Extension_Rating');
|
||||
Zend_Loader::loadClass('Zend_Gdata_App_Extension_Published');
|
||||
Zend_Loader::loadClass('Zend_Gdata_App_Extension_Updated');
|
||||
Zend_Loader::loadClass('Zend_Gdata_App_Extension_Id');
|
||||
|
||||
/**
|
||||
* Test class for Bridge_Api_Youtube_Element.
|
||||
* Generated by PHPUnit on 2011-10-12 at 18:35:49.
|
||||
|
@@ -1,15 +1,5 @@
|
||||
<?php
|
||||
|
||||
|
||||
$include_path = realpath(__DIR__ . '/../../vendor/');
|
||||
if(strpos(get_include_path(), $include_path) === false)
|
||||
{
|
||||
$new_include_path = $include_path . PATH_SEPARATOR . get_include_path();
|
||||
set_include_path($new_include_path);
|
||||
}
|
||||
|
||||
require_once __DIR__ . "/../../vendor/Phlickr/Api.php";
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . "/../../../../lib/vendor/oauth2/lib/OAuth2.inc";
|
||||
require_once __DIR__ . '/../../PhraseanetPHPUnitAuthenticatedAbstract.class.inc';
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
@@ -193,7 +193,6 @@ if (!is_null($templates) || !is_null($parm['deny']) || !is_null($parm['accept'])
|
||||
if ($row)
|
||||
{
|
||||
|
||||
require_once(__DIR__ . '/../../lib/vendor/PHPMailer_v5.1/class.phpmailer.php');
|
||||
if (PHPMailer::ValidateAddress($row['usr_mail']))
|
||||
{
|
||||
foreach ($bases as $bas => $isok)
|
||||
|
@@ -17,10 +17,6 @@
|
||||
/* @var $Core \Alchemy\Phrasea\Core */
|
||||
$Core = require_once __DIR__ . "/../../lib/bootstrap.php";
|
||||
|
||||
require_once __DIR__ . "/../../lib/classes/API/OAuth2/Autoloader.class.php";
|
||||
|
||||
API_OAuth2_Autoloader::register();
|
||||
|
||||
$appbox = appbox::get_instance($Core);
|
||||
|
||||
require_once($appbox->get_registry()->get('GV_RootPath') . 'lib/classes/deprecated/inscript.api.php');
|
||||
|
@@ -29,7 +29,6 @@ $needed = array();
|
||||
|
||||
if (isset($parm["mail"]) && trim($parm["mail"]) != "")
|
||||
{
|
||||
require_once(__DIR__ . '/../../lib/vendor/PHPMailer_v5.1/class.phpmailer.php');
|
||||
if (!PHPMailer::ValidateAddress($parm['mail']))
|
||||
{
|
||||
return phrasea::redirect('/login/forgotpwd.php?error=noaccount');
|
||||
|
@@ -43,7 +43,6 @@ if (!$user->get_mail_locked())
|
||||
$user->set_mail_locked(false);
|
||||
random::removeToken($parm['code']);
|
||||
|
||||
require_once(dirname(__FILE__) . '/../../lib/vendor/PHPMailer_v5.1/class.phpmailer.php');
|
||||
if (PHPMailer::ValidateAddress($user->get_email()))
|
||||
{
|
||||
if (count($user->ACL()->get_granted_base()) > 0)
|
||||
@@ -53,7 +52,6 @@ if (PHPMailer::ValidateAddress($user->get_email()))
|
||||
$user->set_mail_locked(false);
|
||||
random::removeToken($parm['code']);
|
||||
|
||||
require_once(__DIR__ . '/../../lib/vendor/PHPMailer_v5.1/class.phpmailer.php');
|
||||
if (PHPMailer::ValidateAddress($user->get_email()))
|
||||
{
|
||||
$appbox_register = new appbox_register($appbox);
|
||||
|
@@ -101,7 +101,6 @@ if ($request->has_post_datas())
|
||||
$needed['form_password'] = _('forms::la valeur donnee contient des caracteres invalides');
|
||||
|
||||
//2 - on verifie que lemail a lair correcte si elle est requise
|
||||
require_once(__DIR__ . '/../../lib/vendor/PHPMailer_v5.1/class.phpmailer.php');
|
||||
if (trim($parm['form_email']) != '' && !PHPMailer::ValidateAddress($parm['form_email']))
|
||||
$needed['form_email'] = _('forms::l\'email semble invalide');
|
||||
|
||||
|
@@ -135,7 +135,6 @@ if (isset($parm['form_password']) && isset($parm['form_email']) && isset($parm['
|
||||
|
||||
if (str_replace(array("\r\n", "\r", "\n", "\t"), '_', trim($parm['form_email'])) == $parm['form_email_confirm'])
|
||||
{
|
||||
require_once(__DIR__ . '/../../lib/vendor/PHPMailer_v5.1/class.phpmailer.php');
|
||||
if (PHPMailer::ValidateAddress($parm['form_email']))
|
||||
{
|
||||
if (mail::reset_email($parm['form_email'], $session->get_usr_id()) === true)
|
||||
|
@@ -20,7 +20,6 @@ $Core = require_once __DIR__ . "/../../lib/bootstrap.php";
|
||||
phrasea::headers();
|
||||
$appbox = appbox::get_instance($Core);
|
||||
$registry = $appbox->get_registry();
|
||||
require($registry->get('GV_RootPath') . "lib/vendor/PHPShortener/phpshortener.class.php");
|
||||
$session = Session_Handler::getInstance($appbox);
|
||||
|
||||
$request = http_request::getInstance();
|
||||
|
Reference in New Issue
Block a user