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/admin.php

    r31543 r32308  
    11<?php
     2// +-----------------------------------------------------------------------+
     3// | meta plugin for Piwigo by TEMMII                                      |
     4// +-----------------------------------------------------------------------+
     5// | Copyright(C) 2008-2020 ddtddt               http://temmii.com/piwigo/ |
     6// +-----------------------------------------------------------------------+
     7// | This program is free software; you can redistribute it and/or modify  |
     8// | it under the terms of the GNU General Public License as published by  |
     9// | the Free Software Foundation                                          |
     10// |                                                                       |
     11// | This program is distributed in the hope that it will be useful, but   |
     12// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
     13// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
     14// | General Public License for more details.                              |
     15// |                                                                       |
     16// | You should have received a copy of the GNU General Public License     |
     17// | along with this program; if not, write to the Free Software           |
     18// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
     19// | USA.                                                                  |
     20// +-----------------------------------------------------------------------+
    221
    322if (!defined('PHPWG_ROOT_PATH'))
    423    die('Hacking attempt!');
    5 global $template, $conf, $user;
     24global $template, $conf, $user, $pwg_loaded_plugins;
    625include_once(PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php');
    726
     
    2039  $tabsheet->add('gestion', l10n('meta_onglet_gestion'), META_ADMIN . '-gestion');
    2140  $tabsheet->add('persometa', l10n('Personal Metadata'), META_ADMIN . '-persometa');
    22   $MPC = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ContactForm';"));
    23         if ($MPC['state'] == 'active') {
    24       $tabsheet->add('contactmeta', l10n('Contact page Metadata'), META_ADMIN . '-contactmeta');
    25         }
    26   $MAP = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'AdditionalPages';"));
    27         if ($MAP['state'] == 'active') {
    28       $tabsheet->add('AdditionalPagesmeta', l10n('Additional Pages Metadata'), META_ADMIN . '-AdditionalPagesmeta');
    29         }
     41  if (isset($pwg_loaded_plugins['ContactForm'])){
     42        $tabsheet->add('contactmeta', l10n('Contact page Metadata'), META_ADMIN . '-contactmeta');
     43  }
     44  if (isset($pwg_loaded_plugins['AdditionalPages'])){
     45        $tabsheet->add('AdditionalPagesmeta', l10n('Additional Pages Metadata'), META_ADMIN . '-AdditionalPagesmeta');
     46  }
    3047  $tabsheet->add('description', l10n('meta_onglet_description'), META_ADMIN . '-description');
    3148$tabsheet->select($page['tab']);
Note: See TracChangeset for help on using the changeset viewer.