VOD Infomaniak - Version 1.2.2

Version Description

(14/04/2015) = * Suppresion des donnes du plugin lors de sa desinstallation * Fix bug quand on ajoute une vido avec lien direct * Fix problmes d'affichage de paramtres avec certains caractres spciaux * Mise a jours des traductions

Download this release

Release Info

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

Code changes from version 1.2.1 to 1.2.2

languages/vod_infomaniak-de_DE.mo CHANGED
Binary file
languages/vod_infomaniak-de_DE.po CHANGED
@@ -8,14 +8,14 @@ msgstr ""
8
  "Project-Id-Version: vod\n"
9
  "Report-Msgid-Bugs-To: \n"
10
  "POT-Creation-Date: 2014-04-17 11:15+0100\n"
11
- "PO-Revision-Date: 2014-05-12 16:25+0100\n"
12
  "Last-Translator: Uli Böhm <uli@traduc.de>\n"
13
  "Language-Team: www.traduc.de\n"
14
  "Language: de_DE\n"
15
  "MIME-Version: 1.0\n"
16
  "Content-Type: text/plain; charset=UTF-8\n"
17
  "Content-Transfer-Encoding: 8bit\n"
18
- "X-Generator: Poedit 1.6.5\n"
19
  "X-Poedit-KeywordsList: _e;__\n"
20
  "X-Poedit-Basepath: .\n"
21
  "X-Poedit-SearchPath-0: /Users/daviderubini/Projets/LOCAL/wordpress/wp-"
@@ -244,7 +244,7 @@ msgstr ""
244
  "\t\t\t\tWir raten aus Sicherheitsgründen dringend dazu, in Ihrer Infomaniak-"
245
  "Verwaltungskonsole einen neuen Benutzer anzulegen, der nur begrenzte Rechte "
246
  "für die API besitzt.<br/>\n"
247
- "\t\t\t\tWeitere Informationen finden Sie im Menü \"Einstellungen -> Api & "
248
  "Callback\" Ihrer VOD-Verwaltung."
249
 
250
  #: /Users/daviderubini/Projets/LOCAL/wordpress/wp-content/plugins/vod-infomaniak/vod.template.php:355
8
  "Project-Id-Version: vod\n"
9
  "Report-Msgid-Bugs-To: \n"
10
  "POT-Creation-Date: 2014-04-17 11:15+0100\n"
11
+ "PO-Revision-Date: 2015-04-16 09:56+0100\n"
12
  "Last-Translator: Uli Böhm <uli@traduc.de>\n"
13
  "Language-Team: www.traduc.de\n"
14
  "Language: de_DE\n"
15
  "MIME-Version: 1.0\n"
16
  "Content-Type: text/plain; charset=UTF-8\n"
17
  "Content-Transfer-Encoding: 8bit\n"
18
+ "X-Generator: Poedit 1.7.5\n"
19
  "X-Poedit-KeywordsList: _e;__\n"
20
  "X-Poedit-Basepath: .\n"
21
  "X-Poedit-SearchPath-0: /Users/daviderubini/Projets/LOCAL/wordpress/wp-"
244
  "\t\t\t\tWir raten aus Sicherheitsgründen dringend dazu, in Ihrer Infomaniak-"
245
  "Verwaltungskonsole einen neuen Benutzer anzulegen, der nur begrenzte Rechte "
246
  "für die API besitzt.<br/>\n"
247
+ "\t\t\t\tWeitere Informationen finden Sie im Menü \"Erweiterungen -> Api & "
248
  "Callback\" Ihrer VOD-Verwaltung."
249
 
250
  #: /Users/daviderubini/Projets/LOCAL/wordpress/wp-content/plugins/vod-infomaniak/vod.template.php:355
languages/vod_infomaniak-en_US.mo CHANGED
Binary file
languages/vod_infomaniak-en_US.po CHANGED
@@ -8,16 +8,16 @@ msgstr ""
8
  "Project-Id-Version: vod\n"
9
  "Report-Msgid-Bugs-To: \n"
10
  "POT-Creation-Date: 2014-04-17 11:14+0100\n"
11
- "PO-Revision-Date: 2014-05-12 09:42+0100\n"
12
  "Last-Translator: \n"
13
- "Language-Team: LANGUAGE <LL@li.org>\n"
14
  "Language: fr_FR\n"
15
  "MIME-Version: 1.0\n"
16
  "Content-Type: text/plain; charset=UTF-8\n"
17
  "Content-Transfer-Encoding: 8bit\n"
18
- "X-Generator: Poedit 1.6.5\n"
19
  "X-Poedit-KeywordsList: _e;__\n"
20
  "X-Poedit-Basepath: .\n"
 
21
  "X-Poedit-SearchPath-0: /Users/daviderubini/Projets/LOCAL/wordpress/wp-"
22
  "content/plugins/vod-infomaniak\n"
23
 
@@ -123,7 +123,6 @@ msgstr "Playlist identifier"
123
  #  NC NEW-TRANSLATION
124
  #: /Users/daviderubini/Projets/LOCAL/wordpress/wp-content/plugins/vod-infomaniak/vod.template.php:45
125
  #: /Users/daviderubini/Projets/LOCAL/wordpress/wp-content/plugins/vod-infomaniak/vod.template.php:83
126
- #, fuzzy
127
  msgid "Rechercher ..."
128
  msgstr "Search..."
129
 
@@ -260,8 +259,8 @@ msgstr ""
260
  "\t\t\t\tFor security reasons it is strongly recommended that you created a "
261
  "new dedicated user in your Infomaniak control panel with permissions "
262
  "restricted to API access only. <br/>\n"
263
- "\t\t\t\tFor more information please go to the \"Configuration -> Api & "
264
- "Callback\" section of your VOD control panel."
265
 
266
  #: /Users/daviderubini/Projets/LOCAL/wordpress/wp-content/plugins/vod-infomaniak/vod.template.php:355
267
  #: /Users/daviderubini/Projets/LOCAL/wordpress/wp-content/plugins/vod-infomaniak/vod.template.php:819
8
  "Project-Id-Version: vod\n"
9
  "Report-Msgid-Bugs-To: \n"
10
  "POT-Creation-Date: 2014-04-17 11:14+0100\n"
11
+ "PO-Revision-Date: 2015-04-16 09:55+0100\n"
12
  "Last-Translator: \n"
 
13
  "Language: fr_FR\n"
14
  "MIME-Version: 1.0\n"
15
  "Content-Type: text/plain; charset=UTF-8\n"
16
  "Content-Transfer-Encoding: 8bit\n"
17
+ "X-Generator: Poedit 1.7.5\n"
18
  "X-Poedit-KeywordsList: _e;__\n"
19
  "X-Poedit-Basepath: .\n"
20
+ "Language-Team: \n"
21
  "X-Poedit-SearchPath-0: /Users/daviderubini/Projets/LOCAL/wordpress/wp-"
22
  "content/plugins/vod-infomaniak\n"
23
 
123
  #  NC NEW-TRANSLATION
124
  #: /Users/daviderubini/Projets/LOCAL/wordpress/wp-content/plugins/vod-infomaniak/vod.template.php:45
125
  #: /Users/daviderubini/Projets/LOCAL/wordpress/wp-content/plugins/vod-infomaniak/vod.template.php:83
 
126
  msgid "Rechercher ..."
127
  msgstr "Search..."
128
 
259
  "\t\t\t\tFor security reasons it is strongly recommended that you created a "
260
  "new dedicated user in your Infomaniak control panel with permissions "
261
  "restricted to API access only. <br/>\n"
262
+ "\t\t\t\tFor more information please go to the \"Extensions -> Api & Callback"
263
+ "\" section of your VOD control panel."
264
 
265
  #: /Users/daviderubini/Projets/LOCAL/wordpress/wp-content/plugins/vod-infomaniak/vod.template.php:355
266
  #: /Users/daviderubini/Projets/LOCAL/wordpress/wp-content/plugins/vod-infomaniak/vod.template.php:819
languages/vod_infomaniak-es_ES.mo CHANGED
Binary file
languages/vod_infomaniak-es_ES.po CHANGED
@@ -8,15 +8,15 @@ msgstr ""
8
  "Project-Id-Version: vod infomaniak\n"
9
  "Report-Msgid-Bugs-To: \n"
10
  "POT-Creation-Date: 2012-08-07 10:44+0200\n"
