fix broken videos admin
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 10 Sep 2013 13:56:45 +0000 (13:56 +0000)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 10 Sep 2013 13:56:45 +0000 (13:56 +0000)
Toolkit/Videos/AdminEditVideoForm.php
Toolkit/Videos/Video.php
Toolkit/Videos/VideosDataGrid.php

index a86785b..71ed4fe 100644 (file)
@@ -131,13 +131,13 @@ class Toolkit_Videos_AdminEditVideoForm
             'req' => false,
             'name' => 'pos'
         );
-        $e[] = array(
-            'type'    => 'select',
-            'req'     => false,
-            'name'    => 'page',
-            'display' => 'Page',
-            'opts'    => array('' => '-- Select --'),
-        );
+//        $e[] = array(
+//            'type'    => 'select',
+//            'req'     => false,
+//            'name'    => 'page',
+//            'display' => 'Page',
+//            'opts'    => array('' => '-- Select --'),
+//        );
         if ($appHasFeaturedVideos) {
             $e[] = array(
                 'type' => 'advcheckbox',
@@ -184,7 +184,7 @@ class Toolkit_Videos_AdminEditVideoForm
 
                $this->setupElements($e);
 
-        $this->loadPages($dbh);
+//        $this->loadPages($dbh);
        }
 
     /**
@@ -375,11 +375,7 @@ class Toolkit_Videos_AdminEditVideoForm
         } else {
             $video = new Toolkit_Videos_Video();
         }
-        $page = ($values['page'])
-            ? $values['page']
-            : null;
         $video->setVideo_url($values['video_url'])
-            ->setPage($page)
             ->setFeatured($values['featured'])
             ->setActive($values['active']);
         if ($newPos) {
index bd10e84..f1c20c7 100644 (file)
@@ -29,7 +29,7 @@ class Toolkit_Videos_Video
 
     protected $id;
     protected $video_url;
-    protected $page;
+//    protected $page;
     protected $pos;
     protected $featured;
     protected $active;
index 1e93d29..8fa210f 100644 (file)
@@ -145,16 +145,16 @@ class Toolkit_Videos_VideosDataGrid
             null
             )
         );
-        $this->addColumn(
-            new Structures_DataGrid_Column(
-                'Featured Page',
-                'page_name',
-                null,
-                array('style' => 'width:200px;'),
-                null,
-                null
-            )
-        );
+//        $this->addColumn(
+//            new Structures_DataGrid_Column(
+//                'Featured Page',
+//                'page_name',
+//                null,
+//                array('style' => 'width:200px;'),
+//                null,
+//                null
+//            )
+//        );
 
         $this->addColumn(
             new Structures_DataGrid_Column(
@@ -317,10 +317,8 @@ class Toolkit_Videos_VideosDataGrid
        public function setQuery()
        {
                $sql = "
-        SELECT v.*, p.navigation_name as page_name
-          FROM videos v
-            LEFT OUTER JOIN
-            pages p ON (p.id = v.page)";
+        SELECT *
+          FROM videos";
                parent::setQuery($sql);
        }