Browse Source

undefined index fix

Stortebeker 6 years ago
parent
commit
a8f058a1c6
1 changed files with 27 additions and 27 deletions
  1. 27
    27
      sections/user/edit.php

+ 27
- 27
sections/user/edit.php View File

@@ -207,11 +207,11 @@ echo $Val->GenerateJS('userform');
207 207
         <td>
208 208
           <ul class="options_list nobullet">
209 209
             <li>
210
-              <input type="radio" name="searchtype" id="search_type_simple" value="0"<?=$SiteOptions['SearchType'] == 0 ? ' checked="checked"' : ''?> />
210
+              <input type="radio" name="searchtype" id="search_type_simple" value="0"<?=$SiteOptions  ?? 'SearchType' == 0 ? ' checked="checked"' : ''?> />
211 211
               <label for="search_type_simple">Simple</label>
212 212
             </li>
213 213
             <li>
214
-              <input type="radio" name="searchtype" id="search_type_advanced" value="1"<?=$SiteOptions['SearchType'] == 1 ? ' checked="checked"' : ''?> />
214
+              <input type="radio" name="searchtype" id="search_type_advanced" value="1"<?=$SiteOptions ?? 'SearchType' == 1 ? ' checked="checked"' : ''?> />
215 215
               <label for="search_type_advanced">Advanced</label>
216 216
             </li>
217 217
           </ul>
@@ -222,7 +222,7 @@ echo $Val->GenerateJS('userform');
222 222
         <td class="label tooltip" title="Enabling torrent grouping will place multiple formats of the same torrent group together beneath a common header."><strong>Torrent grouping</strong></td>
223 223
         <td>
224 224
           <div class="option_group">
225
-            <input type="checkbox" name="disablegrouping" id="disablegrouping"<?=$SiteOptions['DisableGrouping2'] == 0 ? ' checked="checked"' : ''?> />
225
+            <input type="checkbox" name="disablegrouping" id="disablegrouping"<?=$SiteOptions ?? 'DisableGrouping2' == 0 ? ' checked="checked"' : ''?> />
226 226
             <label for="disablegrouping">Enable torrent grouping</label>
227 227
           </div>
228 228
         </td>
@@ -233,11 +233,11 @@ echo $Val->GenerateJS('userform');
233 233
           <div class="option_group">
234 234
             <ul class="options_list nobullet">
235 235
               <li>
236
-                <input type="radio" name="torrentgrouping" id="torrent_grouping_open" value="0"<?=$SiteOptions['TorrentGrouping'] == 0 ? ' checked="checked"' : ''?> />
236
+                <input type="radio" name="torrentgrouping" id="torrent_grouping_open" value="0"<?=$SiteOptions ?? 'TorrentGrouping' == 0 ? ' checked="checked"' : ''?> />
237 237
                 <label for="torrent_grouping_open">Open</label>
238 238
               </li>
239 239
               <li>
240
-                <input type="radio" name="torrentgrouping" id="torrent_grouping_closed" value="1"<?=$SiteOptions['TorrentGrouping'] == 1 ? ' checked="checked"' : ''?> />
240
+                <input type="radio" name="torrentgrouping" id="torrent_grouping_closed" value="1"<?=$SiteOptions ?? 'TorrentGrouping' == 1 ? ' checked="checked"' : ''?> />
241 241
                 <label for="torrent_grouping_closed">Closed</label>
242 242
               </li>
243 243
             </ul>
@@ -247,14 +247,14 @@ echo $Val->GenerateJS('userform');
247 247
       <tr id="tor_snatched_tr">
248 248
         <td class="label tooltip" title="Enabling the snatched torrents indicator will display &quot;Snatched!&quot; next to torrents you've snatched."><strong>Snatched torrents indicator</strong></td>
249 249
         <td>
250
-          <input type="checkbox" name="showsnatched" id="showsnatched"<?=!empty($SiteOptions['ShowSnatched']) ? ' checked="checked"' : ''?> />
250
+          <input type="checkbox" name="showsnatched" id="showsnatched"<?=!empty($SiteOptions ?? 'ShowSnatched') ? ' checked="checked"' : ''?> />
251 251
           <label for="showsnatched">Enable snatched torrents indicator</label>
252 252
         </td>
253 253
       </tr>
254 254
       <tr id="tor_magnet_tr">
255 255
         <td class="label tooltip" title="Magnet links should only be used on clients with DHT disabled globally"><strong>Magnet links</strong></td>
256 256
         <td>
257
-          <input type="checkbox" name="showmagnets" id="showmagnets"<?=!empty($SiteOptions['ShowMagnets']) ? ' checked="checked"' : '' ?> />
257
+          <input type="checkbox" name="showmagnets" id="showmagnets"<?=!empty($SiteOptions ?? 'ShowMagnets') ? ' checked="checked"' : '' ?> />
258 258
           <label for="showmagnets">Show magnet links</label>
259 259
         </td>
260 260
       </tr>
