Ticket #1144: custom_record.2.patch
File custom_record.2.patch, 7.8 KB (added by , 18 years ago) |
---|
-
themes/default/tv/schedules_custom.php
71 71 <li><input type="radio" class="radio" name="record" value="<?php echo rectype_always ?>" id="record_always"<?php 72 72 if ($schedule->type == rectype_always) echo ' CHECKED' ?> /> 73 73 <label for="record_always"><?php echo t('rectype-long: always') ?></label></li> 74 <li><input type="radio" class="radio" name="record" value="<?php echo rectype_finddaily ?>" id="rectype_finddaily"<?php 75 if ($schedule->type == rectype_finddaily) echo ' CHECKED' ?> /> 76 <label for="rectype_finddaily"><?php echo t('rectype-long: finddaily') ?></label></li> 77 <li><input type="radio" class="radio" name="record" value="<?php echo rectype_findweekly ?>" id="rectype_findweekly"<?php 78 if($schedule->type == rectype_findweekly) echo ' CHECKED' ?> /> 79 <label for="rectype_findweekly"><?php echo t('rectype-long: findweekly') ?></label></li> 74 80 <li><input type="radio" class="radio" name="record" value="<?php echo rectype_findone ?>" id="rectype_findone"<?php 75 81 if ($schedule->type == rectype_findone) echo ' CHECKED' ?> /> 76 82 <label for="rectype_findone"><?php echo t('rectype-long: findone') ?></label></li> … … 125 131 126 132 </div> 127 133 134 <div id="find_date_options"> 135 <h3><?php echo t('Find Date & Time Options') ?>:</h3> 136 <dl class="clearfix"> 137 <dt><?php echo t('Find Day') ?>:</dt> 138 <dd> 139 <select name="findday"> 140 <option value="1"<?php 141 if($schedule->findday == 1) 142 echo ' SELECTED';?>> 143 <?php echo t('Sunday'); ?> 144 </option> 145 <option value="2"<?php 146 if($schedule->findday == 2) 147 echo ' SELECTED';?>> 148 <?php echo t('Monday'); ?> 149 </option> 150 <option value="3"<?php 151 if($schedule->findday == 3) 152 echo ' SELECTED';?>> 153 <?php echo t('Tuesday'); ?> 154 </option> 155 <option value="4"<?php 156 if($schedule->findday == 4) 157 echo ' SELECTED';?>> 158 <?php echo t('Wednesday'); ?> 159 </option> 160 <option value="5"<?php 161 if($schedule->findday == 5) 162 echo ' SELECTED';?>> 163 <?php echo t('Thursday'); ?> 164 </option> 165 <option value="6"<?php 166 if($schedule->findday == 6) 167 echo ' SELECTED';?>> 168 <?php echo t('Friday'); ?> 169 </option> 170 <option value="7"<?php 171 if($schedule->findday == 7) 172 echo ' SELECTED';?>> 173 <?php echo t('Saturday'); ?> 174 </option> 175 </select> 176 </dd> 177 <dt><?php echo t('Find Time') ?>:</dt> 178 <dd><input type="text" name="findtime" value="<?php echo htmlentities($schedule->findtime) ?>" /></dd> 179 </dl> 180 </div> 181 128 182 <div id="advanced_options"> 129 183 <h3><?php echo t('Advanced Options') ?>:</h3> 130 184 -
skins/default/tv_schedules_custom.css
40 40 width: 24em !important; 41 41 } 42 42 43 #find_date_options { 44 margin: 0px auto; 45 } 46 #find_date_options dl 47 { 48 margin: 5px 10px; 49 } 50 #find_date_options dl dt { 51 clear: left; 52 float: left; 53 width: 13em; 54 margin-bottom: 0.25em; 55 text-align: right; 56 white-space: nowrap; 57 } 58 #find_date_options dl dd { 59 margin-bottom: 0.25em; 60 margin-left: 13.5em; 61 } 62 #find_date_options select { 63 width: 14em; 64 } 65 #find_date_options input { 66 width: 13.7em; 67 } 68 43 69 #recording_options { 44 70 margin: 0px auto; 45 71 } -
languages/English.php
187 187 'Showing all programs from the $1 group.' => '', 188 188 'Showing all programs.' => '', 189 189 // modules/tv/schedules_custom.php 190 'Any Category' => '', 191 'Any Channel' => '', 192 'Any Program Type' => '', 190 'Any Category' => '', 191 'Any Channel' => '', 192 'Any Program Type' => '', 193 'Find Date & Time Options' => 'Find Date & Time Options', 194 'Find Day' => '', 195 'Find Time' => '', 193 196 // modules/tv/search.php 194 197 'Please search for something.' => '', 195 198 // modules/video/init.php -
includes/recording_schedules.php
216 216 // Make sure that recordid is null if it's empty 217 217 if (empty($this->recordid)) { 218 218 $this->recordid = NULL; 219 $this->findday = (date("w", $this->starttime) + 1) % 7; 220 $this->findtime = date("G:i:s", $this->starttime); 219 // Only auto-default these properties if we're not dealing with a 220 // search-based recording rule, otherwise take the values we 221 // received from the custom schedule input form 222 if(!$this->search) { 223 $this->findday = (date("w", $this->starttime) + 1) % 7; 224 $this->findtime = date("G:i:s", $this->starttime); 225 } 221 226 $this->findid = (date("U", $this->starttime)/60/60/24) + 719528; 222 227 } 223 228 // Changing the type of recording -
modules/tv/schedules_custom.php
49 49 // Which type of recording is this? Make sure an illegal one isn't specified 50 50 switch ($_POST['record']) { 51 51 // Only certain rectypes are allowed 52 case rectype_ once:52 case rectype_findone: 53 53 case rectype_always: 54 case rectype_finddaily: 55 case rectype_findweekly: 54 56 break; 55 57 // Everything else gets ignored 56 58 default: … … 94 96 $schedule->endtime = time() + 1; 95 97 $schedule->category = 'Custom recording'; 96 98 $schedule->search = $_POST['searchtype']; 97 $schedule->findday = date('w', $schedule->starttime);98 $schedule->findtime = date('H:m:s', $schedule->starttime);99 $schedule->findday = $_POST['findday']; 100 $schedule->findtime = strlen($_POST['findtime']) && preg_match('/^\d{1,2}:\d{2}:\d{2}$/', $_POST['findtime']) ? $_POST['findtime'] : date('H:m:s', $schedule->starttime); 99 101 $schedule->autotranscode = $_POST['autotranscode'] ? 1 : 0; 100 102 $schedule->transcoder = $_POST['transcoder']; 101 103 // Build the special description