Guest User

Untitled

a guest
Jan 22nd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.54 KB | None | 0 0
  1. Error: Fatal error: Declaration of vB_Attachment_Store_vBGlossary_GlossaryEntry::verify_permissions() must be compatible with that of vB_Attachment_Store::verify_permissions() in /packages/vbglossary/attach/glossaryentry.php on line 363
  2.  
  3.  
  4. class vB_Attachment_Store_vBGlossary_GlossaryEntry extends vB_Attachment_Store
  5.  
  6. From vB_Attachment_Store class:
  7.     /**
  8.     * Verify permissions
  9.     *
  10.     * @return   bool
  11.     */
  12.     abstract protected function verify_permissions($info = array());
  13.  
  14. From vB_Attachment_Store_vBGlossary_GlossaryEntry:
  15. class vB_Attachment_Store_vBGlossary_GlossaryEntry extends vB_Attachment_Store
  16. {
  17.     /**
  18.     * Entryinfo
  19.     *
  20.     * @var  array
  21.     */
  22.     protected $entryinfo = array();
  23.  
  24.     /**
  25.     * Verifies permissions to attach content to entries
  26.     *
  27.     * @return   boolean
  28.     */
  29.     public function verify_permissions()
  30.     {
  31.         global $show;
  32.  
  33.         require_once(DIR . '/includes/functions_vbglossar.php');
  34.        
  35.         $this->values['id'] = intval($this->values['id']) ? intval($this->values['id']) : intval($this->values['entryid']);
  36.  
  37.         if ($this->values['id'])
  38.         {
  39.             $this->entryinfo = fetch_entryinfo($this->values['id']);
  40.             $this->contentid = $this->values['id'];
  41.             $this->userinfo = fetch_userinfo($this->entryinfo['userid']);
  42.             cache_permissions($this->userinfo);
  43.         }
  44.         else
  45.         {
  46.             if ($userid = intval($this->values['u']) AND $userinfo = fetch_userinfo($userid))
  47.             {
  48.                 $this->userinfo = $userinfo;
  49.                 cache_permissions($this->userinfo);
  50.             }
  51.             else
  52.             {
  53.                 $this->userinfo = $this->registry->userinfo;
  54.             }
  55.         }
  56.  
  57.         if (
  58.             !($this->registry->userinfo['permissions']['groupvbglossar'] & $this->registry->bf_ugp_groupvbglossar['canentervbglossar'])
  59.             OR
  60.             !($this->registry->userinfo['permissions']['groupvbglossar'] & $this->registry->bf_ugp_groupvbglossar['canviewentry'])
  61.             OR
  62.             !($this->registry->userinfo['permissions']['groupvbglossar'] & $this->registry->bf_ugp_groupvbglossar['canattachtoentry'])
  63.         )
  64.         {
  65.             // no permission to view glossar, glossar entries or attachments
  66.             return false;
  67.         }
  68.  
  69.         if (
  70.             !($this->registry->userinfo['permissions']['groupvbglossar'] & $this->registry->bf_ugp_groupvbglossar['canadminvbglossar'])
  71.             AND
  72.             !$this->entryinfo['status']
  73.         )
  74.         {
  75.             // no permission to moderate and entry is moderated
  76.             return false;
  77.         }
  78.        
  79.         if (!$this->entryinfo['groupshow'])
  80.         {
  81.             if (!array_intersect(fetch_membergroupids_array($this->registry->userinfo), explode(',', $this->attachmentinfo['groupshowlist'])))
  82.             {
  83.                 // usergroup is not allowed to access category
  84.                 return -1;
  85.             }
  86.         }
  87.  
  88.         return true;
  89.     }
Add Comment
Please, Sign In to add comment