Ignore:
Timestamp:
Dec 18, 2012, 12:55:28 PM (12 years ago)
Author:
plg
Message:

fix a few notices

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/scheduler/include/admin_events.inc.php

    r19232 r19482  
    3333  global $page, $template;
    3434
    35   if ('photo' == $_GET['page'] and (!isset($_GET['tab']) or 'properties' == $_GET['tab']))
     35  if (!isset($_GET['page']))
    3636  {
    37     // is the current photo on schedule?
    38     $query = '
     37    return;
     38  }
     39
     40  if ($_GET['page'] != 'photo')
     41  {
     42    return;
     43  }
     44
     45  if (isset($_GET['tab']) and $_GET['tab'] != 'properties')
     46  {
     47    return;
     48  }
     49 
     50  // is the current photo on schedule?
     51  $query = '
    3952SELECT *
    4053  FROM '.SCHEDULER_TABLE.'
    4154  WHERE image_id = '.$_GET['image_id'].'
    4255;';
    43     $scheduler = pwg_db_fetch_assoc(pwg_query($query));
     56  $scheduler = pwg_db_fetch_assoc(pwg_query($query));
    4457
    45     if (!isset($scheduler['scheduled_for']))
    46     {
    47       return;
    48     }
     58  if (!isset($scheduler['scheduled_for']))
     59  {
     60    return;
     61  }
    4962   
    50     if (isset($_POST['submit']))
    51     {
    52       // we have to change the level in the scheduler table
    53       single_update(
    54         SCHEDULER_TABLE,
    55         array('level' => $_POST['level']),
    56         array('image_id' => $_GET['image_id'])
    57         );
     63  if (isset($_POST['submit']))
     64  {
     65    // we have to change the level in the scheduler table
     66    single_update(
     67      SCHEDULER_TABLE,
     68      array('level' => $_POST['level']),
     69      array('image_id' => $_GET['image_id'])
     70      );
    5871
    59       $scheduler['level'] = $_POST['level'];
     72    $scheduler['level'] = $_POST['level'];
    6073
    61       // then picture_modify.php will update IMAGES_TABLE to level 32 (=scheduled)
    62       $_POST['level'] = 32;
    63     }
     74    // then picture_modify.php will update IMAGES_TABLE to level 32 (=scheduled)
     75    $_POST['level'] = 32;
     76  }
     77 
     78  $template->set_prefilter('picture_modify', 'scheduler_picture_edit_prefilter');
    6479   
    65     $template->set_prefilter('picture_modify', 'scheduler_picture_edit_prefilter');
    66    
    67     $template->assign('level_options_selected_scheduler', array($scheduler['level']));
    68   }
     80  $template->assign('level_options_selected_scheduler', array($scheduler['level']));
    6981}
    7082?>
Note: See TracChangeset for help on using the changeset viewer.