@@ -275,11 +275,11 @@ echo $Val->GenerateJS('userform');
275 275
           <ul class="options_list nobullet">
276 276
             <li>
277 277
               <input type="hidden" name="coverart" value="" />
278
-              <input type="checkbox" name="coverart" id="coverart"<?=!isset($SiteOptions['CoverArt']) || $SiteOptions['CoverArt'] ? ' checked="checked"' : ''?> />
278
+              <input type="checkbox" name="coverart" id="coverart"<?=!isset($SiteOptions['CoverArt']) || $SiteOptions ?? 'CoverArt' ? ' checked="checked"' : ''?> />
279 279
               <label for="coverart">Enable cover artwork</label>
280 280
             </li>
281 281
             <li>
282
-              <input type="checkbox" name="show_extra_covers" id="show_extra_covers"<?=$SiteOptions['ShowExtraCovers'] ? ' checked="checked"' : ''?> />
282
+              <input type="checkbox" name="show_extra_covers" id="show_extra_covers"<?=$SiteOptions ?? 'ShowExtraCovers' ? ' checked="checked"' : ''?> />
283 283
               <label for="show_extra_covers">Enable additional cover artwork</label>
284 284
             </li>
285 285
           </ul>
@@ -289,12 +289,12 @@ echo $Val->GenerateJS('userform');
289 289
         <td class="label tooltip" title="This option allows you to change the number of album covers to display within a single collection page."><strong>Cover art (collections)</strong></td>
290 290
         <td>
291 291
           <select name="collagecovers" id="collagecovers">
292
-            <option value="10"<?=$SiteOptions['CollageCovers'] == 10 ? ' selected="selected"' : ''?>>10</option>
293
-            <option value="25"<?=($SiteOptions['CollageCovers'] == 25 || !isset($SiteOptions['CollageCovers'])) ? ' selected="selected"' : ''?>>25 (default)</option>
294
-            <option value="50"<?=$SiteOptions['CollageCovers'] == 50 ? ' selected="selected"' : ''?>>50</option>
295
-            <option value="100"<?=$SiteOptions['CollageCovers'] == 100 ? ' selected="selected"' : ''?>>100</option>
296
-            <option value="1000000"<?=$SiteOptions['CollageCovers'] == 1000000 ? ' selected="selected"' : ''?>>All</option>
297
-            <option value="0"<?=($SiteOptions['CollageCovers'] === 0 || (!isset($SiteOptions['CollageCovers']) && $SiteOptions['HideCollage'])) ? ' selected="selected"' : ''?>>None</option>
292
+            <option value="10"<?=$SiteOptions ?? 'CollageCovers' == 10 ? ' selected="selected"' : ''?>>10</option>
293
+            <option value="25"<?=($SiteOptions ?? 'CollageCovers' == 25 || !isset($SiteOptions['CollageCovers'])) ? ' selected="selected"' : ''?>>25 (default)</option>
294
+            <option value="50"<?=$SiteOptions ?? 'CollageCovers' == 50 ? ' selected="selected"' : ''?>>50</option>
295
+            <option value="100"<?=$SiteOptions ?? 'CollageCovers' == 100 ? ' selected="selected"' : ''?>>100</option>
296
+            <option value="1000000"<?=$SiteOptions ?? 'CollageCovers' == 1000000 ? ' selected="selected"' : ''?>>All</option>
297
+            <option value="0"<?=($SiteOptions ?? 'CollageCovers' === 0 || (!isset($SiteOptions['CollageCovers']) && $SiteOptions['HideCollage'])) ? ' selected="selected"' : ''?>>None</option>
298 298
           </select>
299 299
           covers per page
300 300
         </td>
@@ -318,9 +318,9 @@ echo $Val->GenerateJS('userform');
318 318
         <td class="label tooltip" title="Autocomplete will try to predict the word or phrase that you're typing. Selecting &quot;Everywhere&quot; will enable autocomplete on artist and tag fields across the site. Selecting &quot;Searches only&quot; will enable autocomplete in searches."><strong>Autocompletion</strong></td>
319 319
         <td>
320 320
           <select name="autocomplete">
321
-            <option value="0"<?=empty($SiteOptions['AutoComplete']) ? ' selected="selected"' : ''?>>Everywhere</option>
322
-            <option value="2"<?=$SiteOptions['AutoComplete'] === 2 ? ' selected="selected"' : ''?>>Searches only</option>
323
-            <option value="1"<?=$SiteOptions['AutoComplete'] === 1 ? ' selected="selected"' : ''?>>Disable</option>
321
+            <option value="0"<?=empty($SiteOptions ?? 'AutoComplete') ? ' selected="selected"' : ''?>>Everywhere</option>
322
+            <option value="2"<?=$SiteOptions ?? 'AutoComplete' === 2 ? ' selected="selected"' : ''?>>Searches only</option>
323
+            <option value="1"<?=$SiteOptions ?? 'AutoComplete' === 1 ? ' selected="selected"' : ''?>>Disable</option>
324 324
           </select>
