List Info

Thread: link_GotoUrlCommand.php




link_GotoUrlCommand.php
user name
2006-11-20 19:30:35
Update of
/var/cvs/Geeklog-2.x/Geeklog-2.x/plugins/link/commands
In directory
iowaoutdoors:/tmp/cvs-serv4580/plugins/link/commands

Modified Files:
	link_GotoUrlCommand.php 
Log Message:
Using right named query now.

Index: link_GotoUrlCommand.php
============================================================
=======
RCS file:
/var/cvs/Geeklog-2.x/Geeklog-2.x/plugins/link/commands/link_
GotoUrlCommand.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** link_GotoUrlCommand.php	2 Apr 2006 20:59:05 -0000	1.1
--- link_GotoUrlCommand.php	20 Nov 2006 19:30:33 -0000	1.2
***************
*** 13,27 ****
   * Base command to extend
   */
! require_once 'commands/Geeklog_BaseCommandUser.php';
  
  /**
   * Link model object
   */
! require_once 'plugins/link/models/Gl2Link.php';
! 
! /**
!  * DAO factory
!  */
! require_once 'DataAccess/DAO.php';
  
  /**
--- 13,22 ----
   * Base command to extend
   */
! require getOption('path_commands') .
'Geeklog_BaseCommandUser.php';
  
  /**
   * Link model object
   */
! require getOption('path_plugins') .
'link/models/Gl2Link.php';
  
  /**
***************
*** 41,44 ****
--- 36,51 ----
      private $urlArgs = null;
      
+     public static function getActions()
+     {
+     	return array('passthru');
+     }
+     
+     public static function getForwards()
+     {
+     	$forwards = array();
+     	$forwards[] = new
Geeklog_MVCnPHP_Forward('error',Geeklog_MVCnPHP_Forward::VIE
W,'admin');
+     	return $forwards;
+     }
+     
      /**
       * Constructor
***************
*** 69,81 ****
      public function execute()
      {
-         global $linkConf;
-         
          // Get DAO, note that here we are grabbing plugin
specific DAO options
! 		$dao =
&Geeklog_DAO::singleton($linkConf['dao_options']);
  		
  		// Get the link requested
! 		$link = new GL2Link();
! 		$link->setLinkId($this->urlArgs[2]);
! 		$link = $dao->get($link);
  		
  		// Increment click counter
--- 76,86 ----
      public function execute()
      {
          // Get DAO, note that here we are grabbing plugin
specific DAO options
! 		$dao =
&Geeklog_DAO::singleton(getOption('dao_options','link'))
;
  		
  		// Get the link requested
! 		//print_r($this->urlArgs); exit;
! 		$retVal = $dao->find('getLinkByIdOrRewriteId',
array($this->urlArgs[2], $this->urlArgs[2]));
! 		$link = $retVal[0];	
  		
  		// Increment click counter

_______________________________________________
geeklog2-cvs mailing list
geeklog2-cvslists.geeklog.net
http://lists.geeklog.net/mailman/listinfo/geeklog2-cvs

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )