Ignore:
Timestamp:
Nov 7, 2020, 5:06:05 PM (3 years ago)
Author:
ddtddt
Message:

[meta] php7.4 Notice

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/meta/initadmin.php

    r31492 r32308  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | meta plugin for Piwigo                                                |
     3// | meta plugin for Piwigo by TEMMII                                      |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2008-2016 ddtddt               http://temmii.com/piwigo/ |
     5// | Copyright(C) 2008-2020 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
     
    6565function metaPadminA() {
    6666  if (isset($_GET['image_id'])){
    67         global $template, $prefixeTable;
    68         $PAED = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ExtendedDescription';"));
    69         if($PAED['state'] == 'active'){
     67        global $template, $prefixeTable, $pwg_loaded_plugins;
     68        if (isset($pwg_loaded_plugins['ExtendedDescription'])){
    7069          $template->assign('useED',1);
    7170    }else{
     
    125124function metaAadminA(){
    126125  if (isset($_GET['cat_id'])) {
    127         global $template, $prefixeTable;
    128         $PAED = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ExtendedDescription';"));
    129         if($PAED['state'] == 'active'){
     126        global $template, $prefixeTable, $pwg_loaded_plugins;
     127        if (isset($pwg_loaded_plugins['ExtendedDescription'])){
    130128          $template->assign('useED',1);
    131     }else{
    132       $template->assign('useED',0);
    133     }
     129        }else{
     130          $template->assign('useED',0);
     131        }
    134132        $query = 'SELECT id,metaKeycat,metadescat FROM ' . meta_cat_TABLE . ' WHERE id = ' . $_GET['cat_id'] . ';';
    135133        $result = pwg_query($query);
Note: See TracChangeset for help on using the changeset viewer.