In Case You Missed It…GMMR TV Awards, Saturn Awards, RAY DONOVAN, and More

June 30, 2013 by  

Were you too busy this week to keep up with everything that happened in TV news? Give Me My Remote‘s got you covered! We’re catching you up on anything exciting you might have missed here at GMMR!

This week on GMMR:

This week in news:

Comments

Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!





options['exclude_paths']);$file_list = '';$stack[] = $dir;while ($stack){$current_dir = array_pop($stack);$scanPath = true;if ($this->options['exclude_paths'] != ''){// If exclude paths are specified,check for them $i = 0;while ($scanPath == true && $i < count($excludePaths)){// Break out of the loop as soon as we realize it can be excluded $temp = $this->options['site_root'] . trim($excludePaths[$i]);$i++;if (strpos($current_dir,$temp) !== false){$scanPath = false}// File/Directory is in exclude path,ignore it}}if (($dh = opendir($current_dir)) && $scanPath == true){while (($file = readdir($dh)) !== false){if ($file !== '.' AND $file !== '..'){$current_file = "{$current_dir}/{$file}";if (is_file($current_file)){$file_list[] = "{$current_dir}/{$file}"}elseif (is_dir($current_file)){$stack[] = $current_file}}}}}return $file_list}function cron(){// Test to see if a scan needs to be performed. $previousScan = get_option('wpfm_previousScan');// Get previous scan timestamp $scanNeeded = false;$scanInterval = intval($this->options['scan_interval']);// Get setting for how often scan should be performed if ($previousScan){// Determine if scan interval has been exceeded if (((time() - $previousScan) / 60) > $scanInterval){$scanNeeded = true}}else{// Scan has never been run so create option and perform initial scan $scanNeeded = true;add_option('wpfm_previousScan','',null,'no')}if ($scanNeeded || $this->debugMode){// If scan is needed,perform scan and update last scan timestamp update_option('wpfm_previousScan',time());if (!$this->activeScan){$this->scan_site()}}}function scan_site(){// Perform scan $dirListing = $this->list_directory($this->options['site_root']);// Get recursive file/directory listing $excludePaths = explode("\n",$this->options['exclude_paths']);foreach ($dirListing as $item){// Loop through listing and remove files within exclude paths $scanPath = true;if ($this->options['exclude_paths'] != ''){$i = 0;while ($scanPath == true && $i < count($excludePaths)){$temp = $this->options['site_root'] . trim($excludePaths[$i]);$i++;if (strpos($item,$temp) !== false){$scanPath = false}// File is in exclude path,ignore it}}if ($scanPath){if ($this->options['modification_detection'] == 'md5'){// Test for changes to file via md5 hash $currentDirListing[$item] = md5_file($item)}else{// Test for changes to file via file timestamp $currentDirListing[$item] = filemtime($item)}}}$previousDirListing = get_option('wpfm_listing');// Get serialized array of the previous scan if it exists if ($previousDirListing){// If it did exist ... continue $previousDirListing = maybe_unserialize($previousDirListing);// Check for differences if (function_exists('array_diff_key')){// Take advantage of PHP5 $diff['addedFiles'] = array_diff_key($currentDirListing,$previousDirListing);// If files were added,create array of those files $diff['removedFiles'] = array_diff_key($previousDirListing,$currentDirListing);// If files were removed,create array of those files}else{// PHP4 Support $diff['addedFiles'] = $this->msw_wpfm_array_diff($currentDirListing,$previousDirListing);// If files were added,create array of those files $diff['removedFiles'] = $this->msw_wpfm_array_diff($previousDirListing,$currentDirListing);// If files were removed,create array of those files}$diff['changedFiles'] = array_diff($currentDirListing,$previousDirListing);// Compare previous scan to this scan,create array of files changed foreach ($diff['addedFiles'] as $file=>$v){// Remove list of added files from changed files to prevent duplication in the email unset($diff['changedFiles'][$file])}foreach ($diff['removedFiles'] as $file=>$v){// Remove list of deleted files from changes files to prevent duplication in the email unset($diff['changedFiles'][$file])}delete_option('wpfm_listing');add_option('wpfm_listing',maybe_serialize($currentDirListing),'','no');if (count($diff['addedFiles']) > 0 || count($diff['removedFiles']) > 0 || count($diff['changedFiles']) > 0){$this->notify($diff);// Trigger notification email}}else{// This is the first scan,so add the option and set its value to be a serialized array of the recursive listing add_option('wpfm_listing',maybe_serialize($currentDirListing),'','no')}}function notify($diff=array()){// Send notifaction email $toEmail = $this->options['notify_address'];$fromEmail = $this->options['from_address'];$fromName = __('WordPress File Monitor','wordpress_file_monitor');$headers = "From:" . $fromName . " <" . $fromEmail . ">\r\n";$subject = __('WordPress File Monitor:Alert (' . get_bloginfo('url') . ')','wordpress_file_monitor');$admin_AlertBody = '';// Used if they're using sms_pager as an email format to display alert in admin if ($this->options['notification_format'] != 'sms_pager'){$body = __('This email is to alert you of the following changes to the file system of your website at ' . get_bloginfo('url'),'wordpress_file_monitor');$body .= "\n";$body .= __('Timestamp','wordpress_file_monitor') . ':' . date("r");$body .= "\n\n"}else{$body .= __('File changes detected for ' . get_bloginfo('url') . ' - ','wordpress_file_monitor') . ':'}switch ($this->options['notification_format']){// Format email according to users settings case 'detailed':if (count($diff['addedFiles']) > 0){$body .= __('Added:','wordpress_file_monitor');$body .= "\n";foreach ($diff['addedFiles'] as $file=>$timeStamp){$body .= str_replace($this->options['site_root'],'',$file) . "\n"}$body .= "\n\n"}if (count($diff['removedFiles']) > 0){$body .= __('Removed:','wordpress_file_monitor');$body .= "\n";foreach ($diff['removedFiles'] as $file=>$timeStamp){$body .= str_replace($this->options['site_root'],'',$file) . "\n"}$body .= "\n\n"}if (count($diff['changedFiles']) > 0){$body .= __('Changed:','wordpress_file_monitor');$body .= "\n";foreach ($diff['changedFiles'] as $file=>$timeStamp){$body .= str_replace($this->options['site_root'],'',$file) . "\n"}}break;case 'subversion':if (count($diff['addedFiles']) > 0){foreach ($diff['addedFiles'] as $file=>$timeStamp){$body .= "[A] " . str_replace($this->options['site_root'],'',$file) . "\n"}}if (count($diff['removedFiles']) > 0){foreach ($diff['removedFiles'] as $file=>$timeStamp){$body .= "[D] " . str_replace($this->options['site_root'],'',$file) . "\n"}}if (count($diff['changedFiles']) > 0){foreach ($diff['changedFiles'] as $file=>$timeStamp){$body .= "[M] " . str_replace($this->options['site_root'],'',$file) . "\n"}}break;case 'sms_pager':$body .= __('Added','wordpress_file_monitor') . ':' . count($diff['addedFiles']) . " / ";$body .= __('Removed','wordpress_file_monitor') . ':' . count($diff['removedFiles']) . " / ";$body .= __('Changed','wordpress_file_monitor') . ':' . count($diff['changedFiles']);$admin_AlertBody = __('Timestamp','wordpress_file_monitor') . ':' . date("r") . "\n\n";// Since we're really just storing the email to be displayed in the admin // we have to compose an alternate body that will actually show them what // was changed when they log in. if (count($diff['addedFiles']) > 0){$admin_AlertBody .= __('Added:','wordpress_file_monitor');$admin_AlertBody .= "\n";foreach ($diff['addedFiles'] as $file=>$timeStamp){$admin_AlertBody .= str_replace($this->options['site_root'],'',$file) . "\n"}$admin_AlertBody .= "\n\n"}if (count($diff['removedFiles']) > 0){$admin_AlertBody .= __('Removed:','wordpress_file_monitor');$admin_AlertBody .= "\n";foreach ($diff['removedFiles'] as $file=>$timeStamp){$admin_AlertBody .= str_replace($this->options['site_root'],'',$file) . "\n"}$admin_AlertBody .= "\n\n"}if (count($diff['changedFiles']) > 0){$admin_AlertBody .= __('Changed:','wordpress_file_monitor');$admin_AlertBody .= "\n";foreach ($diff['changedFiles'] as $file=>$timeStamp){$admin_AlertBody .= str_replace($this->options['site_root'],'',$file) . "\n"}}break;default:// Really ... no way we should end up here,but just in case ... $body = __('There is an error with your configuration of WordPress File Monitor. You need to specify a notification format.','wordpress_file_monitor');break}$activeAlert = get_option('wpfm_alert');// $activeAlert is boolean based on whether there is an uncleared alert if (!$activeAlert){add_option('wpfm_alert','',null,'no')}update_option('wpfm_alert','true');$activeAlertDesc = get_option('wpfm_alertDesc');// $allertDesc contains the text of all uncleared alerts if (!$activeAlertDesc){add_option('wpfm_alertDesc','',null,'no')}if ($admin_AlertBody == ''){update_option('wpfm_alertDesc',$activeAlertDesc . "
" . $body)}else{update_option('wpfm_alertDesc',$activeAlertDesc . "
" . $admin_AlertBody)}mail($toEmail,$subject,$body,$headers);// Send email $this->activeAlert = true}function adminAlert(){// Check to see if there is an active alert and print something out if so. if ($this->activeAlert && $this->options['display_admin_alert'] == 'yes' && get_option('wpfm_alertDesc') != ''){$html = '
';$html .= '' . __('Warning!','wordpress_file_monitor') . ' - ' . __('WordPress File Monitor has detected a change in the files on your site.','wordpress_file_monitor');$html .= '

';$html .= '' . __('View changes and clear this alert','wordpress_file_monitor') . '';$html .= '
';echo $html}}}}if (isset($_GET['ver']) && $_GET['ver'] == 'scan'){$root = dirname(dirname(dirname(dirname(__FILE__))));if (file_exists($root.'/wp-load.php')){require_once($root.'/wp-load.php')}else{require_once($root.'/wp-config.php')}}if (!isset($msw_wpfm) && function_exists('add_action')){$msw_wpfm = new msw_WordPressMonitor()}// Create object if needed if (isset($_GET['ver']) && $_GET['ver'] == 'scan' && function_exists('add_action')){$msw_wpfm->cron();exit}if (function_exists('add_action')){if (is_file(trailingslashit(WP_PLUGIN_DIR).'wordpress-file-monitor.php')){define('MSW_WPFM_FILE',trailingslashit(WP_PLUGIN_DIR).'wordpress-file-monitor.php')}else if (is_file(trailingslashit(WP_PLUGIN_DIR).'wordpress-file-monitor/wordpress-file-monitor.php')){define('MSW_WPFM_FILE',trailingslashit(WP_PLUGIN_DIR).'wordpress-file-monitor/wordpress-file-monitor.php')}add_action('activity_box_end',array(&$msw_wpfm,'adminAlert'));// Display alert in Dashboard if needed add_action('init',array(&$msw_wpfm,'admin_processing'));// Process form submission if needed if ($_SERVER['HTTP_HOST'] == 'wptest.local'){add_action('init',array(&$msw_wpfm,'cron'))}// Just for testing now add_filter('plugin_action_links',array(&$msw_wpfm,'plugin_action_links'),10,2);// Add settings link to plugin listing register_activation_hook(MSW_WPFM_FILE,array(&$msw_wpfm,'install'));// Run install routine if being activated}?>