Skip to content

Commit

Permalink
sms_to_wordpress: use autoload to load php-ixr classes (kalkun-sms#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
tenzap authored Feb 11, 2022
1 parent 47f4b28 commit 1fe3f3e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions application/plugins/sms_to_wordpress/sms_to_wordpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,12 @@ function sms_to_wordpress($sms)
$CI =& get_instance();
$CI->load->model('sms_to_wordpress/sms_to_wordpress_model', 'plugin_model');

require_once 'vendor/kissifrot/php-ixr/src/Client/Client.php';
require_once 'vendor/kissifrot/php-ixr/src/Message/Error.php';
require_once 'vendor/kissifrot/php-ixr/src/Message/Message.php';
require_once 'vendor/kissifrot/php-ixr/src/Request/Request.php';
require_once 'vendor/kissifrot/php-ixr/src/DataType/Value.php';

// if wp url exist
$wp = $CI->plugin_model->get_wp_url_by_phone($number);
if (is_array($wp))
{
// Load IXR classes
require_once FCPATH . '/vendor/autoload.php';
$client = new IXR\Client\Client($wp['wp_url']);

// Post parameter
Expand Down

0 comments on commit 1fe3f3e

Please sign in to comment.