11
- "PO-Revision-Date: 2014-05-12 09:42+0100\n"
12
  "Last-Translator: j\n"
13
- "Language-Team: LANGUAGE <LL@li.org>\n"
14
  "MIME-Version: 1.0\n"
15
  "Content-Type: text/plain; charset=UTF-8\n"
16
  "Content-Transfer-Encoding: 8bit\n"
17
- "X-Generator: Poedit 1.6.5\n"
18
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
  "Language: es\n"
 
20
 
21
  #: vod.template.php:78
22
  msgid "1. Selection du dossier"
@@ -564,7 +564,7 @@ msgstr ""
564
  "\t\t\t\tPor razones de seguridad, se aconseja crear un nuevo usuario "
565
  "dedicado en su admin infomaniak únicamente con derechos restringidos en la "
566
  "API.<br/>\n"
567
- "\t\t\t\tPara más información, acceda al apartado \"Configuración -> Api & "
568
  "Devolución de llamada\" de su administración VOD."
569
 
570
  #: vod.template.php:386 vod.template.php:889
8
  "Project-Id-Version: vod infomaniak\n"
9
  "Report-Msgid-Bugs-To: \n"
10
  "POT-Creation-Date: 2012-08-07 10:44+0200\n"
11
+ "PO-Revision-Date: 2015-04-16 09:55+0100\n"
12
  "Last-Translator: j\n"
 
13
  "MIME-Version: 1.0\n"
14
  "Content-Type: text/plain; charset=UTF-8\n"
15
  "Content-Transfer-Encoding: 8bit\n"
16
+ "X-Generator: Poedit 1.7.5\n"
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
  "Language: es\n"
19
+ "Language-Team: \n"
20
 
21
  #: vod.template.php:78
22
  msgid "1. Selection du dossier"
564
  "\t\t\t\tPor razones de seguridad, se aconseja crear un nuevo usuario "
565
  "dedicado en su admin infomaniak únicamente con derechos restringidos en la "
566
  "API.<br/>\n"
567
+ "\t\t\t\tPara más información, acceda al apartado \"Extensiones -> Api & "
568
  "Devolución de llamada\" de su administración VOD."
569
 
570
  #: vod.template.php:386 vod.template.php:889
languages/vod_infomaniak-fr_FR.mo CHANGED
Binary file
languages/vod_infomaniak-fr_FR.po CHANGED
@@ -8,16 +8,16 @@ msgstr ""
8
  "Project-Id-Version: vod\n"
9
  "Report-Msgid-Bugs-To: \n"
10
  "POT-Creation-Date: 2014-04-17 11:11+0100\n"
11
- "PO-Revision-Date: 2014-04-25 11:30+0100\n"
12
  "Last-Translator: \n"
13
- "Language-Team: LANGUAGE <LL@li.org>\n"
14
  "Language: fr_FR\n"
15
  "MIME-Version: 1.0\n"
16
  "Content-Type: text/plain; charset=UTF-8\n"
17
  "Content-Transfer-Encoding: 8bit\n"
18
- "X-Generator: Poedit 1.6.4\n"
19
  "X-Poedit-KeywordsList: _e;__\n"
20
  "X-Poedit-Basepath: .\n"
 
21
  "X-Poedit-SearchPath-0: /Users/daviderubini/Projets/LOCAL/wordpress/wp-"
22
  "content/plugins/vod-infomaniak\n"
23
 
@@ -246,7 +246,7 @@ msgstr ""
246
  "un nouvel utilisateur dédié dans votre admin infomaniak avec uniquement des "
247
  "droits restreints sur l'API.<br/>\n"
248
  "\t\t\t\tPour plus d'information, veuillez vous rendre dans votre console "
249
- "d'administration VOD/AOD, sous CONFIGURATION puis sous l'onglet API."
250
 
251
  #: /Users/daviderubini/Projets/LOCAL/wordpress/wp-content/plugins/vod-infomaniak/vod.template.php:355
252
  #: /Users/daviderubini/Projets/LOCAL/wordpress/wp-content/plugins/vod-infomaniak/vod.template.php:819
@@ -783,7 +783,6 @@ msgid "Probleme avec les parametres"
783
  msgstr "Problème avec les paramètres"
784
 
785
  #: /Users/daviderubini/Projets/LOCAL/wordpress/wp-content/plugins/vod-infomaniak/vod_callback.php:30
786
- #, fuzzy
787
  msgid "Dossier inconnu"
788
  msgstr "Dossier d'envoi"
789
 
8
  "Project-Id-Version: vod\n"
9
  "Report-Msgid-Bugs-To: \n"
10
  "POT-Creation-Date: 2014-04-17 11:11+0100\n"
11
+ "PO-Revision-Date: 2015-04-16 09:55+0100\n"
12
  "Last-Translator: \n"
 
13
  "Language: fr_FR\n"
14
  "MIME-Version: 1.0\n"
15
  "Content-Type: text/plain; charset=UTF-8\n"
16
  "Content-Transfer-Encoding: 8bit\n"
17
+ "X-Generator: Poedit 1.7.5\n"
18
  "X-Poedit-KeywordsList: _e;__\n"
19
  "X-Poedit-Basepath: .\n"
20
+ "Language-Team: \n"
21
  "X-Poedit-SearchPath-0: /Users/daviderubini/Projets/LOCAL/wordpress/wp-"
22
  "content/plugins/vod-infomaniak\n"
23
 
246
  "un nouvel utilisateur dédié dans votre admin infomaniak avec uniquement des "
247
  "droits restreints sur l'API.<br/>\n"
248
  "\t\t\t\tPour plus d'information, veuillez vous rendre dans votre console "
249
+ "d'administration VOD/AOD, sous Extensions puis sous l'onglet API."
250
 
251
  #: /Users/daviderubini/Projets/LOCAL/wordpress/wp-content/plugins/vod-infomaniak/vod.template.php:355
252
  #: /Users/daviderubini/Projets/LOCAL/wordpress/wp-content/plugins/vod-infomaniak/vod.template.php:819
783
  msgstr "Problème avec les paramètres"
784
 
785
  #: /Users/daviderubini/Projets/LOCAL/wordpress/wp-content/plugins/vod-infomaniak/vod_callback.php:30
 
786
  msgid "Dossier inconnu"
787
  msgstr "Dossier d'envoi"
788
 
languages/vod_infomaniak-it_IT.mo CHANGED
Binary file
languages/vod_infomaniak-it_IT.po CHANGED
@@ -8,15 +8,15 @@ msgstr ""
8
  "Project-Id-Version: vod_infomaniak-it_IT\n"
9
  "Report-Msgid-Bugs-To: \n"
10
  "POT-Creation-Date: 2012-08-07 10:44+0200\n"
11
- "PO-Revision-Date: 2014-05-12 09:41+0100\n"
12
  "Last-Translator: \n"
13
- "Language-Team: LANGUAGE <LL@li.org>\n"
14
  "MIME-Version: 1.0\n"
15
  "Content-Type: text/plain; charset=UTF-8\n"
16
  "Content-Transfer-Encoding: 8bit\n"
17
- "X-Generator: Poedit 1.6.5\n"
18
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
  "Language: it\n"
 
20
 
21
  #: vod.template.php:78
22
  msgid "1. Selection du dossier"
@@ -562,8 +562,8 @@ msgstr ""
562
  "\t\t\t\tPer ragioni di sicurezza, si consiglia di creare un nuovo utente "
563
  "dedicato nella vostra admin Infomaniak che abbia unicamente dei diritti "
564
  "limitati sull'API.<br/>\n"
565
- "\t\t\t\tPer maggiori informazioni, andare in \"Configurazione -> Api e "
566
- "callback\" della vostra amministrazione VOD."
567
 
568
  #: vod.template.php:386 vod.template.php:889
569
  msgid "Precedents Envois"
8
  "Project-Id-Version: vod_infomaniak-it_IT\n"
9
  "Report-Msgid-Bugs-To: \n"
10
  "POT-Creation-Date: 2012-08-07 10:44+0200\n"
11
+ "PO-Revision-Date: 2015-04-16 09:55+0100\n"
12
  "Last-Translator: \n"
 
13
  "MIME-Version: 1.0\n"
14
  "Content-Type: text/plain; charset=UTF-8\n"
15
  "Content-Transfer-Encoding: 8bit\n"
16
+ "X-Generator: Poedit 1.7.5\n"
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
  "Language: it\n"
19
+ "Language-Team: \n"
20
 
