VOD Infomaniak - Version 1.3.12

Version Description

(09/01/2017) = * La librairy Mcrypt tant dclare comme DEPRECATED depuis PHP 7.1, utilisation de OpenSSL si cette dernire est supporte. * Cette mise jour impose une dconnexion/reconnexion. La dconnexion est force la mise jour, l'utilisateur devra ressaisir son mot de passe de connection l'API infomaniak.

Download this release

Release Info

Developer infomaniak-dev
Plugin Icon wp plugin VOD Infomaniak
Version 1.3.12
Comparing to
See all releases

Code changes from version 1.3.11 to 1.3.12

Files changed (4) hide show
  1. readme.txt +5 -1
  2. vod.class.php +35 -11
  3. vod.php +1 -1
  4. vod.template.php +2 -2
readme.txt CHANGED
@@ -5,7 +5,7 @@ Plugin Name: Vod Infomaniak
5
  Tags: video, manage, infomaniak, vod
6
  Requires at least: 2.8.6
7
  Tested up to: 4.3.1
8
- Stable tag: 1.3.11
9
 
10
 
11
 
@@ -72,6 +72,10 @@ Si vous ne trouvez pas de solution à votre question, vous pouvez aussi nous con
72
 
73
  == Changelog ==
74
 
 
 
 
 
75
  = 1.3.11 (15/09/2016) =
76
  * Modification pour meilleurs prise en compte du responsive (mise a jour 2)
77
 
5
  Tags: video, manage, infomaniak, vod
6
  Requires at least: 2.8.6
7
  Tested up to: 4.3.1
8
+ Stable tag: 1.3.12
9
 
10
 
11
 
72
 
73
  == Changelog ==
74
 
75
+ = 1.3.12 (09/01/2017) =
76
+ * La librairy Mcrypt étant déclarée comme DEPRECATED depuis PHP 7.1, utilisation de OpenSSL si cette dernière est supportée.
77
+ * Cette mise à jour impose une déconnexion/reconnexion. La déconnexion est forcée à la mise à jour, l'utilisateur devra ressaisir son mot de passe de connection à l'API infomaniak.
78
+
79
  = 1.3.11 (15/09/2016) =
80
  * Modification pour meilleurs prise en compte du responsive (mise a jour 2)
81
 
vod.class.php CHANGED
@@ -5,17 +5,16 @@
5
  *
6
  * @author Destrem Kevin + Davide Rubini + Arnaud Toullieux
7
  * @link http://statslive.infomaniak.ch/vod/api/
8
- * @version 1.3.11
9
  * @copyright infomaniak.ch
10
  */
11
-
12
  define('VOD_RIGHT_CONTRIBUTOR', 1);
13
  define('VOD_RIGHT_AUTHOR', 2);
14
  define('VOD_RIGHT_EDITOR', 3);
15
  define('VOD_RIGHT_ADMIN', 4);
16
 
17
  class EasyVod {
18
- public $version = "1.3.11";
19
  private $local_version;
20
  private $plugin_url;
21
  private $options;
@@ -31,11 +30,16 @@
31
  $this->auto_sync = true;
32
  $this->auto_sync_delay = 3600;
33
  define("SALT", "2saLsNw4s4MCG9BVjXCKxvZA");
 
 
 
 
 
 
34
  }
35
-
36
  function add_filters_and_hooks() {
37
- register_activation_hook(__FILE__, array(&$this, 'install_db'));
38
 
 
39
  add_action('plugins_loaded', array(&$this, 'update_db'));
40
 
41
  load_plugin_textdomain('vod_infomaniak', FALSE, basename(dirname(__FILE__)) . '/languages');
@@ -45,6 +49,14 @@
45
  add_filter('the_content', array(&$this, 'check'), 100);
46
  add_filter('the_excerpt', array(&$this, 'check'), 100);
47
 
 
 
 
 
 
 
 
 
48
  if (is_admin()) {
49
  add_action('admin_menu', array(&$this, 'add_menu_items'));
50
  add_action('edit_form_advanced', array(&$this, 'buildForm'));
@@ -933,14 +945,26 @@
933
  return new vod_api($this->options['vod_api_login'], $sPassword, $this->options['vod_api_id']);
934
  }
935
 
936
- function encrypt($text) {
937
- return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, SALT, $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));
938
- }
939
 
940
- function decrypt($text) {
941
- return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, SALT, base64_decode($text), MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)));
 
 
 
942
  }
943
 
 
 
 
 
 
 
 
 
 
 
