Version Description
(11/09/2019) = * Correction de bugs
Download this release
Release Info
Developer | infomaniak-dev |
Plugin | VOD Infomaniak |
Version | 1.4.2 |
Comparing to | |
See all releases |
Code changes from version 1.4.1 to 1.4.2
- readme.txt +4 -1
- vod.class.php +2 -2
- vod.php +1 -1
- vod.template.php +1 -1
- vod_callback.php +36 -33
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.4.
|
9 |
|
10 |
|
11 |
|
@@ -73,6 +73,9 @@ Si vous ne trouvez pas de solution à votre question, vous pouvez aussi nous con
|
|
73 |
|
74 |
== Changelog ==
|
75 |
|
|
|
|
|
|
|
76 |
= 1.4.1 (10/09/2019) =
|
77 |
* Correction de bugs
|
78 |
|
5 |
Tags: video, manage, infomaniak, vod
|
6 |
Requires at least: 2.8.6
|
7 |
Tested up to: 4.3.1
|
8 |
+
Stable tag: 1.4.2
|
9 |
|
10 |
|
11 |
|
73 |
|
74 |
== Changelog ==
|
75 |
|
76 |
+
= 1.4.2 (11/09/2019) =
|
77 |
+
* Correction de bugs
|
78 |
+
|
79 |
= 1.4.1 (10/09/2019) =
|
80 |
* Correction de bugs
|
81 |
|
vod.class.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
*
|
6 |
* @author Destrem Kevin + Davide Rubini + Arnaud Toullieux
|
7 |
* @link http://statslive.infomaniak.ch/vod/api/
|
8 |
-
* @version 1.4.
|
9 |
* @copyright infomaniak.ch
|
10 |
*/
|
11 |
define('VOD_RIGHT_CONTRIBUTOR', 1);
|
@@ -14,7 +14,7 @@
|
|
14 |
define('VOD_RIGHT_ADMIN', 4);
|
15 |
|
16 |
class EasyVod {
|
17 |
-
public $version = "1.4.
|
18 |
private $local_version;
|
19 |
private $plugin_url;
|
20 |
private $options;
|
5 |
*
|
6 |
* @author Destrem Kevin + Davide Rubini + Arnaud Toullieux
|
7 |
* @link http://statslive.infomaniak.ch/vod/api/
|
8 |
+
* @version 1.4.2
|
9 |
* @copyright infomaniak.ch
|
10 |
*/
|
11 |
define('VOD_RIGHT_CONTRIBUTOR', 1);
|
14 |
define('VOD_RIGHT_ADMIN', 4);
|
15 |
|
16 |
class EasyVod {
|
17 |
+
public $version = "1.4.2";
|
18 |
private $local_version;
|
19 |
private $plugin_url;
|
20 |
private $options;
|
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.4.
|
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.4.2
|
8 |
Author URI: http://infomaniak.com
|
9 |
*/
|
10 |
|
vod.template.php
CHANGED
@@ -728,7 +728,7 @@
|
|
728 |
static function uploadPopup($token, $oFolder, $bResult = false) {
|
729 |
?>
|
730 |
<script type="text/javascript" charset="iso-8859-1"
|
731 |
-
src="
|
732 |
<script type="text/javascript" charset="iso-8859-1"
|
733 |
src="//vod.infomaniak.com/apiUpload/flashUpload.js"></script>
|
734 |
|
728 |
static function uploadPopup($token, $oFolder, $bResult = false) {
|
729 |
?>
|
730 |
<script type="text/javascript" charset="iso-8859-1"
|
731 |
+
src="<?php echo plugins_url('vod-infomaniak/js/swfobject.js'); ?>"></script>
|
732 |
<script type="text/javascript" charset="iso-8859-1"
|
733 |
src="//vod.infomaniak.com/apiUpload/flashUpload.js"></script>
|
734 |
|
vod_callback.php
CHANGED
@@ -10,47 +10,50 @@
|
|
10 |
* @copyright infomaniak.ch
|
11 |
*
|
12 |
*/
|
|
|
13 |
|
14 |
-
|
15 |
-
|
|
|
16 |
|
17 |
-
|
18 |
-
|
19 |
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
|
|
44 |
}
|
45 |
-
}
|
46 |
|
47 |
-
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
|
|
54 |
}
|
55 |
}
|
56 |
}
|
10 |
* @copyright infomaniak.ch
|
11 |
*
|
12 |
*/
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
14 |
|
15 |
+
if (current_user_can('edit_others_posts')) {
|
16 |
+
|
17 |
+
$aOptions = get_option('vod_infomaniak');
|
18 |
|
19 |
+
if ($aOptions['vod_api_callbackKey'] == $_REQUEST['key']) {
|
20 |
+
$db = new EasyVod_db();
|
21 |
|
22 |
+
$iVideo = intval(sanitize_key($_POST['iFileCode']));
|
23 |
+
$iFolder = intval(sanitize_key($_POST['iFolderCode']));
|
24 |
+
$sFileName = sanitize_file_name($_POST['sFileName']);
|
25 |
+
$sServerCode = sanitize_text_field($_POST['sFileServerCode']);
|
26 |
|
27 |
+
if (empty($iVideo) || empty($iFolder)) {
|
28 |
+
die(__("Probleme avec les parametres"));
|
29 |
+
}
|
30 |
+
$oFolder = $db->getFolder($iFolder);
|
31 |
+
if (empty($oFolder) || empty($oFolder->sName)) {
|
32 |
+
die(__("Dossier inconnu"));
|
33 |
+
}
|
34 |
|
35 |
+
// $encodage = array_shift($_POST['files']);
|
36 |
+
$path_tmp = explode('/redirect/' . $aOptions['vod_api_id'] . "/", sanitize_text_field($_POST['files'][0]['sFileUrl']));
|
37 |
+
$sPath = "/" . dirname($path_tmp[1]) . "/";
|
38 |
+
$sExtension = strtoupper(sanitize_text_field($_POST['files'][0]['sExtension']));
|
39 |
+
$iDuration = intval(sanitize_key($_POST['iDuration']));
|
40 |
+
$dUpload = date("Y-m-d H:i:s", strtotime(sanitize_text_field($_POST['dDateUpload'])));
|
41 |
+
|
42 |
+
$oldVideo = $db->get_videos_byCodes($sServerCode, $iFolder);
|
43 |
+
if (!empty($oldVideo)) {
|
44 |
+
foreach ($oldVideo as $video) {
|
45 |
+
$db->delete_video($video->iVideo);
|
46 |
+
}
|
47 |
}
|
|
|
48 |
|
49 |
+
$db->insert_video($iVideo, $iFolder, $sFileName, $sServerCode, $sPath, $sExtension, $iDuration, $dUpload);
|
50 |
|
51 |
+
if (!empty($_POST['sInfo'])) {
|
52 |
+
$sParamInfo = sanitize_text_field($_POST['sInfo']);
|
53 |
+
if (strpos($sParamInfo, "wp_upload_post_") !== false) {
|
54 |
+
$sToken = str_replace("wp_upload_post_", "", $sParamInfo);
|
55 |
+
$db->update_upload($sToken, $iVideo);
|
56 |
+
}
|
57 |
}
|
58 |
}
|
59 |
}
|