Skip to content

Commit e733bb2

Browse files
committed
Merge branch 'develop' into v3.0.0
# Conflicts: # CHANGELOG.md # exponent_version.php
2 parents fd7cac2 + 862cf6f commit e733bb2

10 files changed

Lines changed: 62 additions & 30 deletions

File tree

external/ExtPrograms.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ less.php,3.2.0exp,github.com/wikimedia/less.php,3.2.1/4.4.1/5.4.0,php v5.6 regre
2828
Twitter-Bootstrap2,2.3.2,github.com/twbs/bootstrap,2.3.2,"patched bootstrap.less includes swatches, fontawesome & exp variables"
2929
Bootstrap3,3.4.1,github.com/twbs/bootstrap,3.4.1,patched bootstrap.less includes swatches & exp variables
3030
Bootstrap4,4.6.2,github.com/twbs/bootstrap,4.6.2,"patched bootstrap.scss includes swatches & exp variables, remove @page"
31-
Bootstrap5,5.3.7,github.com/twbs/bootstrap,5.3.8,patched bootstrap.scss includes swatches & exp variables
31+
Bootstrap5,5.3.8,github.com/twbs/bootstrap,5.3.8,patched bootstrap.scss includes swatches & exp variables
3232
popper.js/floating-ui,1.16.1,github.com/FezVrasta/popper.js,1.16.1/2.11.8,needed by BS4/BS5 (umd)
3333
Bootswatch2,2.3.2,bootswatch.com,2.3.2,
3434
Bootswatch3,3.4.1+1,bootswatch.com,3.4.1+1,change 1st line variables.less comment to output to .css file

