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/main.inc.php

    r31491 r32308  
    1010
    1111// +-----------------------------------------------------------------------+
    12 // | meta plugin for Piwigo                                                |
    13 // +-----------------------------------------------------------------------+
    14 // | Copyright(C) 2008-2016 ddtddt               http://temmii.com/piwigo/ |
     12// | meta plugin for Piwigo by TEMMII                                      |
     13// +-----------------------------------------------------------------------+
     14// | Copyright(C) 2008-2020 ddtddt               http://temmii.com/piwigo/ |
    1515// +-----------------------------------------------------------------------+
    1616// | This program is free software; you can redistribute it and/or modify  |
     
    6363
    6464function Change_Meta(){
    65   global $template;
     65  global $template, $pwg_loaded_plugins;
    6666  $template->set_prefilter('header', 'upmata');
    67   $PAED = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ExtendedDescription';"));
    68   if ($PAED['state'] == 'active')
     67  if (isset($pwg_loaded_plugins['ExtendedDescription'])){
    6968    add_event_handler('AP_render_content', 'get_user_language_desc');
     69  }
    7070}
    7171
     
    7777
    7878function add_meta(){
    79   global $template, $page, $meta_infos;
     79  global $template, $page, $meta_infos, $pwg_loaded_plugins;
    8080  $meta_infos = array();
    8181  $meta_infos['author'] = $template->get_template_vars('INFO_AUTHOR');
     
    137137  }
    138138
    139   $MPC = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ContactForm';"));
    140   if ($MPC['state'] == 'active'){
     139  if (isset($pwg_loaded_plugins['ContactForm'])){
    141140    global $conf;
    142141    if (isset($page['section']) and $page['section'] == 'contact' and isset($conf['contactmeta']) and strpos($conf['contactmeta'], ',') !== false){
     
    153152  }
    154153
    155   $MAP = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'AdditionalPages';"));
    156   if ($MAP['state'] == 'active') {
     154  if (isset($pwg_loaded_plugins['AdditionalPages'])){
    157155    if (!empty($page['additional_page']['id'])) {
    158156      $lire = $page['additional_page']['id'];
Note: See TracChangeset for help on using the changeset viewer.