From 0179e027e185ad1c33d21062db1d09e561b96e39 Mon Sep 17 00:00:00 2001 From: Heshan Wanigasooriya Date: Thu, 4 Jun 2009 19:54:51 +0000 Subject: #461242 by batia : Fatal error: Cannot unset string offsets in /home/******/public_html/new/includes/form.inc on line 485, fixed. update video feeds links. --- .cvsignore | 1 + video.module | 21 ++++++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 .cvsignore diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 0000000..3a4edf6 --- /dev/null +++ b/.cvsignore @@ -0,0 +1 @@ +.project diff --git a/video.module b/video.module index d8a93e7..d3fee31 100644 --- a/video.module +++ b/video.module @@ -160,8 +160,6 @@ function video_link($type, $node = NULL) { } return array(); } - - /** * Displays a Drupal page containing recently added videos * @@ -169,6 +167,16 @@ function video_link($type, $node = NULL) { * string HTML output */ function video_page() { + theme('video_page', NULL); +} + +/** + * Displays a Drupal page containing recently added videos + * + * @return + * string HTML output + */ +function theme_video_page() { $output = ''; if (arg(1) != 'help') { //We are not reading help so output a list of recent video nodes. $result = pager_query(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'video' AND n.status = 1 ORDER BY n.created DESC"), variable_get('default_nodes_main', 10)); @@ -182,7 +190,7 @@ function video_page() { 'title' => variable_get('site_name', 'drupal') . ' ' . t('videos'), 'href' => url('video/feed/'))); - $output .= '
' . theme('feed_icon', url('video/feed')); + $output .= '
' . theme('feed_icon', url('video/feed'), t('Syndicate')); } return $output; } @@ -200,7 +208,7 @@ function video_feed() { 'link' => url('video', array('absolute' => TRUE)) ); - $result = db_query('SELECT n.nid FROM {node} n WHERE n.type = "video" AND n.status = 1 ORDER BY n.created DESC'); + $result = db_fetch_object(db_query('SELECT n.nid FROM {node} n WHERE n.type = "video" AND n.status = 1 ORDER BY n.created DESC')); node_feed($result, $channel); } @@ -1413,7 +1421,10 @@ function _video_scale_video(&$node) { */ function video_theme() { return array( - 'video_fields' => array( + 'video_page' => array( + 'arguments' => array(), + ), + 'video_fields' => array( 'arguments' => array('fields' => NULL), ), 'video_format_play' => array( -- cgit v1.2.3