Changeset 32133


Ignore:
Timestamp:
Apr 26, 2020, 7:27:42 PM (4 years ago)
Author:
ddtddt
Message:

[Meta_OG]

Location:
extensions/meta_og
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/meta_og/admin.php

    r32112 r32133  
    4747{
    4848 case 'gestion':
    49 
     49                global $pwg_loaded_plugins;
    5050$metaogpagelistT = array(
    5151    l10n('Select Page'),
     
    8181        'notification',
    8282  );
    83 $MPC = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ContactForm';"));
    84   if ($MPC['state'] == 'active'){
     83  if (isset($pwg_loaded_plugins['ContactForm'])){
    8584        $metaogpagelistT[]=l10n('contact');
    8685        $metaogpagelist[]='contact';
    8786  }
    88 $MPG = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'GuestBook';"));
    89   if ($MPG['state'] == 'active'){
     87  if (isset($pwg_loaded_plugins['GuestBook'])){
    9088        $metaogpagelistT[]=l10n('GuestBook');
    9189        $metaogpagelist[]='GuestBook';
    9290  }
    93 $MAP = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'AdditionalPages';"));
    94   if ($MAP['state'] == 'active') { 
     91  if (isset($pwg_loaded_plugins['GuestBook'])){
    9592    $result = pwg_query('SELECT id,title FROM ' . ADD_PAGES_TABLE . ' ORDER BY id ASC;');
    9693        while ($row = pwg_db_fetch_assoc($result)) {
  • extensions/meta_og/main.inc.php

    r32131 r32133  
    7373
    7474function add_metaog(){
    75  global $template, $page, $metaog, $conf, $protocol;
     75 global $template, $page, $metaog, $conf, $protocol, $pwg_loaded_plugins;
    7676 if(isset($_SERVER['HTTPS'])){if($_SERVER['HTTPS'] == 'on'){$protocol="https://";}}
    7777   else{$protocol="http://";}
     
    173173}
    174174
    175    $PAED = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ExtendedDescription';"));
    176   if ($PAED['state'] == 'active')
     175
     176  if (isset($pwg_loaded_plugins['ExtendedDescription'])){
    177177    add_event_handler('AP_render_content', 'get_user_language_desc');
    178  
     178  }
    179179  // og:url
    180180  if (!empty($metaogurl)) {
Note: See TracChangeset for help on using the changeset viewer.