21
  #: vod.template.php:78
22
  msgid "1. Selection du dossier"
562
  "\t\t\t\tPer ragioni di sicurezza, si consiglia di creare un nuovo utente "
563
  "dedicato nella vostra admin Infomaniak che abbia unicamente dei diritti "
564
  "limitati sull'API.<br/>\n"
565
+ "\t\t\t\tPer maggiori informazioni, andare in \"Estensioni -> Api e callback"
566
+ "\" della vostra amministrazione VOD."
567
 
568
  #: vod.template.php:386 vod.template.php:889
569
  msgid "Precedents Envois"
languages/vod_infomaniak.pot CHANGED
@@ -505,7 +505,7 @@ msgid ""
505
  "un nouvel utilisateur dedie dans votre admin infomaniak avec uniquement des "
506
  "droits restreints sur l'API.<br/>\n"
507
  "\t\t\t\tPour plus d'information, veuillez vous rendre dans la partie "
508
- "\"Configuration -> Api & Callback\" de votre administration VOD."
509
  msgstr ""
510
 
511
  #: vod.template.php:386 vod.template.php:889
505
  "un nouvel utilisateur dedie dans votre admin infomaniak avec uniquement des "
506
  "droits restreints sur l'API.<br/>\n"
507
  "\t\t\t\tPour plus d'information, veuillez vous rendre dans la partie "
508
+ "\"Extensions -> Api & Callback\" de votre administration VOD."
509
  msgstr ""
510
 
511
  #: vod.template.php:386 vod.template.php:889
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.1
8
- Stable tag: 1.2.1
9
 
10
 
11
 
@@ -72,8 +72,14 @@ Si vous ne trouvez pas de solution à votre question, vous pouvez aussi nous con
72
 
73
  == Changelog ==
74
 
 
 
 
 
 
 
75
  = 1.2.1 (08/04/2015) =
76
- * Fix bug token sKey affiché en double dans url et mauvaise interprétation dans un iframe car paramètre appelé en "?" et non "&"
77
 
78
  = 1.2 (08/01/2015) =
79
  * Vérification de la compatiblité avec Wordpress 4.1
5
  Tags: video, manage, infomaniak, vod
6
  Requires at least: 2.8.6
7
  Tested up to: 4.1
8
+ Stable tag: 1.2.2
9
 
10
 
11
 
72
 
73
  == Changelog ==
74
 
75
+ = 1.2.2 (14/04/2015) =
76
+ * Suppresion des données du plugin lors de sa desinstallation
77
+ * Fix bug quand on ajoute une vidéo avec lien direct
78
+ * Fix problèmes d'affichage de paramètres avec certains caractères spéciaux
79
+ * Mise a jours des traductions
80
+
81
  = 1.2.1 (08/04/2015) =
82
+ * Fix bug vidéo avec token
83
 
84
  = 1.2 (08/01/2015) =
85
  * Vérification de la compatiblité avec Wordpress 4.1
uninstall.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Classe permettant de supprimer tables et options du plugin VOD lors de sa desinstallation dans wp admin
4
+ * Note: il existe un register_uninstall_hook dans vod.class.php mais celui-ci ne se d�clenche pas, du moins
5
+ * pas avec la configuration actuel, dans tous les cas, lors de la desinstallation, wp d�clenchera uninstall.php
6
+ *
7
+ * En cas de probl�mes ou de questions, veuillez contacter support-vod-wordpress@infomaniak.ch
8
+ *
9
+ * @author VOD TEAM
10
+ * @link http://statslive.infomaniak.ch/vod/api/
11
+ * @version 1.2.2
12
+ * @copyright infomaniak.ch
13
+ *
14
+ */
15
+
16
+ require_once('vod.class.php');
17
+
18
+ if (!defined('WP_UNINSTALL_PLUGIN'))
19
+ exit();
20
+
21
+ $db = new EasyVod_db();
22
+
23
+ delete_option('vod_db_version');
24
+
25
+ global $wpdb;
26
+
27
+ $wpdb->query("DROP TABLE IF EXISTS " . $db->db_table_player);
28
+ $wpdb->query("DROP TABLE IF EXISTS " . $db->db_table_folder);
29
+ $wpdb->query("DROP TABLE IF EXISTS " . $db->db_table_video);
30
+ $wpdb->query("DROP TABLE IF EXISTS " . $db->db_table_playlist);
31
+ $wpdb->query("DROP TABLE IF EXISTS " . $db->db_table_upload);
32
+
33
+ ?>
vod.class.php CHANGED
@@ -5,7 +5,7 @@
5
  *
6
  * @author Destrem Kevin + Davide Rubini
7
  * @link http://statslive.infomaniak.ch/vod/api/
8
- * @version 1.2.1
9
  * @copyright infomaniak.ch
10
  *
11
  */
@@ -15,7 +15,7 @@
15
  define('VOD_RIGHT_ADMIN', 4);
16
 
17
  class EasyVod {
18
- public $version = "1.0";
19
  private $local_version;
20
  private $plugin_url;
21
  private $options;
@@ -35,7 +35,7 @@
35
 
36
  function add_filters_and_hooks() {
37
  register_activation_hook(__FILE__, array(&$this, 'install_db'));
38
- register_deactivation_hook(__FILE__, array(&$this, 'uninstall_db'));
39
  add_action('plugins_loaded', array(&$this, 'update_db'));
40
 
41
  load_plugin_textdomain('vod_infomaniak', FALSE, basename(dirname(__FILE__)) . '/languages');
@@ -135,7 +135,9 @@
135
  }
136
  }
137
 
138
- function uninstall_db() { }
 
 
139
 
140
  function add_menu_items() {
141
  if ($this->auto_sync) {
@@ -280,6 +282,7 @@
280
  }
281
  }
282
 
 
283
  $width = empty($aTagParam['width']) ? $this->options['width'] : intval($aTagParam['width']);
284
  $height = empty($aTagParam['height']) ? $this->options['height'] : intval($aTagParam['height']);
285
  return "<div style='background: url(\"" . plugins_url('vod-infomaniak/img/topbg10.png') . "\") repeat;border-radius: 8px; text-align:center; color: #DDDDDD; font-weight: bold; background-color: #222222; width: " . $width . "px; height: " . $height . "px;'>
@@ -290,13 +293,30 @@
290
  </div>";
291
  }
292
 
