Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.0-20200222-01 #341

Open
wants to merge 60 commits into
base: testlink_1_9
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
a3a8301
feature: architetural change
fmancardi Feb 15, 2020
f0992d6
git setup
fmancardi Feb 15, 2020
c8adfc8
misplaced
fmancardi Feb 15, 2020
475d55b
feature: architectural change
fmancardi Feb 15, 2020
7aa1e73
obsolete?
fmancardi Feb 15, 2020
94efc04
wip
fmancardi Feb 16, 2020
176745e
wip
fmancardi Feb 16, 2020
57a16a2
feature: initContext() user & userID are initialized from $_SESSION
fmancardi Feb 16, 2020
4a86168
wip
fmancardi Feb 16, 2020
35304d1
wip
fmancardi Feb 16, 2020
272387b
aligned to dashio
fmancardi Feb 16, 2020
695ece6
align dashio
fmancardi Feb 16, 2020
be9ba86
wip
fmancardi Feb 16, 2020
7f41a48
example
fmancardi Feb 16, 2020
b91ffa8
1.9.x templates removed
fmancardi Feb 16, 2020
71c2bad
2.0.0 templates added (dashio)
fmancardi Feb 16, 2020
7a6c436
aligned to dashio
fmancardi Feb 16, 2020
55d2500
file mode changed
fmancardi Feb 16, 2020
420cc6b
aligned to dashio
fmancardi Feb 16, 2020
446db1a
aligned to dashio
fmancardi Feb 16, 2020
8845987
aligned to dashio
fmancardi Feb 16, 2020
fbe0c41
aligned to dashio -> remove context from $_SESSION
fmancardi Feb 16, 2020
70b805b
aligned to dashio
fmancardi Feb 16, 2020
d6c58b4
aligned to dashio
fmancardi Feb 16, 2020
6e0631c
aligned to dashio
fmancardi Feb 16, 2020
9a58849
added aliens template definition
fmancardi Feb 16, 2020
690f48d
align with aliens
fmancardi Feb 16, 2020
32d66e7
aligned to dashio
fmancardi Feb 16, 2020
96c9ffc
remove return true that generates issue on some browsers
fmancardi Feb 16, 2020
219b206
new location for dashio specific support files
fmancardi Feb 22, 2020
2ad76c8
new location for dashio specific support files
fmancardi Feb 22, 2020
fcae459
new location for dashio specific support files
fmancardi Feb 22, 2020
40fe79f
something working
fmancardi Feb 22, 2020
a357a11
something working
fmancardi Feb 22, 2020
111ef4d
something working
fmancardi Feb 22, 2020
a8750e8
fix path to resource
fmancardi Feb 22, 2020
7872c83
added missing DataTables plugin
fmancardi Feb 22, 2020
f14af7f
refactoring DataTables
fmancardi Feb 23, 2020
2e8e92a
Configure DataTables to sort by column 1 NOT 0 (0 -> first col)
fmancardi Feb 23, 2020
14900a0
fix
fmancardi Feb 23, 2020
01099fc
improvement - several template folders configured
fmancardi Feb 23, 2020
9fb5fd4
reorganization
fmancardi Feb 23, 2020
4cc3d9a
obsolete
fmancardi Feb 23, 2020
89558dd
always draw the table to avoid DataTables warning
fmancardi Feb 23, 2020
d42c1df
aligned aliens
fmancardi Feb 23, 2020
d17fa0b
wip
fmancardi Feb 23, 2020
fcd2143
alignment
fmancardi Feb 23, 2020
8965e69
wip aliens
fmancardi Feb 23, 2020
a4fab37
fix: event viewer warnings
fmancardi Mar 8, 2020
b76723f
missing version fixes (found in TESISQUARE production code)
fmancardi Mar 12, 2020
0f433b9
fix delete platform link on tc spec (found in TESISQUARE production c…
fmancardi Mar 12, 2020
e8074cf
feature: added piece of logic related to Alien References
fmancardi Mar 13, 2020
0a0d7b3
feature: added piece of logic related to Alien References
fmancardi Mar 13, 2020
2858ca8
fix: buildTestCaseObj()
fmancardi Mar 13, 2020
83ca1f6
fix: aligned with testlink_1_9_20_fixed
fmancardi Mar 13, 2020
10ce74c
saving wip work
fmancardi Apr 4, 2020
da27609
fix: bad include path & file
fmancardi Jun 1, 2020
20df975
fix tprojectMgr -> tprojMgr
fmancardi Jun 1, 2020
3fc192f
refactoring: replace icons with font awesome
fmancardi Jun 1, 2020
e81cf40
refactoring: replace icons with font awesome
fmancardi Jun 1, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions cfg/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
custom*.inc.php
28 changes: 11 additions & 17 deletions cfg/const.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,23 @@


/* [GLOBAL SETTINGS] */

define('TL_SMARTY_VERSION',3); // @since 1.9.8
define('TL_JQUERY','third_party/jquery/jquery-3.4.1.min.js');


/** TestLink Release version (MUST BE changed before the release day) */
define('TL_VERSION_NUMBER', '1.9.20');
define('TL_VERSION_NUMBER', '2.0.0');
define('TL_VERSION', TL_VERSION_NUMBER . ' [DEV] ');
define('TL_FACE_DIR', 'prague');
define('TL_FACE_DIR', 'buenosaires');

/** Latest Database version that is used to give users feedback
* about necesssary upgrades
* if you set this parameter also upgrade
* lib/functions/configCheck.php - checkSchemaVersion() */
define('TL_LATEST_DB_VERSION', 'DB ' . '1.9.20');
define('TL_LATEST_DB_VERSION', 'DB ' . '2.0.0');

// needed to avoid problems in install scripts that do not include config.inc.php
// needed to avoid problems in install scripts
// that do not include config.inc.php
// want to point to root install dir, need to remove fixed part
if (!defined('TL_ABS_PATH')) {
define('TL_ABS_PATH', str_replace('cfg','',dirname(__FILE__)));
Expand Down Expand Up @@ -60,7 +62,7 @@
}


// --------------------------------------------------------------------------------
// -----------------------------------------------------------------
/* [GENERAL MAGIC NUMBERS] */

/** PHPMAILER */
Expand All @@ -81,15 +83,9 @@
define('ERROR', 0 );

/** More Descriptive constant names */
define('HIGH', 3 );
define('MEDIUM', 2 );
define('LOW', 1 );

/** user for notes - see BUGID 0002469: $tlCfg->exec_cfg->expand_collapse
very important do not change values, logic depends on values*/
define('LAST_USER_CHOICE',2);
define('COLLAPSE', 0);
define('EXPAND',1 );
define('HIGH', 3);
define('MEDIUM', 2);
define('LOW',1);

// used in several functions instead of MAGIC NUMBERS - Don't change
define('ALL_PRODUCTS', 0);
Expand Down Expand Up @@ -962,6 +958,4 @@
define('USE_LATEST_EXEC_ON_CONTEX_FOR_COUNTERS', 1);
define('USE_LATEST_EXEC_ON_TESTPLAN_FOR_COUNTERS',2);
define('USE_LATEST_EXEC_ON_TESTPLAN_PLAT_FOR_COUNTERS',3);


// END
57 changes: 33 additions & 24 deletions config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,11 @@


/** Include constants and magic numbers (users should not change it)*/
require_once(TL_ABS_PATH . 'cfg' . DIRECTORY_SEPARATOR . 'const.inc.php');
$cfgPath = TL_ABS_PATH . 'cfg' . DIRECTORY_SEPARATOR;
require_once($cfgPath . 'const.inc.php');


// ----------------------------------------------------------------------------
// --------------------------------------------------------------
/** @var string used to have (when needed) a possibility to identify different TL instances
@since 1.9.4 used on mail subject when mail logger is used
*/
Expand All @@ -148,7 +149,7 @@
* @see $tlCfg->cookie->path
* @global string $tlCfg->cookie->prefix
*/
$tlCfg->cookie->prefix = 'TESTLINK1920';
$tlCfg->cookie->prefix = 'TESTLINK200';

/**
* @link http://php.net/function.setcookie
Expand Down Expand Up @@ -1138,15 +1139,23 @@
// 'latest' => latest execution notes.
$tlCfg->exec_cfg->steps_exec_status_default = 'empty';

// Parameters to show notes/details when entering test execution feature
// EXPAND: show expanded/open
// COLLAPSE: show collapsed/closede
// LAST_USER_CHOICE: get status from cookie that holds last user choice.[STANDARD BEHAVIOUR]
// Parameters to show notes/details
// when entering test execution feature
// 'EXPAND': show expanded/open
// 'COLLAPSE': show collapsed/closed
// 'LAST_USER_CHOICE':
// get status from cookie that holds
// latest user choice.
// This is the [STANDARD BEHAVIOUR]
$tlCfg->exec_cfg->expand_collapse = new stdClass();
$tlCfg->exec_cfg->expand_collapse->testplan_notes = LAST_USER_CHOICE;
$tlCfg->exec_cfg->expand_collapse->platform_description = LAST_USER_CHOICE;
$tlCfg->exec_cfg->expand_collapse->build_description = LAST_USER_CHOICE;
$tlCfg->exec_cfg->expand_collapse->testsuite_details = LAST_USER_CHOICE;
$tlCfg->exec_cfg->expand_collapse
->testplan_notes = 'LAST_USER_CHOICE';
$tlCfg->exec_cfg->expand_collapse
->platform_description = 'LAST_USER_CHOICE';
$tlCfg->exec_cfg->expand_collapse
->build_description = 'LAST_USER_CHOICE';
$tlCfg->exec_cfg->expand_collapse
->testsuite_details = 'LAST_USER_CHOICE';



Expand Down Expand Up @@ -2045,7 +2054,7 @@



// ----------------------------------------------------------------------------
// -------------------------------------------------------------
/* [PROXY] */
/* Used only */
/* mantissoapInterface.class.php */
Expand All @@ -2060,22 +2069,23 @@
/** Plugins feature */
define('TL_PLUGIN_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR);

// ----- End of Config ------------------------------------------------------------------
// --------------------------------------------------------------------------------------
// ----- End of Config ----------------------------------------

// ------------------------------------------------------------
// DO NOT DO CHANGES BELOW
// --------------------------------------------------------------------------------------
// ------------------------------------------------------------

/** Functions for check request status */
require_once('configCheck.php');


if( !defined('TL_JQUERY') )
{
define('TL_JQUERY','jquery-2.2.4.min.js' );
/**
* @see also cfg/const.inc.php
*/
if (!defined('TL_JQUERY')) {
define('TL_JQUERY','third_party/jquery/jquery-3.4.1.min.js');
}

if( !defined('TL_DATATABLES_DIR') )
{
if (!defined('TL_DATATABLES_DIR')) {
define('TL_DATATABLES_DIR','DataTables-1.10.4' );
}

Expand All @@ -2085,9 +2095,8 @@
define('TL_BASE_HREF', get_home_url(array('force_https' => $tlCfg->force_https)));

clearstatcache();
if ( file_exists( TL_ABS_PATH . 'custom_config.inc.php' ) )
{
require_once( TL_ABS_PATH . 'custom_config.inc.php' );
if ( file_exists( $cfgPath . 'custom_config.inc.php' ) ) {
require_once( $cfgPath . 'custom_config.inc.php' );
}


Expand Down
66 changes: 28 additions & 38 deletions error.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,53 +6,41 @@
* General purpose error page.
*
* @package TestLink
* @copyright 2012,2019 TestLink community
* @copyright 2012 TestLink community
*
* @internal revisions
* @used by: kinow - TICKET 4977 - CSRF - Advisory ID: HTB23088
* @since 1.9.4
* 20120703 - kinow - TICKET 4977 - CSRF - Advisory ID: HTB23088
*
**/

require_once('config.inc.php');
require_once('common.php');

/**
*
*/
function init_args() {

$args = new stdClass();
$args->message = 'Rocket Raccoon is watching You';
$code = isset($_REQUEST['code']) ? $_REQUEST['code'] : 0;

switch($code) {
case 1:
$args->message = 'No CSRFName found, probable invalid request.';
break;

case 2:
$args->message = 'Invalid CSRF token';
break;

default:
break;
}

return $args;
function init_args()
{
$iParams = array(
'message' => array(tlInputParameter::STRING_N,0,255)
);
$pParams = R_PARAMS($iParams);
$args = new stdClass();
if(isset($pParams['message'])) {
$args->message = $pParams['message'];
}
return $args;
}

/**
*
*/
function init_gui($args) {
$gui = new stdClass();
$gui->message = '';

if(isset($args->message) {
$gui->message = $args->message;
}

return $gui;
function init_gui($args)
{
$gui = new stdClass();
if(isset($args->message))
{
$gui->message = $args->message;
} else {
$gui->message = '';
}

return $gui;
}

$templateCfg = templateConfiguration();
Expand All @@ -61,4 +49,6 @@ function init_gui($args) {

$smarty = new TLSmarty();
$smarty->assign('gui', $gui);
$smarty->display($templateCfg->default_template);
$smarty->display($templateCfg->default_template);

?>
39 changes: 26 additions & 13 deletions firstLogin.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
*
* @filesource firstLogin.php
* @package TestLink
* @copyright 2004-2019, TestLink community
* @copyright 2004-2016, TestLink community
* @link http://www.testlink.org
*
*
*/
require_once('config.inc.php');
require_once('common.php');
Expand All @@ -20,7 +21,8 @@
$args = init_args();
$gui = $args;

if (!config_get('user_self_signup')) {
if (!config_get('user_self_signup'))
{
$smarty = new TLSmarty();
$smarty->assign('title', lang_get('fatal_page_title'));
$smarty->assign('content', lang_get('error_self_signup_disabled'));
Expand All @@ -32,34 +34,45 @@
doDBConnect($db,database::ONERROREXIT);

$message = ''; //lang_get('your_info_please');
if( !is_null($args->doEditUser) ) {
if(strcmp($args->password,$args->password2)) {
if( !is_null($args->doEditUser) )
{
if(strcmp($args->password,$args->password2))
{
$message = lang_get('passwd_dont_match');
} else {
}
else
{
$user = new tlUser();
$rx = $user->checkPasswordQuality($args->password);
if( $rx['status_ok'] >= tl::OK ) {
if( $rx['status_ok'] >= tl::OK )
{
$result = $user->setPassword($args->password);
if ($result >= tl::OK) {
if ($result >= tl::OK)
{
$user->login = $args->login;
$user->emailAddress = $args->email;
$user->firstName = $args->firstName;
$user->lastName = $args->lastName;
$result = $user->writeToDB($db);

$cfg = config_get('notifications');
if($cfg->userSignUp->enabled) {
if($cfg->userSignUp->enabled)
{
notifyGlobalAdmins($db,$user);
}
logAuditEvent(TLS("audit_users_self_signup",$args->login),"CREATE",$user->dbID,"users");

$url2go = "login.php?viewer={$gui->viewer}&note=first";
redirect(TL_BASE_HREF . $url2go);
exit();
} else {
}
else
{
$message = getUserErrorMessage($result);
}
} else {
}
else
{
$message = $rx['msg'];
}
}
Expand All @@ -72,11 +85,11 @@
$gui->message = $message;
$smarty->assign('gui',$gui);

$tpl = str_replace('.php','.tpl',basename($_SERVER['SCRIPT_NAME']));
// $tpl = str_replace('.php','.tpl',basename($_SERVER['SCRIPT_NAME']));
if( $args->viewer == 'new' ) {
$tpl='firstLogin-model-marcobiedermann.tpl';
$tpl='login/firstLogin-model-marcobiedermann.tpl';
}
$tpl = 'login/' . $tpl;

$smarty->display($tpl);


Expand Down
Loading