Skip to content

Commit

Permalink
修复上一个版本中的重大问题(fix #1)
Browse files Browse the repository at this point in the history
  • Loading branch information
wuxianucw committed Dec 8, 2019
1 parent c602ed5 commit 03ebb02
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* @package PartiallyPassword
* @author wuxianucw
* @version 2.0.0
* @version 2.0.1
* @link https://ucw.moe
*/
class PartiallyPassword_Plugin implements Typecho_Plugin_Interface{
Expand Down Expand Up @@ -149,6 +149,11 @@ private static function getRequestPassword($cid,$pid,$currentCid=-1){
* @return string
*/
public static function render($value,Widget_Abstract_Contents $contents){
if(defined('__TYPECHO_ADMIN__')){
if($value['authorId']!=$contents->widget('Widget_User')->uid&&!$contents->widget('Widget_User')->pass('editor',true))
$value['hidden']=true;
return $value;
}
if($value['type']!='page'&&$value['type']!='post')return $value;
$fields=array();
$db=Typecho_Db::get();
Expand Down

0 comments on commit 03ebb02

Please sign in to comment.