293
- function tag($file, $params, $high = 'v', $time = '', $side = 0) {
 
 
 
 
 
 
 
 
 
294
 
 
 
 
 
295
  //Recuperation des parametres optionnels des tags
296
  $aTagParam = array();
297
  if (!empty($params)) {
298
- $params = html_entity_decode($params);
299
- $params = strtolower(str_replace(array("'", '"', '’'), "", $params));
 
 
 
 
300
  $aList = split(" ", $params);
301
  foreach ($aList as $param) {
302
  if (strpos($param, "=") !== false) {
@@ -325,14 +345,14 @@
325
  $player = empty($aTagParam['player']) ? $this->options['player'] : intval($aTagParam['player']);
326
  $autoplay = empty($aTagParam['autoplay']) ? $this->options['autoplay'] : intval($aTagParam['autoplay']);
327
  $loop = empty($aTagParam['loop']) ? $this->options['loop'] : intval($aTagParam['loop']);
328
- $width = empty($aTagParam['width']) ? $this->options['width'] : intval($aTagParam['width']);
329
- $height = empty($aTagParam['height']) ? $this->options['height'] : intval($aTagParam['height']);
330
 
331
  if (is_numeric($file)) {
332
  $video_url = $sUrl . "?url=&playlist=" . $file;
333
  } else {
334
  //Build de l'url finale
335
- if (strpos($file, "http://") === false) {
336
  $sFile = $sAccountBase . "/" . $file;
337
  } else {
338
  $sFile = $file;
@@ -996,6 +1016,16 @@
996
  update_option("vod_db_version", $this->db_version);
997
  }
998
 
 
 
 
 
 
 
 
 
 
 
999
  /*
1000
  * Gestion des players
1001
  */
5
  *
6
  * @author Destrem Kevin + Davide Rubini
7
  * @link http://statslive.infomaniak.ch/vod/api/
8
+ * @version 1.2.2
9
  * @copyright infomaniak.ch
10
  *
11
  */
15
  define('VOD_RIGHT_ADMIN', 4);
16
 
17
  class EasyVod {
18
+ public $version = "1.2.2";
19
  private $local_version;
20
  private $plugin_url;
21
  private $options;
35
 
36
  function add_filters_and_hooks() {
37
  register_activation_hook(__FILE__, array(&$this, 'install_db'));
38
+ register_uninstall_hook(__FILE__, array(&$this, 'uninstall_db'));
39
  add_action('plugins_loaded', array(&$this, 'update_db'));
40
 
41
  load_plugin_textdomain('vod_infomaniak', FALSE, basename(dirname(__FILE__)) . '/languages');
135
  }
136
  }
137
 
138
+ function uninstall_db() {
139
+ $this->db->uninstall_db();
140
+ }
141
 
142
  function add_menu_items() {
143
  if ($this->auto_sync) {
282
  }
283
  }
284
 
285
+
286
  $width = empty($aTagParam['width']) ? $this->options['width'] : intval($aTagParam['width']);
287
  $height = empty($aTagParam['height']) ? $this->options['height'] : intval($aTagParam['height']);
288
  return "<div style='background: url(\"" . plugins_url('vod-infomaniak/img/topbg10.png') . "\") repeat;border-radius: 8px; text-align:center; color: #DDDDDD; font-weight: bold; background-color: #222222; width: " . $width . "px; height: " . $height . "px;'>
293
  </div>";
294
  }
295
 
296
+ function removeSmartQuotes($sContent){
297
+ $sContent = htmlentities($sContent);
298
+ $sContent = str_replace(array(
299
+ "'", '"', '’',
300
+ '&amp;laquo;', '&amp;raquo;',
301
+ '&amp;lsquo;', '&amp;rsquo;',
302
+ '&amp;prime;', '&amp;Prime;',
303
+ '&amp;nbsp;',),
304
+ '"', $sContent);
305
+ $sContent = preg_replace('/"+/mi', '"', $sContent); // remplace les xquotes
306
 
307
+ return $sContent;
308
+ }
309
+
310
+ function tag($file, $params, $high = 'v', $time = '', $side = 0) {
311
  //Recuperation des parametres optionnels des tags
312
  $aTagParam = array();
313
  if (!empty($params)) {
314
+
315
+ $params = $this->removeSmartQuotes($params); // remplace les xquotes
316
+
317
+ $params = html_entity_decode($params);
318
+ $params = strtolower(str_replace('"', "", $params));
319
+
320
  $aList = split(" ", $params);
321
  foreach ($aList as $param) {
322
  if (strpos($param, "=") !== false) {
345
  $player = empty($aTagParam['player']) ? $this->options['player'] : intval($aTagParam['player']);
346
  $autoplay = empty($aTagParam['autoplay']) ? $this->options['autoplay'] : intval($aTagParam['autoplay']);
347
  $loop = empty($aTagParam['loop']) ? $this->options['loop'] : intval($aTagParam['loop']);
348
+ $width = empty($aTagParam['width']) ? $this->options['width'] : trim($aTagParam['width']);
349
+ $height = empty($aTagParam['height']) ? $this->options['height'] : trim($aTagParam['height']);
350
 
351
  if (is_numeric($file)) {
352
  $video_url = $sUrl . "?url=&playlist=" . $file;
353
  } else {
354
  //Build de l'url finale
355
+ if (!preg_match('/^http(s)?:\/\//', $file) ) {
356
  $sFile = $sAccountBase . "/" . $file;
357
  } else {
358
  $sFile = $file;
1016
  update_option("vod_db_version", $this->db_version);
1017
  }
1018
 
1019
+ function uninstall_db() {
1020
+ global $wpdb;
1021
+ $wpdb->query("DROP TABLE IF EXISTS " . $this->db_table_player);
1022
+ $wpdb->query("DROP TABLE IF EXISTS " . $this->db_table_folder);
1023
+ $wpdb->query("DROP TABLE IF EXISTS " . $this->db_table_video);
1024
+ $wpdb->query("DROP TABLE IF EXISTS " . $this->db_table_playlist);
1025
+ $wpdb->query("DROP TABLE IF EXISTS " . $this->db_table_upload);
1026
+ delete_option('vod_db_version');
1027
+ }
1028
+
1029
  /*
1030
  * Gestion des players
1031
  */
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.2.1
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.2.2
8
  Author URI: http://infomaniak.com
9
  */
10