Maintenance - Mise à jour mensuelle Lundi 6 Avril 2020 entre 7h00 et 9h00

Commit 3a04f8d7 authored by Gerald Salin's avatar Gerald Salin

make nG6 typo3 plugin compatible with typo3 V8

parent 2c1823f6
This diff is collapsed.
......@@ -2,59 +2,59 @@
if (!defined ('TYPO3_MODE')) die ('Access denied.');
## Chmod the smarty cache and template_c directories
exec('chmod 777 '.t3lib_extMgm::extPath('nG6').'res/smarty/cache');
exec('chmod 777 '.t3lib_extMgm::extPath('nG6').'res/smarty/templates_c');
exec('chmod 777 '.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('nG6').'res/smarty/cache');
exec('chmod 777 '.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('nG6').'res/smarty/templates_c');
## Extending TypoScript from static template uid=43 to set up userdefined tag:
t3lib_extMgm::addTypoScript($_EXTKEY,'editorcfg','
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY,'editorcfg','
tt_content.CSS_editor.ch.tx_nG6_pi1 = < plugin.tx_nG6_pi1.CSS_editor
',43);
t3lib_extMgm::addPItoST43($_EXTKEY,'pi1/class.tx_nG6_pi1.php','_pi1','list_type',1);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY,'pi1/class.tx_nG6_pi1.php','_pi1','list_type',1);
## Extending TypoScript from static template uid=43 to set up userdefined tag:
t3lib_extMgm::addTypoScript($_EXTKEY,'editorcfg','
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY,'editorcfg','
tt_content.CSS_editor.ch.tx_nG6_pi2 = < plugin.tx_nG6_pi2.CSS_editor
',43);
t3lib_extMgm::addPItoST43($_EXTKEY,'pi2/class.tx_nG6_pi2.php','_pi2','list_type',1);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY,'pi2/class.tx_nG6_pi2.php','_pi2','list_type',1);
## Extending TypoScript from static template uid=43 to set up userdefined tag:
t3lib_extMgm::addTypoScript($_EXTKEY,'editorcfg','
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY,'editorcfg','
tt_content.CSS_editor.ch.tx_nG6_pi3 = < plugin.tx_nG6_pi3.CSS_editor
',43);
t3lib_extMgm::addPItoST43($_EXTKEY,'pi3/class.tx_nG6_pi3.php','_pi3','list_type',1);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY,'pi3/class.tx_nG6_pi3.php','_pi3','list_type',1);
## Extending TypoScript from static template uid=43 to set up userdefined tag:
t3lib_extMgm::addTypoScript($_EXTKEY,'editorcfg','
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY,'editorcfg','
tt_content.CSS_editor.ch.tx_nG6_pi4 = < plugin.tx_nG6_pi4.CSS_editor
',43);
t3lib_extMgm::addPItoST43($_EXTKEY,'pi4/class.tx_nG6_pi4.php','_pi4','list_type',1);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY,'pi4/class.tx_nG6_pi4.php','_pi4','list_type',1);
## Extending TypoScript from static template uid=43 to set up userdefined tag:
t3lib_extMgm::addTypoScript($_EXTKEY,'editorcfg','
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY,'editorcfg','
tt_content.CSS_editor.ch.tx_nG6_pi5 = < plugin.tx_nG6_pi5.CSS_editor
',43);
t3lib_extMgm::addPItoST43($_EXTKEY,'pi5/class.tx_nG6_pi5.php','_pi5','list_type',1);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY,'pi5/class.tx_nG6_pi5.php','_pi5','list_type',1);
## Extending TypoScript from static template uid=43 to set up userdefined tag:
t3lib_extMgm::addTypoScript($_EXTKEY,'editorcfg','
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY,'editorcfg','
tt_content.CSS_editor.ch.tx_nG6_pi6 = < plugin.tx_nG6_pi6.CSS_editor
',43);
t3lib_extMgm::addPItoST43($_EXTKEY,'pi6/class.tx_nG6_pi6.php','_pi6','list_type',1);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY,'pi6/class.tx_nG6_pi6.php','_pi6','list_type',1);
## Added to do some ajax
$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_nG6'] = 'EXT:nG6/class.tx_nG6_eid.php';
?>
\ No newline at end of file
?>
This diff is collapsed.
This diff is collapsed.
......@@ -22,8 +22,7 @@
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
require_once(PATH_tslib.'class.tslib_pibase.php');
require_once(t3lib_extMgm::extPath('nG6').'/lib/class.tx_nG6_db.php');
require_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('nG6').'/lib/class.tx_nG6_db.php');
/**
* Class_nG6_db' for the 'nG6' extension.
......@@ -44,7 +43,7 @@ class tx_nG6_upgrade {
tx_nG6_upgrade::upgrade_1_2();
return "Upgrade successfuly ended to version 1.2!";
} else if($version == '2.0'){
tx_nG6_upgrade::upgrade_2_0($data_storage);
tx_nG6_upgrade::upgrade_2_0($data_storage);
return "Upgrade successfuly ended to version 2.0!";
} else {
return "Upgrading to version " . $version . " not suported!";
......@@ -52,14 +51,14 @@ class tx_nG6_upgrade {
}
/*
* version 2.0
/*
* version 2.0
*------------------------------------------------------------*/
/**
* Main function to upgrade to version 2.0.
*/
function upgrade_2_0($data_storage){
/**
* Main function to upgrade to version 2.0.
*/
function upgrade_2_0($data_storage){
// Update cruser_id of tx_nG6_project
$queryUpdateCruseridProject = "
UPDATE tx_nG6_project p
......@@ -114,16 +113,16 @@ class tx_nG6_upgrade {
ADD is_editable boolean NOT NULL DEFAULT FALSE AFTER params
";
// Alter tx_nG6_analyze and add storage_size
$queryAlterTxNG6AnalayzeSsize = "
ALTER TABLE tx_nG6_analyze
ADD storage_size bigint(20) NOT NULL DEFAULT '0' AFTER is_editable
// Alter tx_nG6_analyze and add storage_size
$queryAlterTxNG6AnalayzeSsize = "
ALTER TABLE tx_nG6_analyze
ADD storage_size bigint(20) NOT NULL DEFAULT '0' AFTER is_editable
";
// Alter tx_nG6_run and add storage_size
$queryAlterTxNG6Run = "
ALTER TABLE tx_nG6_run
ADD storage_size bigint(20) NOT NULL DEFAULT '0' AFTER sequencer
// Alter tx_nG6_run and add storage_size
$queryAlterTxNG6Run = "
ALTER TABLE tx_nG6_run
ADD storage_size bigint(20) NOT NULL DEFAULT '0' AFTER sequencer
";
/*
......@@ -150,47 +149,47 @@ class tx_nG6_upgrade {
function set_storage_size($data_storage) {
// update run storage size
$queryParts = array(
'SELECT' => 'tx_nG6_run.uid as uid, tx_nG6_run.directory as directory',
'FROM' => 'tx_nG6_run ',
'WHERE' => "",
'GROUPBY' => '',
'ORDERBY' => '',
'LIMIT' => ''
$queryParts = array(
'SELECT' => 'tx_nG6_run.uid as uid, tx_nG6_run.directory as directory',
'FROM' => 'tx_nG6_run ',
'WHERE' => "",
'GROUPBY' => '',
'ORDERBY' => '',
'LIMIT' => ''
);
$res = $GLOBALS['TYPO3_DB']->exec_SELECT_queryArray($queryParts);
$current_size = 0;
$current_size = 0;
while($res_row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$current_size = tx_nG6_upgrade::get_directory_size($data_storage.$res_row['directory']);
$GLOBALS['TYPO3_DB']-> exec_UPDATEquery('tx_nG6_run', 'uid='.$res_row['uid'], array('storage_size' => strval($current_size)));
}
// update analysis storage size
$queryParts = array(
'SELECT' => 'tx_nG6_analyze.uid as uid, tx_nG6_analyze.directory as directory',
'FROM' => 'tx_nG6_analyze ',
'WHERE' => "",
'GROUPBY' => '',
'ORDERBY' => '',
'LIMIT' => ''
);
$res = $GLOBALS['TYPO3_DB']->exec_SELECT_queryArray($queryParts);
$current_size = 0;
while($res_row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$current_size = tx_nG6_upgrade::get_directory_size($data_storage.$res_row['directory']);
$GLOBALS['TYPO3_DB']-> exec_UPDATEquery('tx_nG6_analyze', 'uid='.$res_row['uid'], array('storage_size' => strval($current_size)));
$queryParts = array(
'SELECT' => 'tx_nG6_analyze.uid as uid, tx_nG6_analyze.directory as directory',
'FROM' => 'tx_nG6_analyze ',
'WHERE' => "",
'GROUPBY' => '',
'ORDERBY' => '',
'LIMIT' => ''
);
$res = $GLOBALS['TYPO3_DB']->exec_SELECT_queryArray($queryParts);
$current_size = 0;
while($res_row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$current_size = tx_nG6_upgrade::get_directory_size($data_storage.$res_row['directory']);
$GLOBALS['TYPO3_DB']-> exec_UPDATEquery('tx_nG6_analyze', 'uid='.$res_row['uid'], array('storage_size' => strval($current_size)));
}
}
function get_directory_size($data_folder) {
$full_size = 0;
foreach(scandir($data_folder) as $file) {
if (is_file($data_folder."/".$file)) {
$full_size += filesize($data_folder."/".$file);
}
}
return $full_size;
function get_directory_size($data_folder) {
$full_size = 0;
foreach(scandir($data_folder) as $file) {
if (is_file($data_folder."/".$file)) {
$full_size += filesize($data_folder."/".$file);
}
}
return $full_size;
}
function add_comment_support(){
......@@ -308,8 +307,8 @@ class tx_nG6_upgrade {
$GLOBALS['TYPO3_DB']->sql_query($queryAlterTxNG6SampleAddColumns);
}
/*
* version 1.2
/*
* version 1.2
*------------------------------------------------------------*/
/**
......@@ -424,7 +423,7 @@ class tx_nG6_upgrade {
$i = 0;
while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
if (in_array($group, t3lib_div::intExplode(',',$row['subgroup']))) {
if (in_array($group, \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',',$row['subgroup']))) {
$reslist[$i] = $row['uid'];
$i++;
}
......
......@@ -27,10 +27,7 @@
* @author PF bioinformatique de Toulouse <>
*/
require_once(PATH_t3lib.'class.t3lib_div.php');
require_once(t3lib_extMgm::extPath('saltedpasswords').'/classes/salts/class.tx_saltedpasswords_salts_factory.php');
set_include_path(get_include_path() . '/phpseclib');
include('Net/SSH2.php');
//require_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('saltedpasswords').'/classes/salts/class.tx_saltedpasswords_salts_factory.php');
class tx_nG6_utils {
......@@ -41,7 +38,7 @@ class tx_nG6_utils {
* @param Array $analyzes_map analyze array (for example, result of tx_nG6_db::get_project_analysis(...))
* @return a tree describing the links children-parents of all analyzes
*/
function trace_hierarchy($analyzes_map) {
static function trace_hierarchy($analyzes_map) {
$base_tree = array();
foreach(array_values($analyzes_map) as $id => $analyze) {
......@@ -70,7 +67,7 @@ class tx_nG6_utils {
* @param $sub : the substring that may ends $str
* @return boolean
*/
function ends_with($str, $sub) {
static function ends_with($str, $sub) {
return ( substr( $str, strlen( $str ) - strlen( $sub ) ) == $sub );
}
......@@ -80,7 +77,7 @@ class tx_nG6_utils {
* @param $size : the random key size
* @return string
*/
function create_random_key($size) {
static function create_random_key($size) {
$keyset = "abcdefghijklmABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$randkey = "";
for ($i=0; $i<$size; $i++)
......@@ -96,7 +93,7 @@ class tx_nG6_utils {
* @param string $directory
* @return 0=>everything ok, 1=>user right problem, 2=>wrong authentification, 3=>connection error
*/
function delete_directory($user_login, $user_pwd, $directory) {
static function delete_directory($user_login, $user_pwd, $directory) {
// First try to connect the specified user using ssh
$connection = ssh2_connect('127.0.0.1', 22);
if (!$connection) return 3;
......@@ -121,7 +118,7 @@ class tx_nG6_utils {
* @return 0=>everything ok, 1=>user right problem, 2=>wrong authentification, 3=>connection error
*/
function purge_directory($user_login, $user_pwd, $directory) {
static function purge_directory($user_login, $user_pwd, $directory) {
if ($directory != 'undefined' && $directory != '') {
// And process the directories structure, remove all files except .html ans .png
......@@ -162,7 +159,7 @@ class tx_nG6_utils {
*
* @param string $size
*/
function get_octet_string_representation($size) {
static function get_octet_string_representation($size) {
$octets_link = array("Bytes", "kB", "MB", "GB", "TB", "PB", "EB", "ZB");
$p = (int)(ceil((float)(strlen(strval($size)))/(float)(3) - (float)(1)));
$pow_needed = $p * 10;
......@@ -174,7 +171,7 @@ class tx_nG6_utils {
return $value;
}
function get_purge_mail($project_name, $project_id, $nb_run_purgeable,$nb_analyse_purgeable, $demand_id,
static function get_purge_mail($project_name, $project_id, $nb_run_purgeable,$nb_analyse_purgeable, $demand_id,
$purgeable_size, $project_size, $purge_delay, $url_price, $min_extention_duration,
$min_extention_size, $emails, $runs_list, $analyse_list) {
......@@ -226,11 +223,11 @@ Files impacted of:
* @param string $password
* @return hashed password
*/
function hash_password($password){
static function hash_password($password){
return tx_saltedpasswords_salts_factory::getSaltingInstance()->getHashedPassword($password);
}
function get_ssh_connection($user_login, $user_pwd){
static function get_ssh_connection($user_login, $user_pwd){
$connection = ssh2_connect('127.0.0.1', 22);
if (!$connection) return NULL;
......
This diff is collapsed.
......@@ -43,7 +43,7 @@ class tx_nG6_pi1_wizicon {
$LL = $this->includeLocalLang();
$wizardItems['plugins_tx_nG6_pi1'] = array(
'icon'=>t3lib_extMgm::extRelPath('nG6').'pi1/ce_wiz.gif',
'icon'=>\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('nG6').'pi1/ce_wiz.gif',
'title'=>$LANG->getLLL('pi1_title',$LL),
'description'=>$LANG->getLLL('pi1_plus_wiz_description',$LL),
'params'=>'&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=nG6_pi1'
......
......@@ -28,9 +28,7 @@
*/
require_once(PATH_tslib.'class.tslib_pibase.php');
class tx_nG6_pi2 extends tslib_pibase {
class tx_nG6_pi2 extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
var $prefixId = 'tx_nG6_pi2'; // Same as class name
var $scriptRelPath = 'pi2/class.tx_nG6_pi2.php'; // Path to this script relative to the extension dir.
var $extKey = 'nG6'; // The extension key.
......
......@@ -43,7 +43,7 @@ class tx_nG6_pi2_wizicon {
$LL = $this->includeLocalLang();
$wizardItems['plugins_tx_nG6_pi2'] = array(
'icon'=>t3lib_extMgm::extRelPath('nG6').'pi2/ce_wiz.gif',
'icon'=>\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('nG6').'pi2/ce_wiz.gif',
'title'=>$LANG->getLLL('pi2_title',$LL),
'description'=>$LANG->getLLL('pi2_plus_wiz_description',$LL),
'params'=>'&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=nG6_pi2'
......
......@@ -28,10 +28,9 @@
*/
require_once(PATH_tslib.'class.tslib_pibase.php');
require_once(t3lib_extMgm::extPath('nG6').'/lib/class.tx_nG6_db.php');
require_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('nG6').'/lib/class.tx_nG6_db.php');
class tx_nG6_pi3 extends tslib_pibase {
class tx_nG6_pi3 extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
var $prefixId = 'tx_nG6_pi3'; // Same as class name
var $scriptRelPath = 'pi3/class.tx_nG6_pi3.php'; // Path to this script relative to the extension dir.
var $extKey = 'nG6'; // The extension key.
......
......@@ -43,7 +43,7 @@ class tx_nG6_pi3_wizicon {
$LL = $this->includeLocalLang();
$wizardItems['plugins_tx_nG6_pi3'] = array(
'icon'=>t3lib_extMgm::extRelPath('nG6').'pi3/ce_wiz.gif',
'icon'=>\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('nG6').'pi3/ce_wiz.gif',
'title'=>$LANG->getLLL('pi3_title',$LL),
'description'=>$LANG->getLLL('pi3_plus_wiz_description',$LL),
'params'=>'&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=nG6_pi3'
......
......@@ -27,11 +27,10 @@
* @author PF bioinformatique de Toulouse <>
*/
require_once(PATH_tslib.'class.tslib_pibase.php');
require_once(t3lib_extMgm::extPath('nG6').'/lib/class.tx_nG6_utils.php');
require_once(t3lib_extMgm::extPath('nG6').'/lib/class.tx_nG6_db.php');
require_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('nG6').'/lib/class.tx_nG6_utils.php');
require_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('nG6').'/lib/class.tx_nG6_db.php');
class tx_nG6_pi4 extends tslib_pibase {
class tx_nG6_pi4 extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
var $prefixId = 'tx_nG6_pi1'; // Same as class name
var $scriptRelPath = 'pi4/class.tx_nG6_pi4.php'; // Path to this script relative to the extension dir.
var $extKey = 'nG6'; // The extension key.
......@@ -58,8 +57,8 @@ class tx_nG6_pi4 extends tslib_pibase {
$this->pi_USER_INT_obj=1; // Configuring so caching is not expected. This value means that no cHash params are ever set. We do this, because it's a USER_INT object!
// Gets params from the pi1 plugin
//$p1Vars = t3lib_div::GParrayMerged('tx_nG6_pi1');
$p1Vars = t3lib_div::_GPmerged('tx_nG6_pi1');
//$p1Vars = \TYPO3\CMS\Core\Utility\GeneralUtility::GPMerged('tx_nG6_pi1');
$p1Vars = \TYPO3\CMS\Core\Utility\GeneralUtility::_GPmerged('tx_nG6_pi1');
if (tx_nG6_db::user_is_authorized($GLOBALS['TSFE']->fe_user->user['uid'], $this->piVars['project_id'], $this->piVars['run_id'])) {
......
......@@ -43,7 +43,7 @@ class tx_nG6_pi4_wizicon {
$LL = $this->includeLocalLang();
$wizardItems['plugins_tx_nG6_pi4'] = array(
'icon'=>t3lib_extMgm::extRelPath('nG6').'pi4/ce_wiz.gif',
'icon'=>\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('nG6').'pi4/ce_wiz.gif',
'title'=>$LANG->getLLL('pi4_title',$LL),
'description'=>$LANG->getLLL('pi4_plus_wiz_description',$LL),
'params'=>'&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=nG6_pi4'
......
......@@ -27,12 +27,11 @@
* @author PF bioinformatique de Toulouse <>
*/
require_once(PATH_tslib.'class.tslib_pibase.php');
require_once(t3lib_extMgm::extPath('nG6').'/lib/class.tx_nG6_utils.php');
require_once(t3lib_extMgm::extPath('nG6').'/lib/class.tx_nG6_db.php');
require_once(t3lib_extMgm::extPath('nG6').'/res/smarty/libs/Smarty.class.php');
require_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('nG6').'/lib/class.tx_nG6_utils.php');
require_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('nG6').'/lib/class.tx_nG6_db.php');
require_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('nG6').'/res/smarty/libs/Smarty.class.php');
class tx_nG6_pi5 extends tslib_pibase {
class tx_nG6_pi5 extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
var $prefixId = 'tx_nG6_pi5'; // Same as class name
var $scriptRelPath = 'pi5/class.tx_nG6_pi5.php'; // Path to this script relative to the extension dir.
var $extKey = 'nG6'; // The extension key.
......@@ -59,20 +58,20 @@ class tx_nG6_pi5 extends tslib_pibase {
// Add the jquery libs + the tree plugins and its css
$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId] = '
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.jstree.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jflow.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/bootstrap.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/tx_nG6_pi5.js"></script>
<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/js/jquery.min.js"></script>
<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/js/jquery.jstree.min.js"></script>
<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/js/jflow.min.js"></script>
<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/js/bootstrap.min.js"></script>
<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/js/tx_nG6_pi5.js"></script>
<link type="text/css" rel="stylesheet" media="screen" href="'.t3lib_extMgm::siteRelPath($this->extKey).'res/css/bootstrap-theme.min.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'.t3lib_extMgm::siteRelPath($this->extKey).'res/css/tx_nG6.css"/>';
<link type="text/css" rel="stylesheet" media="screen" href="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/css/bootstrap-theme.min.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/css/tx_nG6.css"/>';
$smarty = new Smarty();
$smarty->setTemplateDir(t3lib_extMgm::extPath('nG6').'/pi5');
$smarty->setCompileDir(t3lib_extMgm::extPath('nG6').'/res/smarty/templates_c');
$smarty->setCacheDir(t3lib_extMgm::extPath('nG6').'/res/smarty/cache');
$smarty->setConfigDir(t3lib_extMgm::extPath('nG6').'/res/smarty/configs');
$smarty->setTemplateDir(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('nG6').'/pi5');
$smarty->setCompileDir(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('nG6').'/res/smarty/templates_c');
$smarty->setCacheDir(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('nG6').'/res/smarty/cache');
$smarty->setConfigDir(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('nG6').'/res/smarty/configs');
$smarty->security = true;
$smarty->security_settings['MODIFIER_FUNCS'] = array('count');
......
......@@ -43,7 +43,7 @@ class tx_nG6_pi5_wizicon {
$LL = $this->includeLocalLang();
$wizardItems['plugins_tx_nG6_pi5'] = array(
'icon'=>t3lib_extMgm::extRelPath('nG6').'pi5/ce_wiz.gif',
'icon'=>\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('nG6').'pi5/ce_wiz.gif',
'title'=>$LANG->getLLL('pi5_title',$LL),
'description'=>$LANG->getLLL('pi5_plus_wiz_description',$LL),
'params'=>'&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=nG6_pi5'
......
......@@ -27,17 +27,17 @@
* @author PF bioinformatique de Toulouse <>
*/
require_once(PATH_tslib.'class.tslib_pibase.php');
require_once(t3lib_extMgm::extPath('nG6').'/lib/class.tx_nG6_utils.php');
require_once(t3lib_extMgm::extPath('nG6').'/lib/class.tx_nG6_db.php');
require_once(t3lib_extMgm::extPath('nG6').'/res/smarty/libs/Smarty.class.php');
require_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('nG6').'/lib/class.tx_nG6_utils.php');
require_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('nG6').'/lib/class.tx_nG6_db.php');
require_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('nG6').'/res/smarty/libs/Smarty.class.php');
class tx_nG6_pi6 extends tslib_pibase {
class tx_nG6_pi6 extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
var $prefixId = 'tx_nG6_pi6'; // Same as class name
var $scriptRelPath = 'pi6/class.tx_nG6_pi6.php'; // Path to this script relative to the extension dir.
var $extKey = 'nG6'; // The extension key.
//var $pi_checkCHash = TRUE;
/**
* Main method of your PlugIn
*
......@@ -51,37 +51,36 @@ class tx_nG6_pi6 extends tslib_pibase {
$conf['pidList'] = $this->cObj->data['pages'];
$conf['recursive'] = $this->cObj->data['recursive'];
}
$this->pi_loadLL();
$this->conf=$conf;
$this->pi_setPiVarDefaults();
$this->pi_USER_INT_obj=1;
// Add the jquery libs + the tree plugins and its css
$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId] = '
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/highstock.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.highcharts.exporting.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/bootstrap.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/dataTables.bootstrap.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/typeahead.bundle.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jflow.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/tx_nG6_utils.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/tx_nG6_pi6.js"></script>
<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/js/jquery.min.js"></script>
<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/js/highstock.js"></script>
<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/js/jquery.highcharts.exporting.js"></script>
<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/js/bootstrap.min.js"></script>
<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/js/dataTables.bootstrap.js"></script>
<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/js/typeahead.bundle.js"></script>
<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/js/jflow.min.js"></script>
<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/js/tx_nG6_utils.js"></script>
<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/js/tx_nG6_pi6.js"></script>
<link type="text/css" rel="stylesheet" media="screen" href="'.t3lib_extMgm::siteRelPath($this->extKey).'res/css/bootstrap-theme.min.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'.t3lib_extMgm::siteRelPath($this->extKey).'res/css/dataTables.bootstrap.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'.t3lib_extMgm::siteRelPath($this->extKey).'res/css/typeaheadjs.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'.t3lib_extMgm::siteRelPath($this->extKey).'res/css/font-awesome.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'.t3lib_extMgm::siteRelPath($this->extKey).'res/css/jflow.min.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'.t3lib_extMgm::siteRelPath($this->extKey).'res/css/tx_nG6.css"/>';
<link type="text/css" rel="stylesheet" media="screen" href="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/css/bootstrap-theme.min.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/css/dataTables.bootstrap.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/css/typeaheadjs.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/css/font-awesome.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/css/jflow.min.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/css/tx_nG6.css"/>';
$smarty = new Smarty();
$smarty->setTemplateDir(t3lib_extMgm::extPath('nG6').'/pi6');
$smarty->setCompileDir(t3lib_extMgm::extPath('nG6').'/res/smarty/templates_c');
$smarty->setCacheDir(t3lib_extMgm::extPath('nG6').'/res/smarty/cache');
$smarty->setConfigDir(t3lib_extMgm::extPath('nG6').'/res/smarty/configs');
$smarty->setTemplateDir(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('nG6').'/pi6');
$smarty->setCompileDir(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('nG6').'/res/smarty/templates_c');
$smarty->setCacheDir(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('nG6').'/res/smarty/cache');
$smarty->setConfigDir(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('nG6').'/res/smarty/configs');
$smarty->security = true;
$smarty->security_settings['MODIFIER_FUNCS'] = array('count');
......
......@@ -43,7 +43,7 @@ class tx_nG6_pi6_wizicon {
$LL = $this->includeLocalLang();
$wizardItems['plugins_tx_nG6_pi6'] = array(
'icon'=>t3lib_extMgm::extRelPath('nG6').'pi6/ce_wiz.gif',
'icon'=>\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('nG6').'pi6/ce_wiz.gif',
'title'=>$LANG->getLLL('pi6_title',$LL),
'description'=>$LANG->getLLL('pi6_plus_wiz_description',$LL),
'params'=>'&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=nG6_pi6'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment