This commit was manufactured by cvs2svn to create tag
[Packages/TYPO3.CMS.git] / typo3 / mod / tools / em / class.kickstarter.php
index 777527f..b440bdd 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 1999-2004 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
 /** 
- * Extension for Kickstarter extension used with extension repository...
+ * Wrapped for Kickstarter extension used with extension repository...
  *
- * @author     Kasper Skårhøj <kasper@typo3.com>
+ * $Id$
+ * Revised for TYPO3 3.6 November/2003 by Kasper Skaarhoj
+ *
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  */
 
 
-require_once(t3lib_extMgm::extPath("extrep_wizard")."pi/class.tx_extrepwizard.php");
+require_once(t3lib_extMgm::extPath('extrep_wizard').'pi/class.tx_extrepwizard.php');
 
+/**
+ * Wrapped for Kickstarter extension used with extension repository...
+ * (Originally the Kickstarter was designed to run from the frontend of the typo3.org website rather than from the backend of TYPO3! This is why we have to wrap the frontend plugin class in this way to fit it into the backend!)
+ *
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @package TYPO3
+ * @subpackage core
+ */
 class em_kickstarter extends tx_extrepwizard {
        
-
+       /**
+        * Setting internal PI input data.
+        *
+        * @return      void
+        */
        function getPIdata() {
-               $this->piData = t3lib_div::GPvar($this->varPrefix,1);
+               $this->piData = t3lib_div::_GP($this->varPrefix);
        }
+
+       /**
+        * Getting link to this page + extra parameters, we have specified
+        *
+        * @param       array           Additional parameters specified.
+        * @return      string          The URL
+        */
        function linkThisCmd($uPA=array())      {
-                       // Getting link to this page + extra parameters, we have specified
                $url = t3lib_div::linkThisScript($uPA);
                return $url;
        }
+
+       /**
+        * Font wrap function; Wrapping input string in a <span> tag with font family and font size set
+        *
+        * @param       string          Input value
+        * @return      string          Wrapped input value.
+        */
        function fw($str)       {
                return '<span style="font-family:verdana,arial,sans-serif; font-size:10px;">'.$str.'</span>';
        }
+
+       /**
+        * [Not active... - do not use]
+        *
+        * @return      void
+        */
        function makeRepositoryUpdateArray()    {
-               debug("not active in EM");
+               debug('not active in EM');
        }
+
+       /**
+        * Returns value from the fe_users field (faking that data...)
+        *
+        * @param       string          Field name
+        * @return      string          The faked field value
+        */
        function userField($fN) {
                switch($fN)     {
-                       case "name":
-                               return $GLOBALS["BE_USER"]->user["realName"];
+                       case 'name':
+                               return $GLOBALS['BE_USER']->user['realName'];
                        break;
-                       case "email":
-                               return $GLOBALS["BE_USER"]->user["email"];
+                       case 'email':
+                               return $GLOBALS['BE_USER']->user['email'];
                        break;
-                       case "username":
-                               return $GLOBALS["BE_USER"]->user["username"];
+                       case 'username':
+                               return $GLOBALS['BE_USER']->user['username'];
                        break;
                }
        }
@@ -67,8 +108,7 @@ class em_kickstarter extends tx_extrepwizard {
        
        
 // Include extension?
-if (defined("TYPO3_MODE") && $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["typo3/mod/tools/em/class.kickstarter.php"])       {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["typo3/mod/tools/em/class.kickstarter.php"]);
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/tools/em/class.kickstarter.php'])       {
+       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/tools/em/class.kickstarter.php']);
 }
-
-?>
\ No newline at end of file
+?>