Changeset 17655


Ignore:
Timestamp:
08/29/12 17:01:05 (7 years ago)
Author:
mistic100
Message:

actually we need a separated file (conflict with other plugins)

Location:
extensions/header_manager
Files:
1 added
2 edited

Legend:

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

    r17654 r17655  
    4848  ) 
    4949  { 
    50     include_once(HEADER_MANAGER_PATH . 'maintain.inc.php'); 
    51     plugin_install(); 
     50    include_once(HEADER_MANAGER_PATH . 'include/install.inc.php'); 
     51    header_manager_install(); 
    5252     
    5353    if ($pwg_loaded_plugins['header_manager']['version'] != 'auto') 
  • extensions/header_manager/maintain.inc.php

    r17654 r17655  
    11<?php 
    22if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 
     3 
     4include_once(PHPWG_PLUGINS_PATH . 'header_manager/include/install.inc.php'); 
    35   
    46function plugin_install()  
    57{ 
    6   global $conf, $prefixeTable; 
    7  
    8   // configuration 
    9   if (empty($conf['header_manager'])) 
    10   { 
    11     $header_manager_default_config = serialize(array( 
    12       'width' => 1000, 
    13       'height' => 150, 
    14       'image' => 'random', 
    15       'display' => 'image_only' 
    16       )); 
    17      
    18     conf_update_param('header_manager', $header_manager_default_config); 
    19     $conf['header_manager'] = $header_manager_default_config; 
    20   } 
    21  
    22   // banners directory 
    23   if (!file_exists(PWG_LOCAL_DIR . 'banners/'))  
    24   { 
    25     mkdir(PWG_LOCAL_DIR . 'banners/', 0755); 
    26   } 
    27  
    28   // banners table 
    29   $query = ' 
    30 CREATE TABLE IF NOT EXISTS `' .$prefixeTable . 'category_banner` ( 
    31   `category_id` smallint(5) unsigned NOT NULL, 
    32   `image` varchar(255) NOT NULL, 
    33   `deep` tinyint(1) DEFAULT 1, 
    34   PRIMARY KEY (`category_id`) 
    35 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 
    36 ;'; 
    37   pwg_query($query); 
     8  header_manager_install(); 
    389   
    3910  define('header_manager_installed', true); 
     
    4415  if (!defined('header_manager_installed')) 
    4516  { 
    46     plugin_install(); 
     17    header_manager_install(); 
    4718  } 
    4819} 
Note: See TracChangeset for help on using the changeset viewer.