Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ExpressionEngine/ExpressionEngine…
Browse files Browse the repository at this point in the history
… into master
  • Loading branch information
Forest Lovewood committed Sep 30, 2020
2 parents ad2f33d + 10c1d63 commit 98f8974
Show file tree
Hide file tree
Showing 81 changed files with 1,840 additions and 1,613 deletions.
8 changes: 7 additions & 1 deletion AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ If an entry is incorrect or duplicated, add or correct the entry in `.mailmap` i

- Aaron Gustafson <[email protected]>
- Adrienne L. Travis <[email protected]>
- Andy McCormick <[email protected]>
- Barry Cogan <[email protected]>
- Benoit Lemay <[email protected]>
- Bill MacKenty <[email protected]>
- Brandon Jones <[email protected]>
- Brian Litzinger <[email protected]>
Expand All @@ -14,9 +16,11 @@ If an entry is incorrect or duplicated, add or correct the entry in `.mailmap` i
- Derek Jones <[email protected]>
- Douglas Black <[email protected]>
- Gareth Davies <[email protected]>
- Gary Reckard <[email protected]>
- Greg Aker <[email protected]>
- Greg Ferrell <[email protected]>
- Hop Studios <[email protected]>
- Jace Richardson <[email protected]>
- Jack McDade <[email protected]>
- James Mathias <[email protected]>
- Jeremy Worboys <[email protected]>
Expand All @@ -33,17 +37,19 @@ If an entry is incorrect or duplicated, add or correct the entry in `.mailmap` i
- Pascal Kriete <[email protected]>
- Quinn Chrzan <[email protected]>
- Rein de Vries <[email protected]>
- Richard John-Paul <[email protected]>
- Rick Ellis <[email protected]>
- Rob Sanchez <[email protected]>
- Robin Sowell <[email protected]>
- Roger Hughes <[email protected]>
- Ryan McAllen <[email protected]>
- Seth Croston Barber <[email protected]>
- Wes Baker <[email protected]>
- Yuri Salimovskiy <[email protected]>
- Zeke Aasman <[email protected]>
- 🤖 (bots/scripts/importers) <devnull@localhost>

