Changeset 2721

Show
Ignore:
Timestamp:
10/16/06 00:45:57 (7 years ago)
Author:
p_lindheimer
Message:

moved require_once() into funcitons, was breaking page.extensions.php ???

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.2/findmefollow/functions.inc.php

    r2719 r2721  
    1 <?php /* $Id: functions.inc.php 214 2006-10-16 04:10:16Z plindheimer $ */ 
    2  
    3 global $amp_conf; 
    4 require_once($amp_conf['AMPWEBROOT'].'/admin/common/php-asmanager.php'); 
     1<?php /* $Id: functions.inc.php 175 2006-10-03 19:12:39Z plindheimer $ */ 
    52 
    63// The destinations this module provides 
     
    130127function findmefollow_add($grpnum,$strategy,$grptime,$grplist,$postdest,$grppre='',$annmsg='',$dring,$needsconf,$remotealert,$toolate,$ringing,$pre_ring) { 
    131128  global $amp_conf; 
     129  require_once($amp_conf['AMPWEBROOT'].'/admin/common/php-asmanager.php'); 
     130 
    132131 
    133132  $sql = "INSERT INTO findmefollow (grpnum, strategy, grptime, grppre, grplist, annmsg, postdest, dring, needsconf, remotealert, toolate, ringing, pre_ring) VALUES (".$grpnum.", '".str_replace("'", "''", $strategy)."', ".str_replace("'", "''", $grptime).", '".str_replace("'", "''", $grppre)."', '".str_replace("'", "''", $grplist)."', '".str_replace("'", "''", $annmsg)."', '".str_replace("'", "''", $postdest)."', '".str_replace("'", "''", $dring)."', '$needsconf', '$remotealert', '$toolate', '$ringing', '$pre_ring')"; 
     
    150149function findmefollow_del($grpnum) { 
    151150  global $amp_conf; 
     151  require_once($amp_conf['AMPWEBROOT'].'/admin/common/php-asmanager.php'); 
    152152 
    153153  $results = sql("DELETE FROM findmefollow WHERE grpnum = $grpnum","query"); 
     
    233233function findmefollow_get($grpnum, $check_astdb=0) { 
    234234  global $amp_conf; 
     235  require_once($amp_conf['AMPWEBROOT'].'/admin/common/php-asmanager.php'); 
    235236 
    236237  $results = sql("SELECT grpnum, strategy, grptime, grppre, grplist, annmsg, postdest, dring, needsconf, remotealert, toolate, ringing, pre_ring FROM findmefollow WHERE grpnum = $grpnum","getRow",DB_FETCHMODE_ASSOC); 
     
    311312} 
    312313 
    313  
    314 // this function builds the AMPUSE/<grpnum>/followme tree for each user who has a group number 
    315 // it's purpose is to convert after an upgrade 
    316 //  
    317 function findmefollow_users2astdb(){ 
    318   checkAstMan(); 
    319   global $amp_conf; 
    320   $sql = "SELECT * FROM findmefollow"; 
    321   $userresults = sql($sql,"getAll",DB_FETCHMODE_ASSOC); 
    322    
    323   //add details to astdb 
    324   $astman = new AGI_AsteriskManager(); 
    325   if ($res = $astman->connect("127.0.0.1", $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) { 
    326     foreach($userresults as $usr) { 
    327  
    328       extract($usr); 
    329  
    330       $astman->database_put("AMPUSER",$grpnum."/followme/prering",isset($pre_ring)?$pre_ring:''); 
    331       $astman->database_put("AMPUSER",$grpnum."/followme/grptime",isset($grptime)?$grptime:''); 
    332       $astman->database_put("AMPUSER",$grpnum."/followme/grplist",isset($grplist)?$grplist:''); 
    333       $confvalue = ($needsconf == 'CHECKED')?'ENABLED':'DISABLED'; 
    334       $astman->database_put("AMPUSER",$grpnum."/followme/grpconf",isset($needsconf)?$confvalue:''); 
    335     }  
    336   } else { 
    337     echo _("Cannot connect to Asterisk Manager with ").$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]; 
    338   } 
    339   return $astman->disconnect(); 
    340 } 
    341  
    342314?> 
  • modules/branches/2.2/findmefollow/module.xml

    r2720 r2721  
    22  <rawname>findmefollow</rawname> 
    33  <name>Follow Me</name> 
    4   <version>2.2.3</version> 
     4  <version>2.2.4</version> 
    55  <changelog> 
     6    2.2.4: moved require_once() in functions.php, was breaking other stuff 
    67    2.2.3: full path in require_once to keep retrieve_conf from dieing 
    78    2.2.2: bug fix = should be ==