Changeset 6550

Show
Ignore:
Timestamp:
09/03/08 15:31:27 (3 months ago)
Author:
p_lindheimer
Message:

fixes #3152 undefined variables and also sets followme default destination to the extension's unavailable voicemail vs. no destination chosen

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.5/core/functions.inc.php

    r6540 r6550  
    41364136 
    41374137        // Ensure variables possibly extracted later exist 
    4138         $name = $outboundcid = $record_in = $record_out =  $sipname = $cid_masquerade = null; 
     4138        $name = $outboundcid = $record_in = $record_out =  $sipname = $cid_masquerade = $newdid_name = $newdid = $newdidcid = null; 
    41394139 
    41404140        // Init vars from $_REQUEST[] 
  • modules/branches/2.5/findmefollow/page.findmefollow.php

    r6302 r6550  
    118118<?php  
    119119 
    120 if (!$extdisplay) { 
     120if ($extdisplay == "") { 
    121121        echo '<br><h2>'._("Follow Me").'</h2><br><h3>'._('Choose a user/extension:').'</h3><br><br><br><br><br><br><br>'; 
    122122        } 
     
    124124        echo '<br><h3>'._("Follow Me").' '.$account.' '._("deleted").'!</h3><br><br><br><br><br><br><br><br>'; 
    125125} else { 
    126         if ($extdisplay) { 
     126        if ($extdisplay != "") { 
    127127                // We need to populate grplist with the existing extension list. 
    128                 $thisgrp = findmefollow_get(ltrim($extdisplay,'GRP-'), 1); 
     128                $extdisplay = ltrim($extdisplay,'GRP-'); 
     129 
     130                $thisgrp = findmefollow_get($extdisplay, 1); 
    129131                $grpliststr = isset($thisgrp['grplist']) ? $thisgrp['grplist'] : ''; 
    130132                $grplist = explode("-", $grpliststr); 
     
    133135                $grppre      = isset($thisgrp['grppre'])      ? $thisgrp['grppre']      : ''; 
    134136                $grptime     = isset($thisgrp['grptime'])     ? $thisgrp['grptime']     : ''; 
    135                 $goto        = isset($thisgrp['postdest'])    ? $thisgrp['postdest']    : ''
     137                $goto        = isset($thisgrp['postdest'])    ? $thisgrp['postdest']    : "ext-local,vmu$extdisplay,1"
    136138                $annmsg_id      = isset($thisgrp['annmsg_id'])      ? $thisgrp['annmsg_id']      : ''; 
    137139                $dring       = isset($thisgrp['dring'])       ? $thisgrp['dring']       : ''; 
     
    148150                        <form name=delete action=\"{$_SERVER['PHP_SELF']}\" method=POST> 
    149151                                <input type=\"hidden\" name=\"display\" value=\"{$dispnum}\"> 
    150                                 <input type=\"hidden\" name=\"account\" value=\"".ltrim($extdisplay,'GRP-')."\"> 
     152                                <input type=\"hidden\" name=\"account\" value=\"{$extdisplay}\"> 
    151153                                <input type=\"hidden\" name=\"action\" value=\"delGRP\"> 
    152154                                <input type=submit value=\""._("Delete Entries")."\"> 
    153155                        </form>"; 
    154156                         
    155                 echo "<h2>"._("Follow Me").": ".ltrim($extdisplay,'GRP-')."</h2>"; 
     157                echo "<h2>"._("Follow Me").": ".$extdisplay."</h2>"; 
    156158 
    157159 
     
    159161                // 
    160162                if (isset($amp_conf["AMPEXTENSIONS"]) && ($amp_conf["AMPEXTENSIONS"] == "deviceanduser")) { 
    161                         $editURL = $_SERVER['PHP_SELF'].'?display=users&extdisplay='.ltrim($extdisplay,'GRP-')
     163                        $editURL = $_SERVER['PHP_SELF'].'?display=users&extdisplay='.$extdisplay
    162164                        $EXTorUSER = _("User"); 
    163165                } 
    164166                else { 
    165                         $editURL = $_SERVER['PHP_SELF'].'?display=extensions&extdisplay='.ltrim($extdisplay,'GRP-')
     167                        $editURL = $_SERVER['PHP_SELF'].'?display=extensions&extdisplay='.$extdisplay
    166168                        $EXTorUSER = _("Extension"); 
    167169                } 
    168170 
    169                 $label = '<span><img width="16" height="16" border="0" title="'.sprintf(_("Edit %s"),$EXTorUSER).'" alt="" src="images/user_edit.png"/>&nbsp;'.sprintf(_("Edit %s %s"),$EXTorUSER, ltrim($extdisplay,'GRP-')).'</span>'; 
     171                $label = '<span><img width="16" height="16" border="0" title="'.sprintf(_("Edit %s"),$EXTorUSER).'" alt="" src="images/user_edit.png"/>&nbsp;'.sprintf(_("Edit %s %s"),$EXTorUSER, $extdisplay).'</span>'; 
    170172                echo "<p><a href=".$editURL.">".$label."</a></p>"; 
    171173                echo "<p>".$delButton."</p>"; 
     
    174176                        <form name="editGRP" action="<?php  $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return checkGRP(editGRP);"> 
    175177                        <input type="hidden" name="display" value="<?php echo $dispnum?>"> 
    176                         <input type="hidden" name="action" value="<?php echo ($extdisplay ? 'edtGRP' : 'addGRP'); ?>"> 
     178                        <input type="hidden" name="action" value="<?php echo (($extdisplay != "") ? 'edtGRP' : 'addGRP'); ?>"> 
    177179                        <table> 
    178                         <tr><td colspan="2"><h5><?php  echo ($extdisplay ? _("Edit Follow Me") : _("Add Follow Me")) ?><hr></h5></td></tr> 
     180                        <tr><td colspan="2"><h5><?php  echo (($extdisplay != "") ? _("Edit Follow Me") : _("Add Follow Me")) ?><hr></h5></td></tr> 
    179181                        <tr> 
    180182<?php 
    181         if ($extdisplay) {  
    182  
    183 ?> 
    184                                 <input size="5" type="hidden" name="account" value="<?php  echo ltrim($extdisplay,'GRP-'); ?>"> 
     183        if ($extdisplay != "") {  
     184 
     185?> 
     186                                <input size="5" type="hidden" name="account" value="<?php  echo $extdisplay; ?>"> 
    185187<?php           } else { ?> 
    186188                                <td><a href="#" class="info"><?php echo _("group number")?>:<span><?php echo _("The number users will dial to ring extensions in this ring group")?></span></a></td> 
     
    255257                $rows = count($grplist)+1;  
    256258                if ($rows <= 2 && trim($grplist[0]) == "") { 
    257                         $grplist[0] = ltrim($extdisplay,'GRP-')
     259                        $grplist[0] = $extdisplay
    258260                } 
    259261                ($rows < 5) ? 5 : (($rows > 20) ? 20 : $rows); 
  • modules/branches/2.5/voicemail/functions.inc.php

    r6449 r6550  
    520520 
    521521        $follow_me_disabled = !$vmxobj->hasFollowMe(); 
    522         if (!$follow_me_disable) { 
     522        if (!$follow_me_disabled) { 
    523523                $vmx_option_1_system_default_text_box_options = $dval; 
    524524                if ($vmxobj->isFollowMe()) { 
     
    531531                        $vmx_option_1_system_default = ''; 
    532532                } 
     533        } else { 
     534                $vmx_option_1_number_text_box_options = $dval; 
    533535        } 
    534536  
     
    547549        $tabindex = guielement::gettabindex(); 
    548550        $tabindex_text = "tabindex='$tabindex'"; 
    549         $set_vmx_text .=  
     551        $set_vmx_text =  
    550552                " 
    551553                        <tr> 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads