Skip to content

Commit

Permalink
Merge pull request #8 from mecachisenros/minor-fixes
Browse files Browse the repository at this point in the history
Minor fixes
  • Loading branch information
christianwach authored Feb 4, 2020
2 parents c756dc2 + f55356e commit 23906c6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions wp-rest/Autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ private function register_autoloader() {
*/
private function autoload( $class_name ) {

if ( false === strpos( $class_name, $this->namespace ) ) return;

$parts = explode( '\\', $class_name );

if ( $this->namespace !== $parts[0] ) return;

// remove namespace and join class path
$class_path = str_replace( '_', '-', implode( DIRECTORY_SEPARATOR, array_slice( $parts, 1 ) ) );

Expand Down
2 changes: 1 addition & 1 deletion wp-rest/Controller/Rest.php
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ protected function get_wp_user( int $contact_id ) {

// If this fails, get it from config.
if ( $domain_id === 0 ) {
$domain_id = CRM_Core_Config::domainID();
$domain_id = \CRM_Core_Config::domainID();
}

// Call API.
Expand Down
2 changes: 2 additions & 0 deletions wp-rest/Controller/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ protected function parse_url( $url, $params ) {

}

if ( strpos( $url, 'mailto' ) ) $url = strstr( $url, 'mailto' );

return apply_filters( 'civi_wp_rest/controller/url/parsed_url', $url, $params );

}
Expand Down

0 comments on commit 23906c6

Please sign in to comment.