Ticket #2273: patch_daynight

File patch_daynight, 1.2 kB (added by francesco_r, 1 year ago)

Apply with patch -p0 < patch_daynight in module directory

Line 
1 --- functions.inc.php.original  2007-08-11 17:46:00.000000000 +0200
2 +++ functions.inc.php   2007-08-11 19:16:13.000000000 +0200
3 @@ -146,6 +146,7 @@
4                 $passwords = daynight_passwords();
5                 foreach ($list as $item) {
6                         $index = $item['ext'];
7 +                       $ext->addHint($id, $c.$index, 'Custom:daynight'.$index);
8                         $ext->add($id, $c.$index, '', new ext_answer(''));
9                         $ext->add($id, $c.$index, '', new ext_wait('1'));
10  
11 @@ -161,10 +162,12 @@
12                 $ext->add($id, $c, '', new ext_gotoif('$["${DAYNIGHTMODE}" = "NIGHT"]', 'day', 'night'));
13  
14                 $ext->add($id, $c, 'day', new ext_setvar('DB(DAYNIGHT/C${INDEX})', 'DAY'));     
15 +               $ext->add($id, $c, '', new ext_setvar('DEVSTATE(Custom:daynight${INDEX})', 'NOT_INUSE'));       
16                 $ext->add($id, $c, '', new ext_playback('beep&silence/1&day&reception&digits/${INDEX}&enabled'));
17                 $ext->add($id, $c, '', new ext_hangup(''));
18  
19                 $ext->add($id, $c, 'night', new ext_setvar('DB(DAYNIGHT/C${INDEX})', 'NIGHT'));
20 +               $ext->add($id, $c, '', new ext_setvar('DEVSTATE(Custom:daynight${INDEX})', 'INUSE'));   
21                 $ext->add($id, $c, '', new ext_playback('beep&silence/1&beep&silence/1&day&reception&digits/${INDEX}&disabled'));
22                 $ext->add($id, $c, '', new ext_hangup(''));
23         }
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads