Changeset 397524
- Timestamp:
- 06/15/2011 03:09:55 PM (15 years ago)
- Location:
- html5avmanager
- Files:
-
- 76 added
- 3 edited
-
tags/0.1.5 (added)
-
tags/0.1.5/Thumbs.db (added)
-
tags/0.1.5/api.php (added)
-
tags/0.1.5/html5avmanager.php (added)
-
tags/0.1.5/lib (added)
-
tags/0.1.5/lib/dbal.php (added)
-
tags/0.1.5/lib/mediaelement (added)
-
tags/0.1.5/lib/mediaelement/Thumbs.db (added)
-
tags/0.1.5/lib/mediaelement/background.png (added)
-
tags/0.1.5/lib/mediaelement/bigplay.png (added)
-
tags/0.1.5/lib/mediaelement/controls-ted.png (added)
-
tags/0.1.5/lib/mediaelement/controls-wmp-bg.png (added)
-
tags/0.1.5/lib/mediaelement/controls-wmp.png (added)
-
tags/0.1.5/lib/mediaelement/controls.png (added)
-
tags/0.1.5/lib/mediaelement/flashmediaelement.swf (added)
-
tags/0.1.5/lib/mediaelement/jquery.js (added)
-
tags/0.1.5/lib/mediaelement/loading.gif (added)
-
tags/0.1.5/lib/mediaelement/mediaelement-and-player.js (added)
-
tags/0.1.5/lib/mediaelement/mediaelement-and-player.min.js (added)
-
tags/0.1.5/lib/mediaelement/mediaelement.js (added)
-
tags/0.1.5/lib/mediaelement/mediaelement.min.js (added)
-
tags/0.1.5/lib/mediaelement/mediaelementplayer.css (added)
-
tags/0.1.5/lib/mediaelement/mediaelementplayer.js (added)
-
tags/0.1.5/lib/mediaelement/mediaelementplayer.min.css (added)
-
tags/0.1.5/lib/mediaelement/mediaelementplayer.min.js (added)
-
tags/0.1.5/lib/mediaelement/mejs-skins.css (added)
-
tags/0.1.5/lib/mediaelement/silverlightmediaelement.xap (added)
-
tags/0.1.5/lib/model (added)
-
tags/0.1.5/lib/model/html5av_audio_video.php (added)
-
tags/0.1.5/lib/model/html5av_source.php (added)
-
tags/0.1.5/lib/model/html5av_track.php (added)
-
tags/0.1.5/lib/time.php (added)
-
tags/0.1.5/lib/uploadify (added)
-
tags/0.1.5/lib/uploadify/cancel.png (added)
-
tags/0.1.5/lib/uploadify/check.php (added)
-
tags/0.1.5/lib/uploadify/custom.php (added)
-
tags/0.1.5/lib/uploadify/expressInstall.swf (added)
-
tags/0.1.5/lib/uploadify/jquery.uploadify.js (added)
-
tags/0.1.5/lib/uploadify/uploadify.allglyphs.swf (added)
-
tags/0.1.5/lib/uploadify/uploadify.css (added)
-
tags/0.1.5/lib/uploadify/uploadify.fla (added)
-
tags/0.1.5/lib/uploadify/uploadify.swf (added)
-
tags/0.1.5/license.txt (added)
-
tags/0.1.5/readme.txt (added)
-
tags/0.1.5/screenshot-1.png (added)
-
tags/0.1.5/screenshot-2.png (added)
-
tags/0.1.5/screenshot-3.png (added)
-
tags/0.1.5/screenshot-4.png (added)
-
tags/0.1.5/screenshot-5.png (added)
-
tags/0.1.5/screenshot-6.png (added)
-
tags/0.1.5/screenshot-7.png (added)
-
tags/0.1.5/screenshot-8.png (added)
-
tags/0.1.5/sql (added)
-
tags/0.1.5/sql/main.sql (added)
-
tags/0.1.5/sql/update (added)
-
tags/0.1.5/view (added)
-
tags/0.1.5/view/admin (added)
-
tags/0.1.5/view/admin/audio-add-panel.php (added)
-
tags/0.1.5/view/admin/audio-edit-panel.php (added)
-
tags/0.1.5/view/admin/settings-panel.php (added)
-
tags/0.1.5/view/admin/source-external-panel.php (added)
-
tags/0.1.5/view/admin/source-panel.php (added)
-
tags/0.1.5/view/admin/track-external-panel.php (added)
-
tags/0.1.5/view/admin/track-panel.php (added)
-
tags/0.1.5/view/admin/video-add-panel.php (added)
-
tags/0.1.5/view/admin/video-audio-manager-page.php (added)
-
tags/0.1.5/view/admin/video-audio-manager-pagenation.php (added)
-
tags/0.1.5/view/admin/video-audio-manager-panel.php (added)
-
tags/0.1.5/view/admin/video-edit-panel.php (added)
-
tags/0.1.5/view/admin/widget.php (added)
-
tags/0.1.5/view/videoaudio (added)
-
tags/0.1.5/view/videoaudio/audio-default.php (added)
-
tags/0.1.5/view/videoaudio/audio-xml.php (added)
-
tags/0.1.5/view/videoaudio/setting.php (added)
-
tags/0.1.5/view/videoaudio/video-default.php (added)
-
tags/0.1.5/view/videoaudio/video-xml.php (added)
-
trunk/html5avmanager.php (modified) (1 diff)
-
trunk/lib/model/html5av_audio_video.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
html5avmanager/trunk/html5avmanager.php
r397419 r397524 5 5 Plugin URI: http://cj-jackson.com/ 6 6 Description: A video manager with a Modal-View-Controller and video uploader. 7 Version: 0.1. 47 Version: 0.1.5 8 8 Author: Christopher John Jackson 9 9 Author URI: http://cj-jackson.com/ -
html5avmanager/trunk/lib/model/html5av_audio_video.php
r397041 r397524 114 114 $this->modified = html5av_time::getUTC(); 115 115 } 116 116 117 117 public function getSources($incDisabled = false) { 118 return html5av_source_table::getByAudioVideoId($this->ID, 119 $incDisabled); 120 } 121 118 return html5av_source_table::getByAudioVideoId($this->ID, $incDisabled); 119 } 120 122 121 public function getTracks($incDisabled = false) { 123 return html5av_track_table::getByAudioVideoId($this->ID, 124 $incDisabled); 125 } 126 122 return html5av_track_table::getByAudioVideoId($this->ID, $incDisabled); 123 } 124 127 125 public function getPoster() { 128 return html5av_manager::getUploadDir() .'/'.129 $this->getPosterPath().'/'.$this->getPosterFilename();130 } 131 126 return html5av_manager::getUploadDir() . '/' . 127 $this->getPosterPath() . '/' . $this->getPosterFilename(); 128 } 129 132 130 public function getPosterUrl() { 133 return html5av_manager::getUploadUrl() .'/'.134 $this->getPosterPath().'/'.$this->getPosterFilename();135 } 136 131 return html5av_manager::getUploadUrl() . '/' . 132 $this->getPosterPath() . '/' . $this->getPosterFilename(); 133 } 134 137 135 public function getAuthorName() { 138 136 $user_info = get_userdata($this->getAuthorId()); … … 192 190 $sources = $this->getSources(true); 193 191 $tracks = $this->getTracks(true); 194 foreach ($sources as $source) {192 foreach ($sources as $source) { 195 193 $source->delete(); 196 194 } 197 foreach ($tracks as $track) {195 foreach ($tracks as $track) { 198 196 $track->delete(); 199 197 } … … 221 219 static public function pager() { 222 220 $db = new html5av_dbal(); 223 $sql = "SELECT count(*) as COUNTFROM `" . $db->getPrefix() . "audio_video`";221 $sql = "SELECT count(*) as `COUNT` FROM `" . $db->getPrefix() . "audio_video`"; 224 222 $query = $db->query($sql); 225 $data = $query->fetch(); 226 $count = (int) $data['COUNT']; 223 if ($query) { 224 $data = $query->fetch(); 225 $count = (int) $data['COUNT']; 226 } else { 227 //Failsafe for when SQL count() fails 228 $count = self::getCount(); 229 } 227 230 $lastPage = (int) ceil($count / 25); 228 231 $array = array( … … 237 240 $offset = ($page - 1) * 25; 238 241 $sql = "SELECT * FROM `" . $db->getPrefix() . "audio_video` ORDER BY ID DESC 239 LIMIT " .$offset.", 25;";242 LIMIT " . $offset . ", 25;"; 240 243 $prepare = $db->prepare($sql); 241 244 $prepare->execute(); … … 246 249 return $objects; 247 250 } 251 252 static private function getCount() { 253 $db = new html5av_dbal(); 254 $sql = "SELECT * FROM `" . $db->getPrefix() . "audio_video`;"; 255 $prepare = $db->prepare($sql); 256 $prepare->execute(); 257 return (int) count($prepare->fetchAll()); 258 } 248 259 249 260 } -
html5avmanager/trunk/readme.txt
r397419 r397524 5 5 Requires at least: 2.7 6 6 Tested up to: 3.2 7 Stable tag: 0.1. 47 Stable tag: 0.1.5 8 8 9 9 A HTML5 Audio and Video manager that take full advantage of … … 62 62 == Changelog == 63 63 64 = 0.1.5 = 65 * Added failsafe for when SQL count() fails on some server. 66 64 67 = 0.1.4 = 65 68 * Fixed JavaScript issue with pagenation.
Note: See TracChangeset
for help on using the changeset viewer.