325 325
         </td>
326 326
       </tr>
@@ -329,15 +329,15 @@ echo $Val->GenerateJS('userform');
329 329
         <td>
330 330
           <ul class="nobullet">
331 331
             <li>
332
-              <input type="checkbox" name="hide_lolicon" id="hide_lolicon"<?=($SiteOptions['HideLolicon']) ? ' checked="checked"' : ''?> />
332
+              <input type="checkbox" name="hide_lolicon" id="hide_lolicon"<?=($SiteOptions ?? 'HideLolicon') ? ' checked="checked"' : ''?> />
333 333
               <label for="hide_lolicon">Hide results with Lolicon, Shotacon, or Toddlercon</label>
334 334
             </li>
335 335
             <li>
336
-              <input type="checkbox" name="hide_scat" id="hide_scat"<?=($SiteOptions['HideScat']) ? ' checked="checked"' : ''?> />
336
+              <input type="checkbox" name="hide_scat" id="hide_scat"<?=($SiteOptions ?? 'HideScat') ? ' checked="checked"' : ''?> />
337 337
               <label for="hide_scat">Hide results with Scat</label>
338 338
             </li>
339 339
             <li>
340
-              <input type="checkbox" name="hide_snuff" id="hide_snuff"<?=($SiteOptions['HideSnuff']) ? ' checked="checked"' : ''?> />
340
+              <input type="checkbox" name="hide_snuff" id="hide_snuff"<?=($SiteOptions ?? 'HideSnuff') ? ' checked="checked"' : ''?> />
341 341
               <label for="hide_snuff">Hide results with Snuff</label>
342 342
             </li>
343 343
           </ul>
@@ -354,9 +354,9 @@ echo $Val->GenerateJS('userform');
354 354
         <td class="label tooltip" title="This option allows you to set the desired number of displayed posts per page within forum threads."><strong>Posts per page (forums)</strong></td>
355 355
         <td>
356 356
           <select name="postsperpage" id="postsperpage">
357
-            <option value="25"<?=$SiteOptions['PostsPerPage'] == 25 ? ' selected="selected"' : ''?>>25 (default)</option>
358
-            <option value="50"<?=$SiteOptions['PostsPerPage'] == 50 ? ' selected="selected"' : ''?>>50</option>
359
-            <option value="100"<?=$SiteOptions['PostsPerPage'] == 100 ? ' selected="selected"' : ''?>>100</option>
357
+            <option value="25"<?=$SiteOptions ?? 'PostsPerPage' == 25 ? ' selected="selected"' : ''?>>25 (default)</option>
358
+            <option value="50"<?=$SiteOptions ?? 'PostsPerPage' == 50 ? ' selected="selected"' : ''?>>50</option>
359
+            <option value="100"<?=$SiteOptions ?? 'PostsPerPage' == 100 ? ' selected="selected"' : ''?>>100</option>
360 360
           </select>
361 361
           posts per page
362 362
         </td>
@@ -371,7 +371,7 @@ echo $Val->GenerateJS('userform');
371 371
       <tr id="comm_emot_tr">
372 372
         <td class="label tooltip" title="Emoticons are small images which replace traditional text-based &quot;smileys&quot; like :) or :("><strong>Emoticons</strong></td>
373 373
         <td>
374
-          <input type="checkbox" name="disablesmileys" id="disablesmileys"<?=!empty($SiteOptions['DisableSmileys']) ? ' checked="checked"' : ''?> />
374
+          <input type="checkbox" name="disablesmileys" id="disablesmileys"<?=!empty($SiteOptions ?? 'DisableSmileys') ? ' checked="checked"' : ''?> />
375 375
           <label for="disablesmileys">Disable emoticons</label>
376 376
         </td>
377 377
       </tr>
@@ -379,8 +379,8 @@ echo $Val->GenerateJS('userform');
379 379
         <td class="label tooltip" title="This option allows you to disable all avatars or show all avatars with a placeholder for users without avatars." data-title-plain="This option allows you to disable all avatars or show all avatars with a placeholder for users without avatars."><strong>Avatar display (posts)</strong></td>
380 380
         <td>
381 381
           <select name="disableavatars" id="disableavatars">
382
-            <option value="1"<?=$SiteOptions['DisableAvatars'] == 1 ? ' selected="selected"' : ''?>>Disable avatars</option>
383
-            <option value="0"<?=$SiteOptions['DisableAvatars'] == 0 ? ' selected="selected"' : ''?>>Show avatars</option>
382
+            <option value="1"<?=$SiteOptions ?? 'DisableAvatars' == 1 ? ' selected="selected"' : ''?>>Disable avatars</option>
383
+            <option value="0"<?=$SiteOptions ?? 'DisableAvatars' == 0 ? ' selected="selected"' : ''?>>Show avatars</option>
384 384
           </select>
385 385
         </td>
386 386
       </tr>

Loading…
Cancel
Save