944
  function vod_template_redirect() {
945
  global $wp_query;
946
  $vod_page = isset($wp_query->query_vars['vod_page']) ? $wp_query->query_vars['vod_page'] : "";
@@ -969,7 +993,7 @@
969
  var $db_table_video;
970
  var $db_table_playlist;
971
  var $db_table_upload;
972
- var $db_version = "1.0.5";
973
 
974
  function __construct() {
975
  global $wpdb;
5
  *
6
  * @author Destrem Kevin + Davide Rubini + Arnaud Toullieux
7
  * @link http://statslive.infomaniak.ch/vod/api/
8
+ * @version 1.3.12
9
  * @copyright infomaniak.ch
10
  */
 
11
  define('VOD_RIGHT_CONTRIBUTOR', 1);
12
  define('VOD_RIGHT_AUTHOR', 2);
13
  define('VOD_RIGHT_EDITOR', 3);
14
  define('VOD_RIGHT_ADMIN', 4);
15
 
16
  class EasyVod {
17
+ public $version = "1.3.12";
18
  private $local_version;
19
  private $plugin_url;
20
  private $options;
30
  $this->auto_sync = true;
31
  $this->auto_sync_delay = 3600;
32
  define("SALT", "2saLsNw4s4MCG9BVjXCKxvZA");
33
+ // Declare variables needed for encryption
34
+ if (extension_loaded('openssl')) {
35
+ $GLOBALS['encryptCipher'] = 'aes-256-cfb';
36
+ $GLOBALS['encryptPassword'] = 'xx187rsd!ze$ze11ld8';
37
+ $GLOBALS['encryptIv'] = '4zEz7z5!4a1s2e$s';
38
+ }
39
  }
 
40
  function add_filters_and_hooks() {
 
41
 
42
+ register_activation_hook(__FILE__, array(&$this, 'install_db'));
43
  add_action('plugins_loaded', array(&$this, 'update_db'));
44
 
45
  load_plugin_textdomain('vod_infomaniak', FALSE, basename(dirname(__FILE__)) . '/languages');
49
  add_filter('the_content', array(&$this, 'check'), 100);
50
  add_filter('the_excerpt', array(&$this, 'check'), 100);
51
 
52
+ if (get_site_option('vod_db_version') == "1.0.5"){
53
+ $this->options['vod_api_connected'] = 'off';
54
+ update_option('vod_infomaniak', $this->options);
55
+ update_option("vod_db_version",$this->db_version);
56
+ }
57
+
58
+
59
+
60
  if (is_admin()) {
61
  add_action('admin_menu', array(&$this, 'add_menu_items'));
62
  add_action('edit_form_advanced', array(&$this, 'buildForm'));
945
  return new vod_api($this->options['vod_api_login'], $sPassword, $this->options['vod_api_id']);
946
  }
947
 
948
+ function encrypt($text){
949
+ global $encryptIv, $encryptCipher, $encryptPassword;
 
950
 
951
+ if (extension_loaded('openssl')) {
952
+ return openssl_encrypt($text, $encryptCipher, $encryptPassword, 0, $encryptIv);
953
+ } else {
954
+ return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, SALT, $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));
955
+ }
956
  }
957
 
958
+ function decrypt($text){
959
+ global $encryptIv, $encryptCipher, $encryptPassword;
960
+
961
+ if (extension_loaded('openssl')) {
962
+ return openssl_decrypt($text, $encryptCipher, $encryptPassword, 0, $encryptIv);
963
+ } else {
964
+ return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, SALT, base64_decode($text), MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)));
965
+ }
966
+ }
967
+
968
  function vod_template_redirect() {
969
  global $wp_query;
970
  $vod_page = isset($wp_query->query_vars['vod_page']) ? $wp_query->query_vars['vod_page'] : "";
993
  var $db_table_video;
994
  var $db_table_playlist;
995
  var $db_table_upload;
996
+ var $db_version = "1.0.6";
997
 
998
  function __construct() {
999
  global $wpdb;
vod.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin URI: http://wordpress.org/extend/plugins/vod-infomaniak/
5
  Description: Easily embed and manage videos from Infomaniak VOD in your posts, comments and RSS feeds. You need an Infomaniak VOD account to use this plugin.
6
  Author: Infomaniak Staff
7
- Version: 1.3.11
8
  Author URI: http://infomaniak.com
9
  */
10
 
4
  Plugin URI: http://wordpress.org/extend/plugins/vod-infomaniak/
5
  Description: Easily embed and manage videos from Infomaniak VOD in your posts, comments and RSS feeds. You need an Infomaniak VOD account to use this plugin.
6
  Author: Infomaniak Staff
7
+ Version: 1.3.12
8
  Author URI: http://infomaniak.com
9
  */
10
 
vod.template.php CHANGED
@@ -728,9 +728,9 @@
728
  static function uploadPopup($token, $oFolder, $bResult = false) {
729
  ?>
730
  <script type="text/javascript" charset="iso-8859-1"
731
- src="http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js"></script>
732
  <script type="text/javascript" charset="iso-8859-1"
733
- src="http://vod.infomaniak.com/apiUpload/flashUpload.js"></script>
734
 
735
  <h2><?php _e("Utilitaire d'envoi de video", 'vod_infomaniak'); ?></h2>
736
  <p>
728
  static function uploadPopup($token, $oFolder, $bResult = false) {
729
  ?>
730
  <script type="text/javascript" charset="iso-8859-1"
731
+ src="//ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js"></script>
732
  <script type="text/javascript" charset="iso-8859-1"
733
+ src="//vod.infomaniak.com/apiUpload/flashUpload.js"></script>
734
 
735
  <h2><?php _e("Utilitaire d'envoi de video", 'vod_infomaniak'); ?></h2>
736
  <p>