![](https://www.gravatar.com/avatar/323311bb4cc5af1a4b2c5c26b4cfc5a3.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/28fd78ec7f39c9667c57ddcda6b83351.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/fd949d0a7e4991516b70f53e1cd32687.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/3ffe6ce41e3bf074f3be0b58f82ebf29.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/44ef19fe2f0d9f5047279a585663fd67.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/069965463531f082c67fa8087eff0b05.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/3e9d57bf5c8481eca26817339b1a3bd2.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/29abcce86d2506d61ac673588eb8a7d1.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/516e0d6461814f8a47c7fa649359e153.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/bcf753700280546563d4a604e3a71060.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/5ca14d9704b3eee3260127bfcc6ecf42.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/91d827f8f25f63b8112790de73a1d938.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/06fa48390d4d830b110af14955586a93.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/799094e096097741819df942dd34345b.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/742b52b2e6a0c30489c5920a1a74b16e.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/d97bb7470a585d1f835e0830c01f0b20.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/5cd8a4f8e479da78fc66fbb2367399d4.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/957b0b58ae039db05df43e46c1e0b333.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/4725a112987ef504b80b3ae726038c60.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/aa4bb05aae17dee79b899506017a39ee.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/b3aee19cfd195316fa300ba8e57e6fd2.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/135073ed48a5ff8fb6fcda84df0b5723.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/52b49de838ac68b9b5f7c9694a03bc2b.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/82c0460c0faad308ffe33968c614f539.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/fef8890999449994c34b5f22d29e510d.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/9628e9a39607342152d295ff42d4a415.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/130f8285c0fc74b49f6aa04cc5b14967.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/a2b77333c38e0478272301b78691c0f9.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/1d157c5426bdf80e829b92446c930291.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/18b650e3eb0eb19d390b600b89c54a08.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/ac84e65458272d4d56a9f0e989633522.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/5dab46346a7e1ddf461a71c6b05101c0.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/92508cc5ce3ed75dd47b4d508b0de8bd.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/9950bab22f7c1baaf19484f54cec5717.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/a3913e91ee062726d4e6d1eca9071d0b.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/aef020d45cf114662488d9e3b9d5b1da.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/ec72c77b2a1e31882eaafa9c888c84eb.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/94260e052fa9c0df9e87428d07c2966a.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/531770a99fef15a89bfee23e44851a09.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/1e2785ef5c8fd9fdf4fb3e01a2328b11.jpg?r=pg&d=robohash )
![](https://www.gravatar.com/avatar/323311bb4cc5af1a4b2c5c26b4cfc5a3.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/68e8b768c20fbd21f72918c5baaacdae.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/28fd78ec7f39c9667c57ddcda6b83351.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/74a1e3cd4b1ad5fc087e0e7704ed1850.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/02553319e74f65aefabb110a9d83b121.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/fd949d0a7e4991516b70f53e1cd32687.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/3ffe6ce41e3bf074f3be0b58f82ebf29.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/44ef19fe2f0d9f5047279a585663fd67.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/069965463531f082c67fa8087eff0b05.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/3e9d57bf5c8481eca26817339b1a3bd2.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/29abcce86d2506d61ac673588eb8a7d1.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/516e0d6461814f8a47c7fa649359e153.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/bcf753700280546563d4a604e3a71060.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/5ca14d9704b3eee3260127bfcc6ecf42.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/91d827f8f25f63b8112790de73a1d938.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/6202c1bd8201c22252d0c3a901185dd0.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/06fa48390d4d830b110af14955586a93.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/799094e096097741819df942dd34345b.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/742b52b2e6a0c30489c5920a1a74b16e.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/cd9f870be16a27dafb29a7243e306b6f.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/5113a79fa6bfde5c7e37186b530de617.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/d97bb7470a585d1f835e0830c01f0b20.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/5cd8a4f8e479da78fc66fbb2367399d4.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/957b0b58ae039db05df43e46c1e0b333.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/4725a112987ef504b80b3ae726038c60.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/aa4bb05aae17dee79b899506017a39ee.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/b3aee19cfd195316fa300ba8e57e6fd2.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/135073ed48a5ff8fb6fcda84df0b5723.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/52b49de838ac68b9b5f7c9694a03bc2b.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/82c0460c0faad308ffe33968c614f539.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/fef8890999449994c34b5f22d29e510d.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/9628e9a39607342152d295ff42d4a415.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/130f8285c0fc74b49f6aa04cc5b14967.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/a2b77333c38e0478272301b78691c0f9.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/1d157c5426bdf80e829b92446c930291.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/18b650e3eb0eb19d390b600b89c54a08.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/ac84e65458272d4d56a9f0e989633522.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/ce6dc7ab6baeb4f0e530683eb19e327a.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/5dab46346a7e1ddf461a71c6b05101c0.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/92508cc5ce3ed75dd47b4d508b0de8bd.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/9950bab22f7c1baaf19484f54cec5717.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/a3913e91ee062726d4e6d1eca9071d0b.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/aef020d45cf114662488d9e3b9d5b1da.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/ec72c77b2a1e31882eaafa9c888c84eb.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/94260e052fa9c0df9e87428d07c2966a.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/209b0eb58c406de491f9f7f8039781a8.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/e45a32284d21e406e0abe5bc701d7e3a.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/531770a99fef15a89bfee23e44851a09.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/1e2785ef5c8fd9fdf4fb3e01a2328b11.jpg?r=pg&d=robohash )

Additionally, the following contributed source code prior to 2009 when this repository was created:

Expand Down
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,26 @@ ExpressionEngine _can_ run on PHP 5.6+ and MySQL 5.5.3+. For full details and a

## How To Install

### If downloading from [expressionengine.com](https://expressionengine.com/)
1. Create a database
2. Upload the files
2. Unzip download and upload the files to your site's root directory
3. Verify file permissions
4. Point your browser to `/admin.php` and run the Installation Wizard.

Read [Installing ExpressionEngine](https://docs.expressionengine.com/latest/installation/installation.html) in the User Guide for full instructions, tips, and post-install best practices.

Note: If you're installing from the repository, you will also need to:
### If you're installing from the repository:
1. Create a database
2. Clone repo into your site's root directory or clone locally and upload files.
3. Verify file permissions
4. add an empty config file, e.g. `touch system/user/config/config.php`
5. route requests to the installer app instead of the main app by changing `EE_INSTALL_MODE` to `TRUE` in [.env.php](.env.php). You can change this back when you're done.
6. Point your browser to `/admin.php` and run the Installation Wizard.

### Finding Previous Versions
To install/download previous versions of ExpressionEngine navigate to [Releases](https://github.com/ExpressionEngine/ExpressionEngine/releases) and download the Source Code (.zip or .tar.gz) from the from the release you wish to download.

- add an empty config file, e.g. `touch system/user/config/config.php`
- route requests to the installer app instead of the main app by changing `EE_INSTALL_MODE` to `TRUE` in [.env.php](.env.php). You can change this back when you're done.
*Note: You may need to follow the instructions above, "If you're installing from the repository", after downloading.*

## How to Get Started

Expand All @@ -45,12 +54,12 @@ There are many ways you get get involved and contribute to the ExpressionEngine

## Copyright / License Notice

The ExpressionEngine project is copyright (c) 2003-2019 EllisLab, Inc ([https://ellislab.com](https://ellislab.com)) and is licensed under Apache License, Version 2.0. This project contains subcomponents with separate copyright and license terms, all of which are fully FOSS and compatible with Apache-2.0.
The ExpressionEngine project is copyright (c) 2003-2020 Packet Tide, LLC ([https://packettide.com](https://packettide.com)) and is licensed under Apache License, Version 2.0. This project contains subcomponents with separate copyright and license terms, all of which are fully FOSS and compatible with Apache-2.0.

Complete license terms and copyright information can be found in [LICENSE.txt](LICENSE.txt) in the root of this repository.

"ExpressionEngine" is a registered trademark of EllisLab Corp. in the United States and around the world. Refer to EllisLab's [Trademark Use Policy](https://ellislab.com/trademark-use-policy) for access to logos and acceptable use.
"ExpressionEngine" is a registered trademark of Packet Tide, LLC. in the United States and around the world. Refer to ExpressionEngines's [Trademark Use Policy](https://expressionengine.com/about/trademark-use-policy) for access to logos and acceptable use.

> ![EECONF logo](https://eeconf.com/assets/img/logo-2019-red.png)
> ![EECONF 2020](https://www.eeconf.com/uploads/general/eeconf-2020-logo-flyers-orange.png)
>
> The community powered EE CONF is coming to Minneapolis October 2-4. The conference features two days of top-notch speakers in two tracks plus four optional hands-on workshops. For more information visit [eeconf.com](https://eeconf.com)
> The community powered EE CONF is coming to Philadelphia October 8-9. Join the ExpressionEngine community in a completely new and improved 2-day “summit” style conference in expert-led round table discussions to tackle your most challenging web development projects and business headaches. For more information visit [eeconf.com](https://eeconf.com)
6 changes: 4 additions & 2 deletions eetools
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ git archive --format=tar -o ee.tar $STASH_NAME
# Absolutely have to have the git folder available in the archive?
#tar --append --file=ee.tar .git

IMAGE_NAME="ellislab/eecms-test:old"
IMAGE_NAME="eecms_test:latest"
VOLUME_ID=`docker volume create`
HELPER_CONTAINER_ID=`docker create -v $VOLUME_ID:/app $IMAGE_NAME /bin/true`

Expand Down Expand Up @@ -48,7 +48,9 @@ else

((STATUS+=$?))

mkdir /tmp/artifacts > /dev/null
if [ ! -d /tmp/artifacts ]; then
mkdir /tmp/artifacts > /dev/null
fi
docker cp $HELPER_CONTAINER_ID:/app/artifacts/. /tmp/artifacts
fi

Expand Down
2 changes: 1 addition & 1 deletion system/ee/EllisLab/Addons/channel/mod.channel.php
Original file line number Diff line number Diff line change
Expand Up @@ -2871,7 +2871,7 @@ public function parse_channel_entries($per_row_callback = NULL)

private function getExtraData($query_result)
{
$where = "WHERE t.entry_id IN (" . implode(ee()->session->cache['channel']['entry_ids'], ',') . ")";
$where = "WHERE t.entry_id IN (" . implode(',', ee()->session->cache['channel']['entry_ids']) . ")";

foreach ($this->chunks as $chunk)
{
Expand Down
6 changes: 5 additions & 1 deletion system/ee/EllisLab/Addons/comment/mod.comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -584,9 +584,13 @@ public function entries()
{
++$count;

$absoluteCount = (isset($pagination))
? $pagination->offset + $count
: $count;

$vars[] = array_merge(
[
'absolute_count' => $pagination->offset + $count,
'absolute_count' => $absoluteCount,
'absolute_results' => $total_results,
'absolute_reverse_count' => $total_results - $count + 1,
'count' => $count,
Expand Down
4 changes: 3 additions & 1 deletion system/ee/EllisLab/Addons/consent/mod.consent.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ public function submitConsent()
else
{
$this->setAlertFlashdata('success', $message);
$return = ee('Encrypt')->decode(ee()->input->post('RET'));
$return = ee()->input->post('RET')
? ee('Encrypt')->decode(ee()->input->post('RET'))
: ee()->functions->form_backtrack(1);
ee()->functions->redirect(ee()->functions->create_url($return));
}
}
Expand Down
10 changes: 2 additions & 8 deletions system/ee/EllisLab/Addons/forum/mcp.forum.php
Original file line number Diff line number Diff line change
Expand Up @@ -3958,15 +3958,9 @@ private function installSpecialtyTemplates($site_id)
*/
private function isGdAvailable()
{
if (! extension_loaded('gd'))
{
if (! function_exists('dl') OR ! @dl('gd.so'))
{
return FALSE;
}
}

return TRUE;
return extension_loaded('gd');

}

/**
Expand Down
13 changes: 12 additions & 1 deletion system/ee/EllisLab/Addons/pages/tab.pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function display($channel_id, $entry_id = '')
public function validate($entry, $values)
{
$validator = ee('Validation')->make(array(
'pages_template_id' => 'validTemplate',
'pages_template_id' => 'whenURI[pages_uri]|required|validTemplate',
'pages_uri' => 'validURI|validSegmentCount|notDuplicated',
));

Expand All @@ -149,6 +149,17 @@ public function validate($entry, $values)
$validator->defineRule('validSegmentCount', $this->makeValidSegmentCountRule());
$validator->defineRule('notDuplicated', $this->makeNotDuplicatedRule($entry));

$data = $_POST;
$validator->defineRule('whenURI', function($key, $value, $parameters, $rule) use ($data)
{
if ($data['pages__pages_uri'] == '' OR $data['pages__pages_uri'] == lang('example_uri')) {
return $rule->skip();
}

return TRUE;

});

return $validator->validate($values);
}

Expand Down
14 changes: 10 additions & 4 deletions system/ee/EllisLab/Addons/rte/libraries/Rte_lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,14 @@ private function save_toolset()
* @param bool If TRUE, includes tools that are for the control panel only
* @return string The JS needed to embed the RTE
*/
public function build_js($toolset_id, $selector, $include = array(), $cp_only = FALSE)
public function build_js($toolset_id, $selector, $include = [], $cp_only = FALSE)
{
ee()->load->model(array('rte_toolset_model','rte_tool_model'));

if( ! is_array($include) ) {
$include = [];
}

// no toolset specified?
if ( ! $toolset_id)
{
Expand Down Expand Up @@ -330,9 +334,11 @@ public function build_js($toolset_id, $selector, $include = array(), $cp_only =
'libraries' => array(
'plugin' => array('wysihat')
)
);
);

$include['jquery_ui'] = isset($include['jquery_ui']) ? $include['jquery_ui'] : false;

if ($include['jquery_ui'])
if (array_key_exists('jquery_ui', $include) && $include['jquery_ui'])
{
$bits['libraries']['ui'] = array('core', 'widget');
}
Expand Down Expand Up @@ -405,7 +411,7 @@ public function build_js($toolset_id, $selector, $include = array(), $cp_only =
$js .= '
var EE = ' . json_encode(ee()->javascript->global_vars) . ';';

if ($include['jquery'])
if (array_key_exists('jquery', $include) && $include['jquery'])
{
$js .= '
var j = document.createElement("script");
Expand Down
2 changes: 1 addition & 1 deletion system/ee/EllisLab/Addons/rte/mcp.rte.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public function prefs_update()
ee()->form_validation->set_rules(
'rte_default_toolset_id',
lang('default_toolset'),
'required|is_numeric|enum[' . implode($toolids, ',') . ']'
'required|is_numeric|enum[' . implode(',', $toolids) . ']'
);

if (ee()->form_validation->run())
Expand Down
2 changes: 2 additions & 0 deletions system/ee/EllisLab/Addons/rte/mod.rte.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public function get_js()
$include = explode(',', ee()->input->get('include', TRUE));

// all allowed includes default to FALSE
$includes = [];

foreach (array('jquery', 'jquery_ui') as $allowed)
{
$includes[$allowed] = in_array($allowed, $include);
Expand Down
16 changes: 5 additions & 11 deletions system/ee/EllisLab/Addons/simple_commerce/mod.simple_commerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -556,18 +556,14 @@ function curl_process($url)

foreach ($_POST as $key => $value)
{
// str_replace("\n", "\r\n", $value)
// put line feeds back to CR+LF as that's how PayPal sends them out
// otherwise multi-line data will be rejected as INVALID
// Note: get_magic_quotes_gpc FALSE as of PHP 5.4.0

$stripped = str_replace("\n", "\r\n", $value);
if (version_compare(PHP_VERSION, '5.4', '<=') && get_magic_quotes_gpc()) {
$stripped = stripslashes($stripped);
}

$postdata .= "&$key=".urlencode($stripped);

}

$ch=curl_init();
$ch = curl_init();
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,FALSE);
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POST,1);
Expand Down Expand Up @@ -616,10 +612,8 @@ function fsockopen_process($url)
// otherwise multi-line data will be rejected as INVALID
// Note: get_magic_quotes_gpc FALSE as of PHP 5.4.0
$stripped = str_replace("\n", "\r\n", $value);
if (version_compare(PHP_VERSION, '5.4', '<=') && get_magic_quotes_gpc()) {
$stripped = stripslashes($stripped);
}
$postdata .= "&$key=".urlencode($stripped);

}

$info = '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,28 @@ class ASCIIPrintable implements Vectorizer {
*/
public function vectorize($source)
{

ee()->load->helper('multibyte');

$non_ascii = preg_match_all('/[^\x20-\x7E]/u', $source, $matches);
$length = mb_strlen($source);

$length = ee_mb_strlen($source);

if ($length !== 0)
{

$ratio = $non_ascii / $length;

}
else
{

$ratio = 1;

}

return $ratio;

}

}
Expand Down
Loading

0 comments on commit 98f8974

Please sign in to comment.