Skip to content

Commit 7e3c139

Browse files
committed
fix the bug of refresh urls or dirs
fix the bug of pfop operation
1 parent 0e82528 commit 7e3c139

File tree

2 files changed

+16
-26
lines changed

2 files changed

+16
-26
lines changed

src/Qiniu/Cdn/CdnManager.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct(Auth $auth)
2424
*/
2525
public function refreshUrls(array $urls)
2626
{
27-
return $this->refreshUrlsAndDirs($urls, null);
27+
return $this->refreshUrlsAndDirs($urls, array());
2828
}
2929

3030
/**
@@ -35,7 +35,7 @@ public function refreshUrls(array $urls)
3535
*/
3636
public function refreshDirs(array $dirs)
3737
{
38-
return $this->refreshUrlsAndDirs(null, $dirs);
38+
return $this->refreshUrlsAndDirs(array(), $dirs);
3939
}
4040

4141
/**
@@ -165,7 +165,7 @@ private function post($url, $body)
165165
* @param string $encryptKey 时间戳防盗链密钥
166166
* @param string $durationInSeconds 链接的有效期(以秒为单位)
167167
*
168-
* @return string 带鉴权信息的资源外链,参考 examples/cdn_manager_timestamp_antileech.php 代码
168+
* @return string 带鉴权信息的资源外链,参考 examples/cdn_timestamp_antileech.php 代码
169169
*/
170170
public static function createTimestampAntiLeechUrl($rawUrl, $encryptKey, $durationInSeconds)
171171
{

src/Qiniu/Processing/PersistentFop.php

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,16 @@ final class PersistentFop
1818
*/
1919
private $auth;
2020

21-
/**
22-
* @var 操作资源所在空间
23-
*/
24-
private $bucket;
25-
26-
/**
27-
* @var 多媒体处理队列,详见 https://portal.qiniu.com/mps/pipeline
28-
*/
29-
private $pipeline;
30-
31-
/**
32-
* @var 持久化处理结果通知URL
33-
*/
34-
private $notify_url;
35-
36-
/**
37-
* @var boolean 是否强制覆盖已有的重名文件
38-
*/
39-
private $force;
21+
/*
22+
* @var 配置对象,Config 对象
23+
* */
24+
private $config;
4025

4126

4227
public function __construct($auth, $config = null)
4328
{
4429
$this->auth = $auth;
45-
if ($config = null) {
30+
if ($config == null) {
4631
$this->config = new Config();
4732
} else {
4833
$this->config = $config;
@@ -51,10 +36,14 @@ public function __construct($auth, $config = null)
5136

5237
/**
5338
* 对资源文件进行异步持久化处理
39+
* @param $bucket 资源所在空间
40+
* @param $key 待处理的源文件
41+
* @param $fops string|array 待处理的pfop操作,多个pfop操作以array的形式传入。
42+
* eg. avthumb/mp3/ab/192k, vframe/jpg/offset/7/w/480/h/360
43+
* @param $pipeline 资源处理队列
44+
* @param $notify_url 处理结果通知地址
45+
* @param $force 是否强制执行一次新的指令
5446
*
55-
* @param $key 待处理的源文件
56-
* @param $fops string|array 待处理的pfop操作,多个pfop操作以array的形式传入。
57-
* eg. avthumb/mp3/ab/192k, vframe/jpg/offset/7/w/480/h/360
5847
*
5948
* @return array 返回持久化处理的persistentId, 和返回的错误。
6049
*
@@ -91,6 +80,7 @@ public function execute($bucket, $key, $fops, $pipeline = null, $notify_url = nu
9180
public function status($id)
9281
{
9382
$scheme = "http://";
83+
9484
if ($this->config->useHTTPS === true) {
9585
$scheme = "https://";
9686
}

0 commit comments

Comments
 (0)