Ejemplo n.º 1
0
 /**
  * GetYoutubeVideoSize
  * 
  * Retrurns an array containing the set YouTube video dimensions
  * 
  * @return array('YoutubeVideoWidth','YoutubeVideoHeight')
  */
 public static function GetYoutubeVideoSize()
 {
     // Debug
     OnePanelDebug::Info('Getting YouTube video dimensions.');
     if (isset(self::$misc_options['YoutubeVideoWidth']) && isset(self::$misc_options['YoutubeVideoHeight'])) {
         return array('Width' => self::$misc_options['YoutubeVideoWidth'], 'Height' => self::$misc_options['YoutubeVideoHeight']);
     } else {
         OnePanelDebug::Warn('No youtube dimensions found.');
         return false;
     }
 }
Ejemplo n.º 2
0
 /**
  * ImplementWorkingData
  * 
  * Takes the op data from the database, unpacks it and uses it as the
  * working operational data.
  * 
  * @return boolean
  */
 private function ImplementWorkingData()
 {
     // Debug
     $success = OnePanelDebug::Track('Retrieving data from the DB and implementing');
     // Set the failsafe
     ini_set('unserialize_callback_func', 'OnePanel::UnpackProtection');
     mysql_set_charset('utf8');
     // Unserialize throws a wobbler otherwise
     // Get the data
     $data = $this->UnpackData(get_option('one_panel_data'));
     // Return the failsafe
     ini_restore('unserialize_callback_func');
     if ($data === false) {
         return false;
     } else {
         // Set the data and take out the trash
         self::$operational_data =& $data;
         // Process any trash we may have encoutered
         if (count(self::$trash) > 0) {
             OnePanelDebug::Warn('Trash found in OP data.');
             self::EmptyTrash();
         }
         // All done
         $success->Affirm();
         return true;
     }
 }