Changeset 32916


Ignore:
Timestamp:
Jan 18, 2023, 8:13:56 AM (16 months ago)
Author:
ddtddt
Message:

[Photo_add_by] check php8

Location:
extensions/Photo_add_by
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • extensions/Photo_add_by/admin.php

    r32392 r32916  
    33// | Photo added by plugin for Piwigo  by TEMMII                           |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2012-2021 ddtddt               http://temmii.com/piwigo/ |
     5// | Copyright(C) 2012-2023 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
     
    4949  case 'gestion':
    5050
    51   global $conf;
     51  global $conf, $pwg_loaded_plugins;
    5252 
    5353    $selected = $conf['Photo_add_by'];
     
    7070      ));
    7171
    72 $PASPBY = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'see_photos_by_user';"));
    73 if($PASPBY['state'] == 'active')
     72if(isset($pwg_loaded_plugins['see_photos_by_user']))
    7473{
    7574$PABS2T = array(
     
    9897        {
    9998conf_update_param('Photo_add_by', $_POST['infopab']);
    100 if($PASPBY['state'] == 'active')
     99if(isset($pwg_loaded_plugins['see_photos_by_user']))
    101100{
    102101conf_update_param('Photo_add_by_show', $_POST['inspabs2']);
  • extensions/Photo_add_by/initadmin.php

    r32652 r32916  
    33// | Photo added by plugin for Piwigo  by TEMMII                           |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2012-2021 ddtddt               http://temmii.com/piwigo/ |
     5// | Copyright(C) 2012-2023 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
  • extensions/Photo_add_by/initpicture.php

    r32652 r32916  
    33// | Photo added by plugin for Piwigo  by TEMMII                           |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2012-2021 ddtddt               http://temmii.com/piwigo/ |
     5// | Copyright(C) 2012-2023 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
     
    4848
    4949function pab(){
    50 global $conf, $page, $template;
     50global $conf, $page, $template,$pwg_loaded_plugins;
    5151load_language('plugin.lang', PAB_PATH);
    5252load_language('lang', PHPWG_ROOT_PATH.PWG_LOCAL_DIR, array('no_fallback'=>true, 'local'=>true) );
     
    6363        $pab=$row['username'];
    6464       
    65         $PASPBY = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'see_photos_by_user';"));
    6665        $showpab = $conf['Photo_add_by_show'];
    67           if($showpab == 1 and $PASPBY['state'] == 'active'){
     66          if($showpab == 1 and (isset($pwg_loaded_plugins['see_photos_by_user']))){
    6867                $query2 = 'SELECT UT.id, UT.username, COUNT(DISTINCT(IT.id)) AS PBU
    6968                  FROM ' . USERS_TABLE . ' as UT
     
    8988                  $userok[] = $row2['username'];
    9089                }
    91                 if(in_array($pab, $userok) and $showpab == 1 and $PASPBY['state'] == 'active'){
     90                if(in_array($pab, $userok) and $showpab == 1 and (isset($pwg_loaded_plugins['see_photos_by_user']))){
    9291                  $urlpab = get_root_url().'index.php?/user-'.$userab.'-'.$pab;
    9392                  $pab2 ='<a href="'.$urlpab.'">'.$pab.'</a>';
  • extensions/Photo_add_by/language/en_UK/plugin.lang.php

    r32392 r32916  
    33// | Photo added by plugin for Piwigo  by TEMMII                           |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2012-2021 ddtddt               http://temmii.com/piwigo/ |
     5// | Copyright(C) 2012-2023 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
  • extensions/Photo_add_by/language/fr_FR/plugin.lang.php

    r32392 r32916  
    33// | Photo added by plugin for Piwigo  by TEMMII                           |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2012-2021 ddtddt               http://temmii.com/piwigo/ |
     5// | Copyright(C) 2012-2023 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
  • extensions/Photo_add_by/main.inc.php

    r32442 r32916  
    1313// | Photo added by plugin for Piwigo  by TEMMII                           |
    1414// +-----------------------------------------------------------------------+
    15 // | Copyright(C) 2012-2021 ddtddt               http://temmii.com/piwigo/ |
     15// | Copyright(C) 2012-2023 ddtddt               http://temmii.com/piwigo/ |
    1616// +-----------------------------------------------------------------------+
    1717// | This program is free software; you can redistribute it and/or modify  |
  • extensions/Photo_add_by/maintain.class.php

    r32182 r32916  
    33// | Photo added by plugin for Piwigo  by TEMMII                           |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2012-2020 ddtddt               http://temmii.com/piwigo/ |
     5// | Copyright(C) 2012-2023 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
Note: See TracChangeset for help on using the changeset viewer.