Changeset 4423

Show
Ignore:
Timestamp:
07/17/07 19:30:19 (6 years ago)
Author:
p_lindheimer
Message:

added FOP to framework and fixed error with libfreepbx.install.php not being included

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.3/framework/install.php

    r4380 r4423  
    11<?php 
    22 
    3 include_once("libfreepbx.install.php") === false) || outn(_("ERROR: libfreepbx.install.php not included with framework, version upgrades will not be executed")); 
     3include_once(dirname(__FILE__)."/libfreepbx.install.php") === false || outn(_("ERROR: libfreepbx.install.php not included with framework, version upgrades will not be executed")); 
    44 
    55global $amp_conf; 
     
    1616  $bin_source = dirname(__FILE__)."/bin/*"; 
    1717  $agibin_source = dirname(__FILE__)."/agi-bin/*"; 
     18  $htdocs_panel_source = dirname(__FILE__)."/htdocs_panel/*"; 
    1819 
    1920  // These are required by libfreepbx.install.php library for upgrade routines 
     
    2526  $bin_dest    = isset($amp_conf['AMPBIN']) ? $amp_conf['AMPBIN'] : '/var/lib/asterisk/bin'; 
    2627  $agibin_dest = isset($asterisk_conf['astagidir']) ? $asterisk_conf['astagidir']:'/var/lib/asterisk/agi-bin'; 
     28 
     29  // There was a past bug where FOPWEBROOT was pointing to AMPWEBROOT so if that is the case then hardcode 
     30  // and force to panel here. 
     31  // 
     32  $htdocs_panel_dest = $amp_conf['FOPWEBROOT']; 
     33  if ($htdocs_panel_dest == $amp_conf['AMPWEBROOT']) { 
     34    $htdocs_panel_dest .= "/panel"; 
     35  } 
    2736 
    2837  exec("cp -rf $htdocs_source $htdocs_dest 2>&1",$out,$ret); 
     
    4150  } 
    4251 
    43   if (function_exists('upgrade_all') { 
     52  exec("cp -rf $htdocs_panel_source $htdocs_panel_dest 2>&1",$out,$ret); 
     53  if ($ret != 0) { 
     54    framework_print_errors($htdocs_panel_source, $htdocs_panel_dest, $out); 
     55  } 
     56 
     57  if (function_exists('upgrade_all')) { 
    4458    upgrade_all(getversion()); 
    4559  }