|
From: Verdon V. <ve...@us...> - 2008-11-27 19:15:49
|
Update of /cvsroot/phpwebsite-comm/modules/podcaster/class In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32646/class Modified Files: PCR_Channel.php PCR_Episode.php PCR_Forms.php Podcaster.php Log Message: 1.2.0 changes Index: PCR_Episode.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/podcaster/class/PCR_Episode.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PCR_Episode.php 17 Mar 2008 15:53:53 -0000 1.4 --- PCR_Episode.php 27 Nov 2008 19:15:38 -0000 1.5 *************** *** 115,121 **** if ($icon) { $link = '<a href="./index.php?module=podcaster&id=' . $this->channel_id . '&uop=view_rss"><img src="./images/mod/podcaster/rss_sm.png" width="14" height="14" border="0" alt="' . dgettext('podcaster', 'Subscribe RSS') . '" title="' . dgettext('podcaster', 'Subscribe RSS') . '" /></a>'; ! return $link . ' ' . PHPWS_Text::rewriteLink($channel->title, 'podcaster', $this->channel_id); } else { ! return PHPWS_Text::rewriteLink($channel->title, 'podcaster', $this->channel_id); } } else { --- 115,121 ---- if ($icon) { $link = '<a href="./index.php?module=podcaster&id=' . $this->channel_id . '&uop=view_rss"><img src="./images/mod/podcaster/rss_sm.png" width="14" height="14" border="0" alt="' . dgettext('podcaster', 'Subscribe RSS') . '" title="' . dgettext('podcaster', 'Subscribe RSS') . '" /></a>'; ! return $link . ' ' . $channel->viewLink(); } else { ! return $channel->viewLink(); } } else { *************** *** 332,336 **** $key->setItemId($this->id); $key->setEditPermission('edit_episode'); ! if (MOD_REWRITE_ENABLED) { $key->setUrl('podcaster/' . $this->channel_id . '/' . $this->id); --- 332,337 ---- $key->setItemId($this->id); $key->setEditPermission('edit_episode'); ! $key->setUrl($this->viewLink(true)); ! /* if (MOD_REWRITE_ENABLED) { $key->setUrl('podcaster/' . $this->channel_id . '/' . $this->id); *************** *** 338,342 **** $key->setUrl('index.php?module=podcaster&uop=view_episode&episode_id=' . $this->id); } ! if ($this->approved) { $key->active = (int)$this->active; --- 339,343 ---- $key->setUrl('index.php?module=podcaster&uop=view_episode&episode_id=' . $this->id); } ! */ if ($this->approved) { $key->active = (int)$this->active; *************** *** 436,445 **** ! function viewLink() { ! // $vars['uop'] = 'view_episode'; ! // $vars['episode_id'] = $this->id; ! // return PHPWS_Text::moduleLink($this->title, 'podcaster', $vars); ! return PHPWS_Text::rewriteLink($this->title, 'podcaster', $this->channel_id, $this->id); } --- 437,452 ---- ! public function viewLink($bare=false) { ! PHPWS_Core::initCoreClass('Link.php'); ! $link = new PHPWS_Link($this->title, 'podcaster', array('channel'=>$this->channel_id, 'episode'=>$this->id)); ! $link->rewrite = MOD_REWRITE_ENABLED; ! ! if ($bare) { ! return $link->getAddress(); ! } else { ! return $link->get(); ! } ! } Index: Podcaster.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/podcaster/class/Podcaster.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Podcaster.php 9 Feb 2008 19:01:10 -0000 1.5 --- Podcaster.php 27 Nov 2008 19:15:38 -0000 1.6 *************** *** 258,261 **** --- 258,263 ---- } elseif (isset($_REQUEST['id'])) { $this->channel = new Podcaster_Channel($_REQUEST['id']); + } elseif (isset($_REQUEST['channel'])) { + $this->channel = new Podcaster_Channel($_REQUEST['channel']); } else { $this->channel = new Podcaster_Channel; *************** *** 271,274 **** --- 273,278 ---- } elseif (isset($_REQUEST['episode_id'])) { $this->episode = new Podcaster_Episode($_REQUEST['episode_id']); + } elseif (isset($_REQUEST['episode'])) { + $this->episode = new Podcaster_Episode($_REQUEST['episode']); } else { $this->episode = new Podcaster_Episode; *************** *** 399,403 **** 'link'=>$link); } ! if (Current_User::isUnrestricted('podcaster')) { $tags['info'] = array('title'=>dgettext('podcaster', 'Read me'), 'link'=>$link); --- 403,407 ---- 'link'=>$link); } ! if (Current_User::isDeity()) { $tags['info'] = array('title'=>dgettext('podcaster', 'Read me'), 'link'=>$link); Index: PCR_Forms.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/podcaster/class/PCR_Forms.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PCR_Forms.php 17 Mar 2008 19:07:12 -0000 1.8 --- PCR_Forms.php 27 Nov 2008 19:15:38 -0000 1.9 *************** *** 358,372 **** { $tpl['TITLE'] = dgettext('podcaster', 'Important Information'); ! $tpl['INFO_1_LABEL'] = dgettext('podcaster', 'About this module:'); ! $tpl['INFO_1'] = dgettext('podcaster', 'This is the second release of podcaster for the new 1.x series phpwebsite. This release takes advantage of the new File Cabinet 2.0 features, and media upload/embed tools are now built right in. Support for PDF and other documents types has also been added. Podcaster is now searchable with the search module, and new access module and short url features are implimented.'); ! $tpl['INFO_2_LABEL'] = dgettext('podcaster', 'A note on media types:'); ! $tpl['INFO_2'] = dgettext('podcaster', 'You may specify at a channel level what media type you will allow for all episodes in that channel. Ideally, you should determine this before adding episodes to a channel, though it can be changed at any time.'); ! $tpl['INFO_3_LABEL'] = dgettext('podcaster', 'A note on restricted users:'); ! $tpl['INFO_3'] = dgettext('podcaster', 'If you are allowing restricted users to add podcast episodes, you will also need to allow them to upload to the appropriate folder(s) in File Cabinet.'); ! $tpl['INFO_4_LABEL'] = dgettext('podcaster', 'A note on permissons:'); ! $tpl['INFO_4'] = dgettext('podcaster', 'Honestly, I\'m still working on understanding the new system completely. I\'ve done a basic security audit and although I am sure there is no gross holes, I\'m sure I may have something wrong too ;-) I wanted to get this rewrite out asap and will do a more thorough permissioning review for the next podcaster release.'); ! $tpl['INFO_5_LABEL'] = null; ! $tpl['INFO_5'] = null; $tpl['DONATE'] = sprintf(dgettext('podcaster', 'If you would like to help out with the ongoing development of Podcaster, or other modules by Verdon Vaillancourt, %s click here to donate %s (opens in new browser window).'), '<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=donations%40verdon%2eca&item_name=Podcaster%20Module%20Development&no_shipping=0&no_note=1&tax=0¤cy_code=USD&lc=CA&bn=PP%2dDonationsBF&charset=UTF%2d8" target="new">', '</a>'); --- 358,372 ---- { + $filename = 'mod/podcaster/docs/README'; + if (@fopen($filename, "rb")) { + $handle = fopen($filename, "rb"); + $readme = fread($handle, filesize($filename)); + fclose($handle); + } else { + $readme = dgettext('podcaster', 'Sorry, the readme file does not exist.'); + } + $tpl['TITLE'] = dgettext('podcaster', 'Important Information'); ! $tpl['INFO'] = $readme; $tpl['DONATE'] = sprintf(dgettext('podcaster', 'If you would like to help out with the ongoing development of Podcaster, or other modules by Verdon Vaillancourt, %s click here to donate %s (opens in new browser window).'), '<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=donations%40verdon%2eca&item_name=Podcaster%20Module%20Development&no_shipping=0&no_note=1&tax=0¤cy_code=USD&lc=CA&bn=PP%2dDonationsBF&charset=UTF%2d8" target="new">', '</a>'); Index: PCR_Channel.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/podcaster/class/PCR_Channel.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PCR_Channel.php 17 Mar 2008 15:53:53 -0000 1.5 --- PCR_Channel.php 27 Nov 2008 19:15:38 -0000 1.6 *************** *** 510,520 **** $key->setItemId($this->id); $key->setEditPermission('edit_channel'); ! ! if (MOD_REWRITE_ENABLED) { ! $key->setUrl('podcaster/' . $this->id); ! } else { ! $key->setUrl('index.php?module=podcaster&id=' . $this->id); ! } ! $key->active = (int)$this->active; $key->setTitle($this->title); --- 510,514 ---- $key->setItemId($this->id); $key->setEditPermission('edit_channel'); ! $key->setUrl($this->viewLink(true)); $key->active = (int)$this->active; $key->setTitle($this->title); *************** *** 536,542 **** ! function viewLink() { ! return PHPWS_Text::rewriteLink($this->title, 'podcaster', $this->id); } --- 530,546 ---- ! public function viewLink($bare=false) { ! PHPWS_Core::initCoreClass('Link.php'); ! // $link = new PHPWS_Link($this->title, 'podcaster', array('id'=>$this->id)); ! $link = new PHPWS_Link($this->title, 'podcaster', array('channel'=>$this->id)); ! $link->rewrite = MOD_REWRITE_ENABLED; ! ! if ($bare) { ! return $link->getAddress(); ! } else { ! return $link->get(); ! } ! } |