framework/core/forms/controls/autocompletecontrol.php

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
class autocompletecontrol extends formcontrol {
2929

3030
var $placeholder = "";
31-
var $wwidth = "320px";
31+
var $wwidth = "320px"; // widget/input width
32+
var $lwidth = "320px"; // dropdown list width
3233
var $controller = ""; // controller to call
3334
var $action = ""; // action to call
3435
var $searchmodel = ""; // model to search
@@ -44,7 +45,11 @@ function toHTML($label,$name) {
4445
}
4546

4647
function controlToHTML($name,$label) {
47-
$html = '<div class="yui3-skin-sam" style="z-index: 999;">';
48+
$html = "";
49+
if (bs4() || bs5()) {
50+
$html .= "<div class=\"col\">";
51+
}
52+
$html .= '<div class="yui3-skin-sam" style="z-index: 999;">';
4853
$ac_input = new genericcontrol();
4954
$ac_input->type = 'search';
5055
$ac_input->id = $name . '_autoc';
@@ -53,12 +58,15 @@ function controlToHTML($name,$label) {
5358
$ac_input->placeholder = $this->placeholder;
5459
$html .= $ac_input->toHTML(null, "$name");
5560
$html .= '</div>';
61+
if (bs4() || bs5()) {
62+
$html .= '</div>';
63+
}
5664

5765
$script = "
5866
YUI(EXPONENT.YUI3_CONFIG).use('*', function (Y) {
5967
var autocomplete = Y.one('#".$name."_autoc');
6068
autocomplete.plug(Y.Plugin.AutoComplete, {
61-
width:'".$this->wwidth."',
69+
width:'".$this->lwidth."',
6270
maxResults: ".$this->maxresults.",
6371
resultListLocator: 'data', // 'data' field of json response
6472
resultTextLocator: 'title', // the field to place in the input after selection
@@ -80,19 +88,21 @@ function controlToHTML($name,$label) {
8088
});
8189
"; // end JS
8290

83-
expCSS::pushToHead(array(
84-
"unique"=>"autocompletecontrol$name",
85-
"css"=>"
91+
if (bs4() || bs5()) {
92+
expCSS::pushToHead(array(
93+
"unique" => "autocompletecontrol$name",
94+
"css" => "
8695
.yui3-aclist {
8796
z-index: 99!important;
8897
overflow-x: auto;
8998
}
90-
#".$name."_autoc {
91-
width: " . $this->wwidth.";
99+
#" . $name . "_autoc {
100+
width: " . $this->wwidth . ";
92101
}
93102
"
94-
)
95-
);
103+
)
104+
);
105+
}
96106

97107
expJavascript::pushToFoot(array(
98108
"unique"=>'ac'.$name,

framework/core/subsystems/expDatabase.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ public static function install_dbtables($aggressive=false, $workflow=ENABLE_WORK
208208
$rev_aggressive = true;
209209
}
210210
}
211-
if (is_readable("$dirpath/$tablename.info.php")) $info = include("$dirpath/$tablename.info.php");
211+
if (is_readable("$dirpath/$tablename.info.php"))
212+
$info = include("$dirpath/$tablename.info.php");
212213
if (!$db->tableExists($tablename)) {
213214
foreach ($db->createTable($tablename, $dd, $info) as $key=>$status) {
214215
$tables[$key] = $status;
@@ -1718,7 +1719,7 @@ abstract function updateObject($object, $table, $where=null, $identifier='id', $
17181719
* @param int|string $workflow is workflow turned on (or force)
17191720
*/
17201721
public function trim_revisions($table, $id, $num, $workflow=ENABLE_WORKFLOW) {
1721-
if ($workflow && $num) {
1722+
if (1) { //($workflow && $num) {
17221723
$max_revision = $this->max($table, 'revision_id', null, 'id='.$id);
17231724
$max_approved = $this->max($table, 'revision_id', null, 'id='.$id.' AND approved=1');
17241725
$min_revision = $this->min($table, 'revision_id', null, 'id='.$id);

framework/modules/ecommerce/controllers/storeController.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1790,7 +1790,7 @@ public function search() {
17901790
$search_type = ecomconfig::getConfig('ecom_search_results');
17911791

17921792
// look for term in full text search
1793-
$sql = "SELECT DISTINCT(p.id) AS id, p.title, model, sef_url, f.id AS fileid, MATCH (p.title,p.model,p.body) AGAINST ('" . $this->params['query'] . "*' IN BOOLEAN MODE) AS score ";
1793+
$sql = "SELECT DISTINCT(p.id) AS id, ANY_VALUE(p.title) as title, ANY_VALUE(model) as model, ANY_VALUE(sef_url) as sef_url, ANY_VALUE(f.id) AS fileid, MATCH (p.title,p.model,p.body) AGAINST ('" . $this->params['query'] . "*' IN BOOLEAN MODE) AS score ";
17941794
$sql .= " FROM " . $db->tableStmt('product') . " AS p LEFT JOIN " .
17951795
$db->tableStmt('content_expFiles') . " AS cef ON p.id=cef.content_id AND cef.content_type IN ('product','eventregistration','donation','giftcard') AND cef.subtype='mainimage' LEFT JOIN " . $db->tableStmt('expFiles') .
17961796
" AS f ON cef.expFiles_id = f.id WHERE ";
@@ -1808,7 +1808,7 @@ public function search() {
18081808
}
18091809

18101810
// look for specific term in fields
1811-
$sql = "SELECT DISTINCT(p.id) AS id, p.title, model, sef_url, f.id AS fileid FROM " . $db->tableStmt('product') . " AS p LEFT JOIN " .
1811+
$sql = "SELECT DISTINCT(p.id) AS id, ANY_VALUE(p.title) as title, ANY_VALUE(model) as model, ANY_VALUE(sef_url) as sef_url, ANY_VALUE(f.id) AS fileid FROM " . $db->tableStmt('product') . " AS p LEFT JOIN " .
18121812
$db->tableStmt('content_expFiles') . " AS cef ON p.id=cef.content_id AND cef.content_type IN ('product','eventregistration','donation','giftcard') AND cef.subtype='mainimage' LEFT JOIN " . $db->tableStmt('expFiles') .
18131813
" AS f ON cef.expFiles_id = f.id WHERE ";
18141814
if (!($user->isAdmin())) $sql .= '(p.active_type=0 OR p.active_type IS NULL OR p.active_type=1) AND ';
@@ -1825,7 +1825,7 @@ public function search() {
18251825
}
18261826

18271827
// look for begins with term in fields
1828-
$sql = "SELECT DISTINCT(p.id) AS id, p.title, model, sef_url, f.id AS fileid FROM " . $db->tableStmt('product') . " AS p LEFT JOIN " .
1828+
$sql = "SELECT DISTINCT(p.id) AS id, ANY_VALUE(p.title) as title, ANY_VALUE(model) as model, ANY_VALUE(sef_url) as sef_url, ANY_VALUE(f.id) AS fileid FROM " . $db->tableStmt('product') . " AS p LEFT JOIN " .
18291829
$db->tableStmt('content_expFiles') . " AS cef ON p.id=cef.content_id AND cef.content_type IN ('product','eventregistration','donation','giftcard') AND cef.subtype='mainimage' LEFT JOIN " . $db->tableStmt('expFiles') .
18301830
" AS f ON cef.expFiles_id = f.id WHERE ";
18311831
if (!($user->isAdmin())) $sql .= '(p.active_type=0 OR p.active_type IS NULL OR p.active_type=1) AND ';
@@ -1859,7 +1859,8 @@ function sortSearch($a, $b) {
18591859
}
18601860
}
18611861
}
1862-
usort($res, 'sortSearch');
1862+
if (!empty($res))
1863+
usort($res, 'sortSearch');
18631864

18641865
$ar = new expAjaxReply(200, gt('Here\'s the items you wanted'), $res);
18651866
$ar->send();

framework/modules/ecommerce/views/store/ecomSearch.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@
5656

5757
<div class="module ecommerce ecom-search">
5858
{form id="autocompsearch" controller=search action=search}
59-
{control type="autocomplete" controller="store" action="search" name="search_string" label=$moduletitle placeholder="Search title or SKU to locate item" schema="title,id,sef_url,expFile,model" searchmodel="product" searchoncol="title,model" maxresults=30 wwidth="80%" jsinject=$callbacks}
59+
{control type="autocomplete" controller="store" action="search" name="search_string" label=$moduletitle placeholder="Search title or SKU to locate item" schema="title,id,sef_url,expFile,model" searchmodel="product" searchoncol="title,model" maxresults=30 wwidth="80%" lwidth="100%" jsinject=$callbacks}
6060
{/form}
6161
</div>

framework/modules/twitter/models/Twitter.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ class Twitter
8181
*/
8282
protected $returnAsArray = true;
8383

84+
public $supports_revisions = false; // simple flag to turn on revisions/approval support for module
85+
public $needs_approval = false; // flag for no approval authority
86+
8487
// class methods
8588
/**
8689
* Default constructor

framework/plugins/function.img.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,17 @@ function smarty_function_img($params,&$smarty)
4949
// set html dimension attributes
5050
$dims = '';
5151
if (isset($params['w']) && isset($params['h']) && isset($params['zc'])) {
52+
if ($params['h'] === '0')
53+
$params['h'] = '';
5254
$dims = ' height="' . $params['h'] . '" width="' . $params['w'] . '"';
53-
} elseif (isset($params['w']) && isset($params['h'])) {
54-
$dims = ' height="'.$params['h'].'" width="'.$params['w'].'"';
55-
} elseif (isset($params['w'])) {
56-
$dims = ' width="'.$params['w'].'"';
57-
} elseif (isset($params['h'])) {
58-
$dims = ' height="'.$params['h'].'"';
55+
} elseif (isset($params['w']) && isset($params['h'])) {
56+
if ($params['h'] === '0')
57+
$params['h'] = '';
58+
$dims = ' height="'.$params['h'].'" width="'.$params['w'].'"';
59+
} elseif (isset($params['w'])) {
60+
$dims = ' width="'.$params['w'].'"';
61+
} elseif (isset($params['h'])) {
62+
$dims = ' height="'.$params['h'].'"';
5963
}
6064

6165
if (!isset($params['q']) && defined('THUMB_QUALITY'))

install/changes/2.7.3.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Version 2.7.2
2+
-------------
3+
### Address issues in v2.7.1 and Prepare for v3.0.2
4+
- compatible with PHP v7.4.x, v8.0.x, v8.1.x and v8.2.x
5+
- deprecated support for PHP v5.6.x, v7.0.x, v7.1.x, v7.2.x and v7.3.x still exists
6+
- initial support for PHP v8.3.x and v8.4.x
7+
- adds better metainfo for forms and records
8+
- adds feature to add dates to an existing event
9+
- adds new blog dates calendar view
10+
- adds invisible reCaptcha option
11+
- adds multi-column form controls
12+
- adds optional titles for containers to help sorting modules
13+
- adds sort items feature to dropdown control form editing
14+
- removes auto updating tables on eql restore to prevent timeouts
15+
- fixes several warnings/issues with PHP v8
16+
- fixes and tweaks many issues in previous versions

install/samples/store.eql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2006,8 +2006,8 @@ RECORD:O:8:"stdClass":23:{s:2:"id";s:1:"4";s:5:"title";s:21:"$10 Shipping Discou
20062006

20072007
TABLE:eventregistration
20082008
TABLEDEF:a:21:{s:2:"id";a:4:{i:0;i:101;i:3;b:1;i:5;b:1;i:4;b:1;}s:9:"eventdate";a:3:{i:0;i:105;i:3;b:0;i:4;b:0;}s:12:"eventenddate";a:3:{i:0;i:105;i:3;b:0;i:4;b:0;}s:15:"event_starttime";a:3:{i:0;i:105;i:3;b:0;i:4;b:0;}s:13:"event_endtime";a:3:{i:0;i:105;i:3;b:0;i:4;b:0;}s:13:"signup_cutoff";a:3:{i:0;i:105;i:3;b:0;i:4;b:0;}s:8:"location";a:4:{i:0;i:102;i:1;i:250;i:3;b:0;i:4;b:0;}s:8:"forms_id";a:4:{i:0;i:101;i:2;s:1:"0";i:3;b:0;i:4;b:1;}s:16:"multi_registrant";a:4:{i:0;i:104;i:2;s:1:"0";i:3;b:0;i:4;b:1;}s:27:"require_terms_and_condition";a:4:{i:0;i:104;i:2;s:1:"0";i:3;b:0;i:4;b:1;}s:19:"terms_and_condition";a:4:{i:0;i:102;i:1;i:65535;i:3;b:0;i:4;b:0;}s:26:"terms_and_condition_toggle";a:3:{i:0;i:103;i:3;b:0;i:4;b:0;}s:17:"earlydiscountdate";a:3:{i:0;i:105;i:3;b:0;i:4;b:0;}s:21:"early_discount_amount";a:3:{i:0;i:106;i:3;b:0;i:4;b:0;}s:25:"early_discount_amount_mod";a:4:{i:0;i:102;i:1;i:1;i:3;b:0;i:4;b:0;}s:15:"use_early_price";a:4:{i:0;i:104;i:2;s:1:"0";i:3;b:0;i:4;b:1;}s:6:"poster";a:4:{i:0;i:101;i:2;s:1:"0";i:3;b:0;i:4;b:1;}s:10:"created_at";a:3:{i:0;i:105;i:3;b:0;i:4;b:0;}s:9:"edited_at";a:3:{i:0;i:105;i:3;b:0;i:4;b:0;}s:13:"location_data";a:4:{i:0;i:102;i:1;i:250;i:3;b:0;i:4;b:0;}s:6:"editor";a:4:{i:0;i:101;i:2;s:1:"0";i:3;b:0;i:4;b:1;}}
2009-
RECORD:O:8:"stdClass":21:{s:2:"id";s:1:"1";s:9:"eventdate";s:10:"1693526400";s:12:"eventenddate";s:10:"1693699200";s:15:"event_starttime";s:5:"32400";s:13:"event_endtime";s:5:"57600";s:13:"signup_cutoff";s:10:"1690911000";s:8:"location";s:10:"The Desert";s:8:"forms_id";s:1:"2";s:16:"multi_registrant";s:1:"0";s:27:"require_terms_and_condition";s:1:"1";s:19:"terms_and_condition";s:106:"<p>I will not blow up or drop any heavy object while at the convention, unless I see the Roadrunner.</p>\r\n";s:26:"terms_and_condition_toggle";s:1:"0";s:17:"earlydiscountdate";s:10:"1688169600";s:21:"early_discount_amount";s:1:"0";s:25:"early_discount_amount_mod";N;s:15:"use_early_price";s:1:"1";s:6:"poster";s:1:"0";s:10:"created_at";s:1:"0";s:9:"edited_at";s:1:"0";s:13:"location_data";s:0:"";s:6:"editor";s:1:"0";}
2010-
RECORD:O:8:"stdClass":21:{s:2:"id";s:1:"2";s:9:"eventdate";s:10:"1693612800";s:12:"eventenddate";s:10:"1693612800";s:15:"event_starttime";s:5:"39600";s:13:"event_endtime";s:5:"43200";s:13:"signup_cutoff";s:10:"1693501200";s:8:"location";s:14:"Main Classroom";s:8:"forms_id";s:1:"1";s:16:"multi_registrant";s:1:"1";s:27:"require_terms_and_condition";s:1:"0";s:19:"terms_and_condition";s:0:"";s:26:"terms_and_condition_toggle";s:1:"0";s:17:"earlydiscountdate";s:10:"1468627200";s:21:"early_discount_amount";s:1:"0";s:25:"early_discount_amount_mod";N;s:15:"use_early_price";s:1:"0";s:6:"poster";s:1:"0";s:10:"created_at";s:1:"0";s:9:"edited_at";s:1:"0";s:13:"location_data";s:0:"";s:6:"editor";s:1:"0";}
2009+
RECORD:O:8:"stdClass":21:{s:2:"id";s:1:"1";s:9:"eventdate";s:10:"1789948800";s:12:"eventenddate";s:10:"1790294400";s:15:"event_starttime";s:5:"32400";s:13:"event_endtime";s:5:"57600";s:13:"signup_cutoff";s:10:"1690911000";s:8:"location";s:10:"The Desert";s:8:"forms_id";s:1:"2";s:16:"multi_registrant";s:1:"0";s:27:"require_terms_and_condition";s:1:"1";s:19:"terms_and_condition";s:106:"<p>I will not blow up or drop any heavy object while at the convention, unless I see the Roadrunner.</p>\r\n";s:26:"terms_and_condition_toggle";s:1:"0";s:17:"earlydiscountdate";s:10:"1788134400";s:21:"early_discount_amount";s:1:"0";s:25:"early_discount_amount_mod";N;s:15:"use_early_price";s:1:"1";s:6:"poster";s:1:"0";s:10:"created_at";s:1:"0";s:9:"edited_at";s:1:"0";s:13:"location_data";s:0:"";s:6:"editor";s:1:"0";}
2010+
RECORD:O:8:"stdClass":21:{s:2:"id";s:1:"2";s:9:"eventdate";s:10:"1790035200";s:12:"eventenddate";s:10:"1790035200";s:15:"event_starttime";s:5:"39600";s:13:"event_endtime";s:5:"43200";s:13:"signup_cutoff";s:10:"1693501200";s:8:"location";s:14:"Main Classroom";s:8:"forms_id";s:1:"1";s:16:"multi_registrant";s:1:"1";s:27:"require_terms_and_condition";s:1:"0";s:19:"terms_and_condition";s:0:"";s:26:"terms_and_condition_toggle";s:1:"0";s:17:"earlydiscountdate";s:10:"1468627200";s:21:"early_discount_amount";s:1:"0";s:25:"early_discount_amount_mod";N;s:15:"use_early_price";s:1:"0";s:6:"poster";s:1:"0";s:10:"created_at";s:1:"0";s:9:"edited_at";s:1:"0";s:13:"location_data";s:0:"";s:6:"editor";s:1:"0";}
20112011

20122012
TABLE:expComments
20132013
TABLEDEF:a:11:{s:2:"id";a:4:{i:0;i:101;i:3;b:1;i:5;b:1;i:4;b:1;}s:4:"name";a:4:{i:0;i:102;i:1;i:200;i:3;b:0;i:4;b:0;}s:5:"email";a:4:{i:0;i:102;i:1;i:250;i:3;b:0;i:4;b:0;}s:7:"website";a:4:{i:0;i:102;i:1;i:250;i:3;b:0;i:4;b:0;}s:4:"body";a:4:{i:0;i:102;i:1;i:65535;i:3;b:0;i:4;b:0;}s:8:"approved";a:4:{i:0;i:104;i:2;s:1:"0";i:3;b:0;i:4;b:1;}s:6:"poster";a:4:{i:0;i:101;i:2;s:1:"0";i:3;b:0;i:4;b:1;}s:10:"created_at";a:3:{i:0;i:105;i:3;b:0;i:4;b:0;}s:9:"edited_at";a:3:{i:0;i:105;i:3;b:0;i:4;b:0;}s:6:"editor";a:4:{i:0;i:101;i:2;s:1:"0";i:3;b:0;i:4;b:1;}s:9:"parent_id";a:4:{i:0;i:101;i:2;s:1:"0";i:3;b:0;i:4;b:1;}}

install/upgrades/upgrade_newusermsg.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ function description()
5252
*/
5353
function needed()
5454
{
55-
$tmp = (empty(USER_REGISTRATION_WELCOME_MSG_HTML) && !empty(USER_REGISTRATION_WELCOME_MSG));
56-
$tmp1 = !defined('USER_REGISTRATION_WELCOME_MSG_HTML');
57-
return (!defined('USER_REGISTRATION_WELCOME_MSG_HTML') || (empty(USER_REGISTRATION_WELCOME_MSG_HTML) && !empty(USER_REGISTRATION_WELCOME_MSG)));
55+
return empty(USER_REGISTRATION_WELCOME_MSG_HTML);
5856
}
5957

6058
/**
@@ -66,7 +64,6 @@ function needed()
6664
function upgrade()
6765
{
6866
expSettings::change('USER_REGISTRATION_WELCOME_MSG_HTML', USER_REGISTRATION_WELCOME_MSG);
69-
7067
return gt('New User Welcome Message was Upgraded.');
7168
}
7269
}

0 commit comments

Comments
 (0)