Skip to content

Commit

Permalink
Release v4.0.1; see CHANGELOG for details.
Browse files Browse the repository at this point in the history
  • Loading branch information
Demitri Morgan committed Apr 1, 2014
1 parent 07fcfd0 commit 0cb254a
Show file tree
Hide file tree
Showing 139 changed files with 4,066 additions and 2,275 deletions.
77 changes: 76 additions & 1 deletion CHANGELOG.md

Large diffs are not rendered by default.

44 changes: 17 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,21 @@
# X2Engine 4.0 #
3/20/2014

New in 4.0 (see [CHANGELOG](CHANGELOG.md) for full history):

* New in **Platinum Edition:**
* Browser fingerprinting system supplements web activity tracker for when contacts have cookies disabled
* Administrators can set default themes for all users
* The ability to import/export themes
* The ability to import and export flows from X2Flow
* Partner branding template (for authorized partners)
* New in **Professional Edition:**
* Improvements to the actions publisher:
* New "products" tab, for logging the use of products in a project or with a contact (for example)
* New "event" tab through which calendar events associated with the record can be created
* Which tabs it displays can be customized
* Responsive UI replaces X2Touch and makes the application more easy to use on a mobile device
* Improved Relationships widget with the ability to link to any type of record, including custom modules
* New Administrative tools:
* Can import any data type with the power and flexibility that was previously limited to contact imports
* New simpler data export for modules that emulates the exporter previously limited to Contacts
* Can customize the application name and description
* FTP-based file management for compatibility with systems where files and directories are not owned by the web server (documentation coming soon)
* New look & feel including new icon-based activity feed buttons and login page
* Bug fixes to the Marketing module, updater, and more:
* [1043](http://x2software.com/index.php/bugReports/1043): Property "Media.title" is not defined.
* [1091](http://x2software.com/index.php/bugReports/1091): Array to string conversion
* Further improvements to the security fixes discovered earlier; see ["Multiple Vulnerabilities in X2Engine"](http://x2community.com/topic/1511-multiple-vulnerabilities-in-x2engine/#entry7354) for more information
Patch/follow-up release 4.0.1 (see [CHANGELOG](CHANGELOG.md) for full history)

3/31/2014

* Fixed Bugs:
* [1080](http://x2software.com/index.php/bugReports/1080): User Report
* [1096](http://x2software.com/index.php/bugReports/1096): web tracking links broken
* [1097](http://x2software.com/index.php/bugReports/1097): User Report
* [1104](http://x2software.com/index.php/bugReports/1104): AccountCampaignAction and its behaviors do not have a method or closure named "redirect".
* [1110](http://x2software.com/index.php/bugReports/1110): User Report
* [1112](http://x2software.com/index.php/bugReports/1112): User Report
* [1116](http://x2software.com/index.php/bugReports/1116): is_file(): open_basedir restriction in effect. File(/usr/share/pear/Users.php) is not within the allowed path(s): (/usr/wwws/users/tikeccbcgd:/usr/www/users/tikeccbcgd:/usr/home/tikeccbcgd:/usr/local/rmagic:/usr/www/users/he/_system_:/usr/share/php:/
* [1130](http://x2software.com/index.php/bugReports/1130): User Report
* [1137](http://x2software.com/index.php/bugReports/1137): User Report
* [1143](http://x2software.com/index.php/bugReports/1143): Unable to resolve the request "bugReports/1,142".
* [1151](http://x2software.com/index.php/bugReports/1151): The system is unable to find the requested action "profile".
* [1154](http://x2software.com/index.php/bugReports/1154): User Report



Expand Down
13 changes: 13 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# 4.0 #
3/20/2014

* "X2Touch", the mobile layout, is no more. In its place will be a responsive,
mobile-friendly layout.
* The formula-parsing method used in X2Flow has changed to improve security and
Expand All @@ -12,6 +14,8 @@
the content of the referenced field never containing quotes).

# 3.7.3b #
2/14/2014

* This version, while it is mainly oriented towards fixing bugs, contains some
extreme, far-reaching changes (for example, the refactoring of how lookup fields
work) that may have introduced bugs that we have not seen/foreseen in our tests.
Expand All @@ -26,12 +30,14 @@

# 3.7.1 #
12/23/2013

* For security purposes, the web lead form no longer permits setting options via
query parameters, with the exception of CSS (i.e. color); rather, all options
are now stored server-side. Existing web lead forms will thus need to be updated.

# 3.7 #
12/23/2013

* In previous versions, the "greater than" and "less than" comparison operators
in X2Flow incorrectly resulted in the comparisons "greater than or equal to"
and "less than or equal to", respectively. In this version, that behavior is
Expand All @@ -47,6 +53,7 @@

# 3.6.2 #
11/26/2013

* Hosting one's CRM on a different domain name than one's website will increase
the likelihood of public-facing resources like targeted content, web forms and
the web tracker not working properly in some browsers. This is due to the
Expand All @@ -64,6 +71,7 @@

# 3.6.1 #
11/22/2013

* The targeted content embed method has been changed to resolve the previous
issue with Internet Explorer. As such, any embed codes generated in 3.6 will
not work in this and future versions. To fix this issue, it will be necessary
Expand All @@ -72,18 +80,21 @@

# 3.6 #
11/21/2013

* The targeted content feature is designated "beta" because, in this version,
the embeddable code causes problems in Internet Explorer 8 and 9 when embedded
in pages containing multiple iframes.

# 3.1 #
6/18/2013

* In the deletion action of the API, the primary key can now be specified in
either the GET or POST parameters. This way, the "DELETE" request type can be
used for deletion, and not just the POST type of request.

# 3.0.1 #
5/13/2013

* The API has undergone some fundamental changes in its response format:
* It always responds in JSON-encoded objects for all actions, with the
exception of checkPermissions, which responds with code 200, mimetype
Expand All @@ -107,6 +118,7 @@

# 3.0 #
5/1/2013

* The automation designer, while largely complete, is still in active
development, and thus has been deemed a "beta" feature.
* Quotes created before updating to 3.0 may display incorrect totals in email,
Expand All @@ -128,6 +140,7 @@

# 2.1.1 #
10/15/2012

* Note: Any existing changelog data will be preserved, but not visible in the
changelog table. In the next update we will include code to convert this data
to the new format.
4 changes: 3 additions & 1 deletion x2engine/framework/views/exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@
</head>

<body>
<div class="container">
<!--/* x2modstart */-->
<div id='x2-php-error' class="container">
<!--/* x2modend */-->
<h1><?php echo $data['type']?></h1>

<p class="message">
Expand Down
35 changes: 20 additions & 15 deletions x2engine/initialize.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
'adminPass2',
'apiKey',
'app',
'baseUrl',
'buildDate',
'currency',
'currency2',
Expand All @@ -81,7 +82,6 @@
'updaterVersion',
'user_agent',
'visibleModules',
'webLeadUrl',
'x2_version',
'type',
'startCron',
Expand Down Expand Up @@ -548,7 +548,7 @@ function installStage($stage) {
} else {
$gii = "array(\n\t'class'=>'system.gii.GiiModule',\n\t'password'=>'password',\n\t/* If the following is removed, Gii defaults to localhost only. Edit carefully to taste: */\n\t 'ipFilters'=>array('127.0.0.1', '::1'),\n)";
}
$config['webLeadUrl'] = is_int(strpos($config['webLeadUrl'], 'initialize.php')) ? substr($config['webLeadUrl'], 0, strpos($config['webLeadUrl'], 'initialize.php')) : $config['webLeadUrl'];
$config['baseUrl'] = is_int(strpos($config['baseUrl'], 'initialize.php')) ? substr($config['baseUrl'], 0, strpos($config['baseUrl'], 'initialize.php')) : $config['baseUrl'];
$X2Config = "<?php\n";
foreach (array('appName', 'email', 'host', 'user', 'pass', 'dbname', 'version') as $confKey)
$X2Config .= "\$$confKey = ".var_export($config[$confMap[$confKey]],1).";\n";
Expand All @@ -559,20 +559,25 @@ function installStage($stage) {
$config['time'] = time();
foreach ($dbKeys as $property)
$dbConfig['{' . $property . '}'] = $config[$property];
$contents = file_get_contents('webLeadConfig.php');
$contents = preg_replace('/\$url=\'\'/', "\$url='{$config['webLeadUrl']}'", $contents);
$contents = preg_replace('/\$user=\'\'/', "\$user='admin'", $contents);
$contents = preg_replace('/\$userKey=\'\'/', "\$userKey='{$config['adminUserKey']}'", $contents);
file_put_contents('webLeadConfig.php', $contents);
$contents = file_get_contents('webConfig.php');
$contents = preg_replace('/\$url\s*=\s*\'\'/', "\$url=".var_export($config['baseUrl'],1), $contents);
$contents = preg_replace('/\$user\s*=\s*\'\'/', "\$user=".var_export($config['adminUsername'],1), $contents);
$contents = preg_replace('/\$userKey\s*=\s*\'\'/', "\$userKey=".var_export($config['adminUserKey'],1), $contents);
file_put_contents('webConfig.php', $contents);
if ($config['test_db']) {
$filename = 'protected/config/X2Config-test.php';
$filename = implode(DIRECTORY_SEPARATOR,array(__DIR__,'protected','config','X2Config-test.php'));
if (!empty($config['test_url'])) {
$webTestConfigFile = dirname(__FILE__) . implode(DIRECTORY_SEPARATOR, array('', 'protected', 'tests', '')) . 'WebTestConfig.php';
$webTestConfig = "<?php define('TEST_BASE_URL','{$config['test_url']}/'); ?>";
$webTestConfigFile = implode(DIRECTORY_SEPARATOR, array(__DIR__, 'protected', 'tests', 'WebTestConfig.php'));
$webTestUrl = rtrim($config['test_url'],'/').'/';
$webTestRoot = rtrim(preg_replace('#index-test\.php/?$#','',trim($config['test_url'])),'/').'/';
$webTestConfig = "<?php\n";
$webTestConfig .= "define('TEST_BASE_URL',".var_export($webTestUrl,1).");\n";
$webTestConfig .= "define('TEST_WEBROOT_URL',".var_export($webTestRoot,1).");\n";
$webTestConfig .= "?>";
file_put_contents($webTestConfigFile, $webTestConfig);
}
} else
$filename = 'protected/config/X2Config.php';
$filename = implode(DIRECTORY_SEPARATOR,array(__DIR__,'protected','config','X2Config.php'));
$handle = fopen($filename, 'w') or RIP(installer_tr('Could not create configuration file: {filename}.',array('{filename}'=>$filename)));

// Write core application configuration:
Expand Down Expand Up @@ -746,7 +751,7 @@ function installStage($stage) {
$config[$checkbox] = (isset($_POST[$checkbox]) && $_POST[$checkbox] == 1) ? 1 : 0;
}
$config['unique_id'] = isset($_POST['unique_id']) ? $_POST['unique_id'] : 'none';
$config['webLeadUrl'] = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
$config['baseUrl'] = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
}
//if(!in_array($config['type'],array('Silent','Bitnami','Testing'))) // Special installation types
// $config['type'] = $config['test_db']==1?'Testing':($silent ? 'Silent' : 'On Premise');
Expand Down Expand Up @@ -850,7 +855,7 @@ function installStage($stage) {
} catch (PDOException $e) {
// Database connection failed. Send validation errors.
foreach (array('dbHost' => 'Host Name', 'dbName' => 'Database Name', 'dbUser' => 'Username', 'dbPass' => 'Password') as $attr => $label) {
if (empty($_POST[$attr])) {
if (empty($config[$attr])) {
addValidationError($attr, installer_tr('{attr}: cannot be blank', array('{attr}' => installer_t($label))));
} else {
addValidationError($attr, installer_tr('{attr}: please check that it is correct', array('{attr}' => installer_t($label))));
Expand Down Expand Up @@ -887,7 +892,7 @@ function installStage($stage) {
foreach ($sendArgs as $urlKey) {
$stats[$urlKey] = $config[$urlKey];
}
$ch = curl_init('https://x2planet.com/installs/registry/activity?' . http_build_query($stats));
$ch = curl_init('http://x2planet.com/installs/registry/activity?' . http_build_query($stats));
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$gif = curl_exec($ch);
Expand Down Expand Up @@ -952,7 +957,7 @@ function installStage($stage) {
Copyright &copy; <?php echo date('Y'); ?><a href="http://www.x2engine.com">X2Engine Inc.</a><br />
<?php echo installer_t('All Rights Reserved.'); ?>
<?php if (!$config['test_db']): ?>
<img style="height:0;width:0" src="https://x2planet.com/installs/registry/activity?<?php echo http_build_query($stats); ?>">
<img style="height:0;width:0" src="http://x2planet.com/installs/registry/activity?<?php echo http_build_query($stats); ?>">
<?php endif; ?>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion x2engine/installConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
$adminPassword = 'admin';
$adminUsername = 'admin';
$dummyData = 0;
$webLeadUrl = '';
$baseUrl = '';
$unique_id = 'none';
// Default visible modules (set manually to a comma-delineated list as desired)
$visibleModules = implode(',',(array) require(dirname(__FILE__).implode(DIRECTORY_SEPARATOR,array('','protected','data','')).'enabledModules.php'));
Expand Down
78 changes: 27 additions & 51 deletions x2engine/js/LayoutManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,12 @@ x2.LayoutManager = function (argsDict) {
this._halfWidthSelector = '#main-column, .history';
this._hideSideBarLeftThreshold = 657;
this._hideWidgetsThreshold = 1040;
this._fullSearchBarThreshold = 915;
this._fullSearchBarThreshold = x2.logoWidth ? x2.logoWidth + 915 : 915;
this._publisherHalfWidthThreshold = 940;
this._titleBarThresholds;
this._logoWidth = 30; // default logo width
this._logoWidth = x2.logoWidth ? x2.logoWidth : 30; // default logo width
this._mobileLayout; // true if mobile layout is active

// modal search bar is disabled for wide custom logos
this._disableSearchBarModes = $('#your-logo').hasClass ('custom-logo');
if (this._disableSearchBarModes) {
$('body').removeClass ('enable-search-bar-modes');
}

this._init ();
}

Expand Down Expand Up @@ -160,10 +154,11 @@ x2.LayoutManager.prototype._calculateTitleBarThresholds = function () {
thresholds[i] =
$($menuItems[i]).outerWidth() +
$('#user-menu').outerWidth() +
$('#user-menu-2').outerWidth() +
that._logoWidth +
$('#more-menu').outerWidth() + 370;
$('#more-menu').outerWidth();
} else {
thresholds[i] = $($menuItems[i]).outerWidth() + thresholds[i-1];
thresholds[i] = $($menuItems[i]).outerWidth() + thresholds[i-1] + 10;
}
}
$('#main-menu .top-bar-module-link').hide ();
Expand All @@ -180,10 +175,10 @@ x2.LayoutManager.prototype._calculateTitleBarThresholds = function () {
*/
x2.LayoutManager.prototype._getSearchbarMode = function (windowWidth) {
var that = this;
if (windowWidth < that._hideSideBarLeftThreshold) {
if (Modernizr.mq ('(max-width: ' + that._hideSideBarLeftThreshold + 'px)')) {
return x2.LayoutManager.searchBarModes['MOBILE'];
} else if (windowWidth > that._hideSideBarLeftThreshold &&
windowWidth < that._fullSearchBarThreshold) {
} else if (Modernizr.mq ('(min-width: ' + that._hideSideBarLeftThreshold + 'px) and ' +
'(max-width: ' + that._fullSearchBarThreshold + 'px)')) {

return x2.LayoutManager.searchBarModes['COMPACT'];
} else {
Expand All @@ -201,9 +196,9 @@ x2.LayoutManager.prototype._setUpMenuResponsiveness = function () {
var $moreMenu = $('#more-menu ul');
var $moreMenuLi = $('#more-menu');
var $mainMenu = $('#main-menu');
var currentVisibleItems;
var menuItemCount = $('#main-menu > .top-bar-module-link').length;
var searchBarMode = this._getSearchbarMode ($(window).width ());
var currentVisibleItems;

this.addFnToResizeQueue (function (windowWidth, contentWidth) {
if ($('body').hasClass ('x2-mobile-layout')) return;
Expand Down Expand Up @@ -249,12 +244,14 @@ x2.LayoutManager.prototype._setUpMenuResponsiveness = function () {

// the number of items is too high. move some into the moreMenu
} else if(visibleItems < currentVisibleItems) {
$moreMenuLi.show();
for(var i = currentVisibleItems; i > visibleItems; --i) {
$mainMenu.children (':visible').not ('#more-menu').last ().hide ();
$moreMenu.children (':hidden').last ().show ();
}
currentVisibleItems = $('#main-menu > .top-bar-module-link:visible').length;
}

// show More dropdown only if it's needed
if($moreMenu.children(':visible').length == 0) {
$moreMenuLi.hide();
Expand Down Expand Up @@ -657,48 +654,27 @@ x2.LayoutManager.prototype._setUpTitleBarResponsiveness = function () {
};

/**
* Prevents wider logos from breaking responsive title bar. For wide custom logos, modal
* search bar is disabled.
* Prevents wider logos from breaking responsive title bar. For wide custom logos, a minimum width
* must be applied to the layout to prevent the layout from being to wide to display the mobile
* version of it and too narrow to accomodate all of title bar elements.
*/
x2.LayoutManager.prototype._accountForCustomTitleBarLogo = function () {
if (!$('#your-logo').hasClass ('custom-logo')) return;
var that = this;

var defaultLogoWidth = 36;

//console.log ('check loaded');

function afterLoad () {
//console.log ('loaded');
var logoWidth = $('#your-logo').width ();
that._logoWidth = logoWidth;
if (logoWidth <= defaultLogoWidth + 100) {
this._disableSearchBarModes = false;
$('body').addClass ('enable-search-bar-modes');
$(window).resize();
return;
}
if (!x2.logoWidth) return; // no custom logo

/* apply a min-width which will prevent content resizing until the switch to the mobile
layout occurs at _hideSideBarLeftThreshold */
$('#page').css ({
'min-width': (888 + that._logoWidth) + 'px'
});
$('#header').css ({
'min-width': (888 + that._logoWidth) + 'px'
});
that._calculateTitleBarThresholds ();
$(window).resize();

}

if ($('#your-logo').get(0).complete) {
afterLoad ();
if ($('body').hasClass ('disable-mobile-layout')) {
var baseWidth = 888; // responsive layout not available
} else {
$('#your-logo').load (function () {
afterLoad ();
});
var baseWidth = 548; // base width can be narrower because search bar resizes
}

/* apply a min-width which will prevent content resizing until the switch to the mobile
layout occurs at _hideSideBarLeftThreshold */
$('#page').css ({
'min-width': (baseWidth + this._logoWidth) + 'px'
});
$('#header').css ({
'min-width': (baseWidth + this._logoWidth) + 'px'
});
};

x2.LayoutManager.prototype._init = function () {
Expand Down
Loading

0 comments on commit 0cb254a

Please sign in to comment.