Skip to content

Commit

Permalink
Use disposable-email-checker v3 via Composer
Browse files Browse the repository at this point in the history
Fixes #22913
  • Loading branch information
vboctor committed Jun 4, 2017
1 parent 3994483 commit 767a947
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 14 deletions.
4 changes: 0 additions & 4 deletions .gitmodules
Expand Up @@ -6,10 +6,6 @@
path = library/phpmailer
url = https://github.com/mantisbt/PHPMailer
branch = mantis
[submodule "library/disposable"]
path = library/disposable
url = https://github.com/mantisbt/disposable_email_checker
branch = mantisbt
[submodule "library/securimage"]
path = library/securimage
url = https://github.com/mantisbt/securimage.git
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Expand Up @@ -4,7 +4,8 @@
"type": "project",
"require": {
"slim/slim": "^3.0",
"guzzlehttp/guzzle": "^6.2"
"guzzlehttp/guzzle": "^6.2",
"vboctor/disposable_email_checker": "^3.0"
},
"license": "GPL v2",
"authors": [
Expand Down
46 changes: 45 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions core.php
Expand Up @@ -67,6 +67,9 @@

ob_start();

# Load Composer autoloader
require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'vendor/autoload.php' );

# Load supplied constants
require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'constant_inc.php' );

Expand Down
6 changes: 1 addition & 5 deletions core/email_api.php
Expand Up @@ -196,11 +196,7 @@ function email_ensure_valid( $p_email ) {
* @return boolean
*/
function email_is_disposable( $p_email ) {
if( !class_exists( 'DisposableEmailChecker' ) ) {
require_lib( 'disposable/disposable.php' );
}

return DisposableEmailChecker::is_disposable_email( $p_email );
return \VBoctor\Email\DisposableEmailChecker::is_disposable_email( $p_email );
}

/**
Expand Down
2 changes: 0 additions & 2 deletions library/README.md
Expand Up @@ -10,7 +10,6 @@ The version and status of each is summarized below:
directory | project | version | status
----------------|-----------------|-----------|---------------
adodb | adodb | 5.20.9 | unpatched [1]
disposable | disposable | 2.1.1 | unpatched [1]
parsedown | parsedown | 1.6.1 | unpatched [1]
phpmailer | PHPMailer | 5.2.22 | unpatched [1]
rssbuilder | RSSBuilder | 2.2.1 | patched [2]
Expand Down Expand Up @@ -47,7 +46,6 @@ Upstream projects
project | URL
----------------|--------------------------------------------------------------------
adodb | http://adodb.sourceforge.net/ - https://github.com/ADOdb/ADOdb
disposable | http://github.com/vboctor/disposable_email_checker
parsedown | https://github.com/erusev/parsedown
phpmailer | https://github.com/PHPMailer/PHPMailer
rssbuilder | http://code.google.com/p/flaimo-php/
Expand Down
1 change: 0 additions & 1 deletion library/disposable
Submodule disposable deleted from 6a7ddc
3 changes: 3 additions & 0 deletions scripts/travis_before_script.sh
Expand Up @@ -130,6 +130,9 @@ chmod 777 config
# wait until server is up
sleep 10

# -----------------------------------------------------------------------------
step "Install Composer Components"
composer install

# -----------------------------------------------------------------------------
step "MantisBT Installation"
Expand Down

0 comments on commit 767a947

Please sign in to comment.