Ignore:
Timestamp:
May 14, 2012, 1:14:17 PM (12 years ago)
Author:
ddtddt
Message:

[extensions] - add_head_element - clean code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/add_head_element/main.inc.php

    r12496 r14969  
    3232{
    3333
    34 global $template;
     34global $template,$conf;
    3535
    36 $query = '
    37 select param,value
    38         FROM ' . CONFIG_TABLE . '
    39   WHERE param = "add_head_element"
    40         ;';
    41 $result = pwg_query($query);
    42 $row = mysql_fetch_assoc($result);
    43 
    44         if (!empty($row['value']))
     36        if (!empty($conf['add_head_element']))
    4537        {
    46     $template->append('head_elements', $row['value']);
     38    $template->append('head_elements', $conf['add_head_element']);
    4739        }
    4840 }
Note: See TracChangeset for help on using the changeset viewer.