Ignore:
Timestamp:
Oct 31, 2020, 8:28:51 PM (4 years ago)
Author:
ddtddt
Message:

[title] php7.4 Notice

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/title/admin.php

    r31456 r32302  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | Title plugin for piwigo                                               |
    4 // +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2011 - 2016 ddtddt             http://temmii.com/piwigo/ |
     3// | Title plugin for piwigo by TEMMII                                     |
     4// +-----------------------------------------------------------------------+
     5// | Copyright(C) 2011 - 2020 ddtddt             http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
     
    2121
    2222if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    23 global $template, $conf, $user;
     23global $template, $conf, $user, $pwg_loaded_plugins;
    2424include_once(PHPWG_ROOT_PATH .'admin/include/tabsheet.class.php');
    2525$my_base_url = PHPWG_ROOT_PATH.'admin.php?page=plugin-';
     
    3838$tabsheet = new tabsheet();
    3939  $tabsheet->add('plugtitle', l10n('title_tab_plgtitle'), TITLE_ADMIN . '-plugtitle');
    40   $PAC = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ContactForm';"));
    41   if($PAC['state'] == 'active'){
     40  if (isset($pwg_loaded_plugins['ContactForm'])){
    4241        $tabsheet->add('contacttitle', l10n('Contact Title'), TITLE_ADMIN . '-contacttitle');
    4342  }
    44   $PAAP = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'AdditionalPages';"));
    45   if($PAAP['state'] == 'active'){
     43  if (isset($pwg_loaded_plugins['AdditionalPages'])){
    4644        $tabsheet->add('AdditionalPagestitle', l10n('Additional Pages Title'), TITLE_ADMIN . '-AdditionalPagestitle');
    4745  }                       
Note: See TracChangeset for help on using the changeset viewer.