Changeset 32898


Ignore:
Timestamp:
Jan 12, 2023, 9:40:53 AM (16 months ago)
Author:
ddtddt
Message:

[user_custom_fields] compatybilité php8

Location:
extensions/user_custom_fields
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/user_custom_fields/admin.tpl

    r32736 r32898  
    198198            <fieldset>
    199199                <legend><span id="leg_add">{'Create new custom fields'|@translate}</span><span id="leg_edit">{'Edit custom fields'|@translate}</span></legend>
    200                 <input id="hideid" type="hidden" name="invisibleID" value="{$addinfo_edit2.AIPID}">
     200                <input id="hideid" type="hidden" name="invisibleID" value="">
    201201                <p class="input">
    202202                    <label for="inserwording">{'Wording'|@translate}</label><br />
    203                     <textarea {if $useED==1}placeholder="{'Use Extended Description tags...'|@translate}"{/if} style="margin-left:50px" rows="5" cols="50" class="description" name="inserwording" id="aip_add">{$addinfo_edit2.AIPDESC}</textarea>
     203                    <textarea {if $useED==1}placeholder="{'Use Extended Description tags...'|@translate}"{/if} style="margin-left:50px" rows="5" cols="50" class="description" name="inserwording" id="aip_add"></textarea>
    204204                    {if $useED==1}
    205205                    <a href="{$ROOT_URL}admin/popuphelp.php?page=extended_desc" onclick="popuphelp(this.href); return false;" title="{'Use Extended Description tags...'|translate}" style="vertical-align: middle; border: 0; margin: 0.5em;"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/help.png" class="button" alt="{'Use Extended Description tags...'|translate}'"></a>
     
    208208                <p class="input" style="width: 700px;">
    209209                    <label for="inseractive">{'Hide'|@translate}</label>
    210                     <input id="aip_hide" type="checkbox" name="inseractive" {if {$addinfo_edit2.AIPACTIF}==1}checked{/if} value="1">
     210                    <input id="aip_hide" type="checkbox" name="inseractive" value="1">
    211211                </p>
    212212                                <p class="input" style="width: 700px;">
    213213                    <label for="adminonly">{'Admin only'|@translate}</label>
    214                     <input id="aip_adminonly" type="checkbox" name="adminonly" {if {$addinfo_edit2.UCFADMINONLY}==1}checked{/if} value="1">
     214                    <input id="aip_adminonly" type="checkbox" name="adminonly" value="1">
    215215                </p>
    216216                                <p class="input" style="width: 700px;">
    217217                    <label for="obligatory">{'Obligatory'|@translate}</label>
    218                     <input id="aip_obligatory" type="checkbox" name="obligatory" {if {$addinfo_edit2.UCFOBLIGATORY}==1}checked{/if} value="1">
     218                    <input id="aip_obligatory" type="checkbox" name="obligatory" value="1">
    219219                </p>
    220220                                <p class="actionButtons">
  • extensions/user_custom_fields/initregister.php

    r32698 r32898  
    3737add_event_handler('loc_end_page_header', 'ucfinit');
    3838function ucfinit(){
    39   global $template;
    40   $PAED = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ExtendedDescription';"));
    41         if($PAED['state'] == 'active'){
     39  global $template, $pwg_loaded_plugins;
     40    if (isset($pwg_loaded_plugins['ExtendedDescription'])){
    4241                add_event_handler('AP_render_content', 'get_user_language_desc');
    4342    }
     
    5655add_event_handler('register_user_check', 'ucfT');
    5756function ucfT($errors){
    58   global $prefixeTable,$conf;
     57  global $prefixeTable, $conf;
    5958  if (count($errors) == 0){
    6059        $next = pwg_db_fetch_assoc(pwg_query("SHOW TABLE STATUS LIKE '".USERS_TABLE."';"));
    6160        $next_id = $next['Auto_increment'];
     61       
    6262 
    6363        foreach ($_POST['data'] AS $id_ucf => $data) {
Note: See TracChangeset for help on using the changeset viewer.