Plugin Directory

Changeset 398851


Ignore:
Timestamp:
06/19/2011 10:10:22 AM (15 years ago)
Author:
CJ_Jackson
Message:

Updated to 0.1.10

Location:
html5avmanager
Files:
80 added
5 edited

Legend:

Unmodified
Added
Removed
  • html5avmanager/trunk/api.php

    r398434 r398851  
    3333        $title = self::$param['title'];
    3434        $alt = self::$param['alt'];
    35         if($alt == '') {
    36             $alt = $title;
    37         }
    3835        $tempPath = self::$param['path'];
    3936        $poster_filename = self::$param['file'];
     
    7269        $title = self::$param['title'];
    7370        $alt = self::$param['alt'];
    74         if($alt == '') {
    75             $alt = $title;
    76         }
    7771        $tempPath = self::$param['path'];
    7872        $poster_filename = self::$param['file'];
     
    204198        $title = self::$param['title'];
    205199        $alt = self::$param['alt'];
    206         if($alt == '') {
    207             $alt = $title;
    208         }
    209200        $width = (int) self::$param['width'];
    210201        $height = (int) self::$param['height'];
     
    239230        $title = self::$param['title'];
    240231        $alt = self::$param['alt'];
    241         if($alt == '') {
    242             $alt = $title;
    243         }
    244232        $view = self::$param['view'];
    245233       
  • html5avmanager/trunk/html5avmanager.php

    r398687 r398851  
    55  Plugin URI: http://cj-jackson.com/
    66  Description: A video manager with a Modal-View-Controller and video uploader.
    7   Version: 0.1.9
     7  Version: 0.1.10
    88  Author: Christopher John Jackson
    99  Author URI: http://cj-jackson.com/
  • html5avmanager/trunk/lib/dbal.php

    r396591 r398851  
    99 * Inherit all features of PHP Data Object (PDO).
    1010 */
    11 
    1211class html5av_dbal extends PDO {
    1312
     
    1615    private $DB_PASSWD;
    1716    private $DB_HOST;
    18     private $DB_CHARSET;
    19     private $DB_COLLATE;
    2017    private $DB_PREFIX;
    2118
    22     const DBRev = 1;
     19    const DBRev = 2;
    2320
    2421    public function __construct() {
     
    2825        $this->DB_PASSWD = DB_PASSWORD;
    2926        $this->DB_HOST = DB_HOST;
    30         if (defined('DB_CHARSET')) {
    31             $this->DB_CHARSET = DB_CHARSET;
    32             $this->DB_COLLATE = DB_COLLATE;
     27        $this->DB_PREFIX = $table_prefix . 'html5av_';
     28        $tempHost = explode(':', $this->DB_HOST);
     29        if(isset($tempHost[1])) {
     30            $port = $tempHost[1];
    3331        } else {
    34             $this->DB_CHARSET = false;
    35             $this->DB_COLLATE = false;
     32            $port = 3306;
    3633        }
    37         $this->DB_PREFIX = $table_prefix . 'html5av_';
    38         $collate = '';
    39         if ($this->DB_COLLATE != '') {
    40             $collate = " COLLATE " . $this->DB_COLLATE;
    41         }
    42         if (preg_match('#.sock([0-9]{0,})$#i', $this->DB_HOST)) {
    43             $host = "unix_socket=" . preg_replace('#^([a-z0-9.]{0,}):/#i', '/', $this->DB_HOST);
     34        unset($tempHost);
     35        if (!is_numeric($port)) {
     36            $host = "unix_socket=" . end(explode(':',$this->DB_HOST));
    4437        } else {
    4538            $array = explode(':', $this->DB_HOST);
     
    5043            unset($array);
    5144        }
    52         if ($this->DB_CHARSET) {
    53             $options = array(
    54                 PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES " . $this->DB_CHARSET . $collate
    55             );
    56             parent::__construct('mysql:' . $host . ';dbname=' . $this->DB_NAME, $this->DB_USER, $this->DB_PASSWD, $options);
    57         } else {
    58             parent::__construct('mysql:' . $host . ';dbname=' . $this->DB_NAME, $this->DB_USER, $this->DB_PASSWD);
    59         }
     45        parent::__construct('mysql:' . $host . ';dbname=' . $this->DB_NAME,
     46                $this->DB_USER, $this->DB_PASSWD);
    6047    }
    6148
     
    7865    public function setUpTables() {
    7966        $this->execFile('main.sql');
    80         update_option('html5av_manager_dbrev', 1);
     67        update_option('html5av_manager_dbrev', self::DBRev);
    8168    }
    8269
    8370    public function updateTables() {
    84         $curRev = get_option('html5av_manager_dbrev');
     71        $curRev = (int)get_option('html5av_manager_dbrev');
    8572        if ($curRev == self::DBRev) {
    8673            return;
    8774        }
     75       
     76        if($curRev < 2) {
     77            $this->execFile('update/2.sql');
     78        }
     79       
     80        update_option('html5av_manager_dbrev', self::DBRev);
    8881    }
    8982
  • html5avmanager/trunk/readme.txt

    r398687 r398851  
    55Requires at least: 2.7
    66Tested up to: 3.2
    7 Stable tag: 0.1.9
     7Stable tag: 0.1.10
    88
    99A HTML5 Audio and Video manager that take full advantage of
     
    6262== Changelog ==
    6363
     64= 0.1.10 =
     65* Updated SQL to force 'utf8_general_ci', no longer relies on WordPress config
     66for character set or collation because it's does not work on some installation.
     67* No longer uses 'preg_match' in any script, better determination between,
     68unix socket and tcp/ip in WordPress configuration.
     69
    6470= 0.1.9 =
    6571* Fixed bug with uploadify in add video and audio.
  • html5avmanager/trunk/sql/main.sql

    r397041 r398851  
    1 -- rev 1
     1-- rev 2
    22
    33CREATE TABLE `_prefix_audio_video` (
     
    1010    `view` varchar(255),
    1111    title varchar(255) NOT NULL,
    12     alt varchar(255) NOT NULL,
     12    alt varchar(255),
    1313    author_id bigint(20) UNSIGNED NOT NULL,
    1414    created_on datetime NOT NULL,
    1515    modified datetime NOT NULL
    16 ) ENGINE=innodb;
     16) ENGINE=innodb CHARACTER SET utf8 COLLATE utf8_general_ci;
    1717
    1818CREATE TABLE `_prefix_source` (
     
    2828    FOREIGN KEY (audio_video_id) REFERENCES `_prefix_audio_video`(ID)
    2929ON UPDATE CASCADE ON DELETE CASCADE
    30 ) ENGINE=innodb;
     30) ENGINE=innodb CHARACTER SET utf8 COLLATE utf8_general_ci;
    3131
    3232CREATE TABLE `_prefix_track` (
     
    4444    FOREIGN KEY (audio_video_id) REFERENCES `_prefix_audio_video`(ID)
    4545ON UPDATE CASCADE ON DELETE CASCADE
    46 ) ENGINE=innodb;
     46) ENGINE=innodb CHARACTER SET utf8 COLLATE utf8_general_ci;
Note: See TracChangeset for help on using the changeset viewer.