diff --git a/webtools/uninstall_survey/README b/webtools/uninstall_survey/README
index 58259bdadda..e69de29bb2d 100644
--- a/webtools/uninstall_survey/README
+++ b/webtools/uninstall_survey/README
@@ -1,52 +0,0 @@
-Mozilla Firefox Uninstall Survey
-================================
-
-
-How To Install
---------------
-
-Assumptions:
- 1) You've got a working database with the appropriate schema
- 2) You've got cake setup on your server already. The code you're looking at now
- is just what is in the /app/ directory - everything else will have to be on your
- server already.
-
-Steps:
-
-1) Copy config/database.php.default to config/database.php and fill in your database
-values (if you're only doing production, just fill in the production area).
-
-2) Edit /webroot/index.php.
- Define ROOT:
- If you're installing this in your home directory, ROOT should be:
-
- DS.'home'.DS.'username'.DS.'public_html'
-
- Define APP_DIR:
- ROOT is the parent directory of the app, this is the actual app.
- Continuing the example above, if people are going to go to:
- http://server.com/~username/survey/ to get to the app, APP_DIR should be:
-
- survey
-
- Define CAKE_CORE_INCLUDE_PATH:
- This is the path to the actual cake install on your server. For example:
-
- DS.'usr'.DS.'local'.DS.'lib'.DS.'php'.DS.'cake'
-
-3) Edit /webroot/.htaccess. Add a RewriteBase line below the line that says 'RewriteEngine On'.
-For our example, we would add the line:
-
- RewriteBase /~username/survey
-
-4) Edit /.htaccess. Add the same RewriteBase line from step 3 directly below the
-'RewriteEngine On' line.
-
-5) Go to the webroot/js/ directory and run the following two commands:
- ln -s plotkit-0.8/PlotKit/ plotkit
- ln -s MochiKit-1.3.1/lib/MochiKit/ mochikit
-
-
-
-
-Questions? Email clouserw@mozilla.com
diff --git a/webtools/uninstall_survey/config/acl.ini.php b/webtools/uninstall_survey/config/acl.ini.php
deleted file mode 100644
index 366a7add6f2..00000000000
--- a/webtools/uninstall_survey/config/acl.ini.php
+++ /dev/null
@@ -1,76 +0,0 @@
-;
-; SVN FILE: $Id: acl.ini.php,v 1.1 2006-05-24 19:14:24 uid815 Exp $
-;/**
-; * Short description for file.
-; *
-; *
-; * PHP versions 4 and 5
-; *
-; * CakePHP : Rapid Development Framework
-; * Copyright (c) 2006, Cake Software Foundation, Inc.
-; * 1785 E. Sahara Avenue, Suite 490-204
-; * Las Vegas, Nevada 89104
-; *
-; * Licensed under The MIT License
-; * Redistributions of files must retain the above copyright notice.
-; *
-; * @filesource
-; * @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
-; * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
-; * @package cake
-; * @subpackage cake.app.config
-; * @since CakePHP v 0.10.0.1076
-; * @version $Revision: 1.1 $
-; * @modifiedby $LastChangedBy: phpnut $
-; * @lastmodified $Date: 2006-05-24 19:14:24 $
-; * @license http://www.opensource.org/licenses/mit-license.php The MIT License
-; */
-
-; acl.ini.php - Cake ACL Configuration
-; ---------------------------------------------------------------------
-; Use this file to specify user permissions.
-; aco = access control object (something in your application)
-; aro = access request object (something requesting access)
-;
-; User records are added as follows:
-;
-; [uid]
-; groups = group1, group2, group3
-; allow = aco1, aco2, aco3
-; deny = aco4, aco5, aco6
-;
-; Group records are added in a similar manner:
-;
-; [gid]
-; allow = aco1, aco2, aco3
-; deny = aco4, aco5, aco6
-;
-; The allow, deny, and groups sections are all optional.
-; NOTE: groups names *cannot* ever be the same as usernames!
-;
-; ACL permissions are checked in the following order:
-; 1. Check for user denies (and DENY if specified)
-; 2. Check for user allows (and ALLOW if specified)
-; 3. Gather user's groups
-; 4. Check group denies (and DENY if specified)
-; 5. Check group allows (and ALLOW if specified)
-; 6. If no aro, aco, or group information is found, DENY
-;
-; ---------------------------------------------------------------------
-
-;-------------------------------------
-;Users
-;-------------------------------------
-
-[username-goes-here]
-groups = group1, group2
-deny = aco1, aco2
-allow = aco3, aco4
-
-;-------------------------------------
-;Groups
-;-------------------------------------
-
-[groupname-goes-here]
-deny = aco5, aco6
-allow = aco7, aco8
\ No newline at end of file
diff --git a/webtools/uninstall_survey/config/sql/sessions.sql b/webtools/uninstall_survey/config/sql/sessions.sql
deleted file mode 100644
index 3488faf8e3a..00000000000
--- a/webtools/uninstall_survey/config/sql/sessions.sql
+++ /dev/null
@@ -1,11 +0,0 @@
--- @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
--- @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
--- @since CakePHP v 0.10.8.1997
--- @version $Revision: 1.1 $
-
-CREATE TABLE cake_sessions (
- id varchar(255) NOT NULL default '',
- data text,
- expires int(11) default NULL,
- PRIMARY KEY (id)
-);
\ No newline at end of file
diff --git a/webtools/uninstall_survey/controllers/applications_controller.php b/webtools/uninstall_survey/controllers/applications_controller.php
index 40c9bf29bef..e69de29bb2d 100644
--- a/webtools/uninstall_survey/controllers/applications_controller.php
+++ b/webtools/uninstall_survey/controllers/applications_controller.php
@@ -1,7 +0,0 @@
-
diff --git a/webtools/uninstall_survey/controllers/choices_controller.php b/webtools/uninstall_survey/controllers/choices_controller.php
index 32e819e90d0..e69de29bb2d 100644
--- a/webtools/uninstall_survey/controllers/choices_controller.php
+++ b/webtools/uninstall_survey/controllers/choices_controller.php
@@ -1,7 +0,0 @@
-
diff --git a/webtools/uninstall_survey/controllers/collections_controller.php b/webtools/uninstall_survey/controllers/collections_controller.php
index f607536f651..e69de29bb2d 100644
--- a/webtools/uninstall_survey/controllers/collections_controller.php
+++ b/webtools/uninstall_survey/controllers/collections_controller.php
@@ -1,6 +0,0 @@
-
diff --git a/webtools/uninstall_survey/controllers/results_controller.php b/webtools/uninstall_survey/controllers/results_controller.php
index c79ea6130ac..e69de29bb2d 100644
--- a/webtools/uninstall_survey/controllers/results_controller.php
+++ b/webtools/uninstall_survey/controllers/results_controller.php
@@ -1,241 +0,0 @@
-Sanitize = new Sanitize();
-
- // Pagination Stuff
- $this->pagination_parameters['show'] = empty($_GET['show'])? '10' : $this->Sanitize->paranoid($_GET['show']);
- $this->pagination_parameters['sortBy'] = empty($_GET['sort'])? 'created' : $this->Sanitize->paranoid($_GET['sort']);
- $this->pagination_parameters['direction'] = empty($_GET['direction'])? 'desc': $this->Sanitize->paranoid($_GET['direction']);
- $this->pagination_parameters['page'] = empty($_GET['page'])? '1': $this->Sanitize->paranoid($_GET['page']);
- $this->pagination_parameters['order'] = $this->modelClass.'.'.$this->pagination_parameters['sortBy'].' '.strtoupper($this->pagination_parameters['direction']);
- }
-
- /**
- * Add a new result. This also means we're going to be adding to several other
- * tables (for the many to many relationships). First we'll show a form, then if
- * there is a $_POST, we'll process.
- */
- function add()
- {
- // If these are set in $_POST, we'll use that for the query. If this is set
- // in $_GET, then use that. If neither are set, make it blank, and we'll
- // fail later on
- $_input_name = $this->Sanitize->Sql(isset($this->data['application'][0]) ? $this->data['application'][0] : (isset($this->params['url']['application']) ? $this->params['url']['application'] : ''));
- $_input_ua = $this->Sanitize->Sql(isset($this->data['ua'][0]) ? $this->data['ua'][0] : (isset($this->params['url']['ua']) ? $this->params['url']['ua'] : ''));
-
- // The ua comes over $_GET in the form:
- // x.x.x.x (aa-bb)
- // Where x is the versions and a and b are locale information. We're not
- // interested in the locale information,
-
- $_conditions = "name LIKE '{$_input_name}' AND version LIKE '{$_input_ua}'";
- $_application = $this->Application->findAll($_conditions);
-
- if (empty($_application)) {
- // The application they entered in the URL is not in the db. We'll have
- // to put it in the db, but we don't want it to show up (in case they
- // just typed something in manually) so we'll flag it as not visible.
- $app = new Application();
- $app->set('name', $_input_name);
- $app->set('version', $_input_ua);
- $app->set('visible', 0);
- $app->save();
-
- $app_id = $app->getLastInsertID();
-
- // The database will handle any combination of questions
- // (issues/intentions) and applications+versions. However, since we're
- // adding stuff in that comes in over the URL, we kinda have to guess at
- // what questions should be associated. So, I'm running a stristr() on
- // the $_GET values to get a general set of questions to associate, and
- // then manually adding those values to the table.
- if (stristr($this->params['url']['application'], 'Firefox') !== false) {
- // Intention Id's
- $this->Application->query("INSERT INTO applications_collections VALUES ({$app_id}, ".DEFAULT_FIREFOX_INTENTION_SET_ID.")");
-
- // Issue Id's
- $this->Application->query("INSERT INTO applications_collections VALUES ({$app_id}, ".DEFAULT_FIREFOX_ISSUE_SET_ID.")");
-
- } elseif (stristr($this->params['url']['application'], 'Thunderbird') !== false) {
-
- // Intention Id's
- $this->Application->query("INSERT INTO applications_collections VALUES ({$app_id}, ".DEFAULT_THUNDERBIRD_INTENTION_SET_ID.")");
-
- // Issue Id's
- $this->Application->query("INSERT INTO applications_collections VALUES ({$app_id}, ".DEFAULT_THUNDERBIRD_ISSUE_SET_ID.")");
-
- } else {
- // Whatever they entered doesn't have firefox or thunderbird in it.
- // All they're going to see is a comment box on the other end.
- }
-
-
- // We could just get the last inserted id, but we need all the info
- // below. Also, cake caches the query, and won't return
- // anything if we don't alter it (add 1=1 to the end), since we already
- // did the same query earlier
- $_conditions = "name LIKE '{$_input_name}' AND version LIKE '{$_input_ua}' AND 1=1";
- $_application = $this->Application->findAll($_conditions);
- }
- // Pull the information for our radio buttons (only the
- // questions for their applications will be shown)
- $this->set('intentions', $this->Application->getIntentions($this->Sanitize->sql($_application[0]['Application']['id'])));
-
- // Checkboxes
- $this->set('issues', $this->Application->getIssues($this->Sanitize->sql($_application[0]['Application']['id'])));
-
- // We'll need the url parameters to put in hidden fields
- $this->set('url_params', $this->Sanitize->html($this->params['url']));
-
- // If there is no $_POST, show the form, otherwise, process the data and
- // forward the user on.
- if (empty($this->params['data'])) {
- $this->render();
- } else {
- // Add the application id from the last cake query
- $this->params['data'] = $this->params['data'] + $_application[0];
- if ($this->Result->save($this->params['data'])) {
- // Redirect
- $this->flash('Thank you.', '/results');
- exit;
- } else {
- // Saving failed. This probably means a required field wasn't set.
- // Should we tell them it failed, or just redirect? Hmm...
- $this->flash('Thank you.', '/results');
- exit;
- }
- }
- }
-
- /**
- * Front page will show the graph
- */
- function index()
- {
- // Products dropdown
- $this->set('products', $this->Application->findAll('visible=1', null, 'Application.name ASC,Application.version DESC'));
-
- // Fill in all the data passed in $_GET
- $this->set('url_params',$this->decodeAndSanitize($this->params['url']));
-
- // Give us some breadcrumbs
- $this->set('breadcrumbs', array('Home' => 'http://mozilla.org', 'Uninstall Survey Results' => ''));
-
- // We'll need to include the graphing libraries
- $this->set('include_graph_libraries', true);
-
- // Fill in our question sets
- $this->set('collections',$this->Application->getCollectionsFromUrl($this->params['url'],'issue'));
-
- // Core data to show on page
- $this->set('descriptionAndTotalsData',$this->Result->getDescriptionAndTotalsData($this->params['url']));
- }
-
- /**
- * Display a table of user comments
- */
- function comments()
- {
- // Products dropdown
- $this->set('products', $this->Application->findAll('visible=1', null, 'Application.name ASC,Application.version DESC'));
-
- // Fill in all the data passed in $_GET
- $this->set('url_params',$this->decodeAndSanitize($this->params['url']));
-
- // Give us some breadcrumbs
- $this->set('breadcrumbs', array('Home' => 'http://mozilla.org', 'Uninstall Survey Results' => 'results/', 'Comments' => ''));
-
- // Fill in our question sets
- $this->set('collections',$this->Application->getCollectionsFromUrl($this->params['url'],'issue'));
-
- // Core data to show on page
- $this->set('commentsData',$this->Result->getComments($this->params['url'], $this->pagination_parameters));
-
- // Pagination settings
- $paging['count'] = $this->Result->getCommentCount();
- $paging['style'] = 'html';
- $paging['link'] = "/results/comments/?collection=".urlencode($this->params['url']['collection'])."&product=".urlencode($this->params['url']['product'])."&start_date=".urlencode($this->params['url']['start_date'])."&end_date=".urlencode($this->params['url']['end_date'])."&show={$this->pagination_parameters['show']}&sort={$this->pagination_parameters['sortBy']}&direction={$this->pagination_parameters['direction']}&page=";
- $paging['page'] = $this->pagination_parameters['page'];
- $paging['limit'] = $this->pagination_parameters['show'];
- $paging['show'] = array('10','25','50');
-
- // No point in showing them an error if they click on "show 50" but they are
- // already on the last page.
- if ($paging['count'] < ($this->pagination_parameters['page'] * ($this->pagination_parameters['show']/2))) {
- $this->pagination_parameters['page'] = $paging['page'] = 1;
- }
-
- // Set pagination array
- $this->set('paging',$paging);
-
-
-
- }
-
- /**
- * Display a csv
- */
- function csv()
- {
- // Get rid of the header/footer/etc.
- $this->layout = null;
-
- // Auto generated .csv's are turned off since they were taking too much
- // cpu/ram. If you turn them back on, be sure to check the code - there was
- // a substantial database change between the time they were disabled and now.
- return false;
-
- $csv = new csv();
-
- $csv->loadDataFromArray($this->Result->getCsvExportData($this->params['url'], false));
-
- // Our CSV library sends headers and everything. Keep the view empty!
- $csv->sendCSV();
-
- // I'm not exiting here in case someone is going to use post callback stuff.
- // In development, that means extra lines get added to our CSVs, but in
- // production it should be clean.
- }
-
-
-}
-?>
diff --git a/webtools/uninstall_survey/models/application.php b/webtools/uninstall_survey/models/application.php
index 29770ce41e1..c1e80fc74ac 100644
--- a/webtools/uninstall_survey/models/application.php
+++ b/webtools/uninstall_survey/models/application.php
@@ -1,4 +1,41 @@
(Original Author)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
uses('Sanitize');
class Application extends AppModel {
var $name = 'Application';
diff --git a/webtools/uninstall_survey/models/choice.php b/webtools/uninstall_survey/models/choice.php
index 5685b1c6c75..e69de29bb2d 100644
--- a/webtools/uninstall_survey/models/choice.php
+++ b/webtools/uninstall_survey/models/choice.php
@@ -1,10 +0,0 @@
- array('className' => 'Result', 'uniq' => true ),
- 'Collection' => array('className' => 'Collection', 'uniq' => true )
- );
-}
-?>
diff --git a/webtools/uninstall_survey/models/collection.php b/webtools/uninstall_survey/models/collection.php
index 5d34381d068..e69de29bb2d 100644
--- a/webtools/uninstall_survey/models/collection.php
+++ b/webtools/uninstall_survey/models/collection.php
@@ -1,15 +0,0 @@
- array( 'className' => 'Application',
- 'joinTable' => 'applications_collections',
- 'foreignKey' => 'collection_id',
- 'associationForeignKey' => 'application_id'
- ),
- 'Choice' => array('className' => 'Choice')
- );
-
-}
-?>
diff --git a/webtools/uninstall_survey/models/result.php b/webtools/uninstall_survey/models/result.php
index de3c1161f89..4875b19de4c 100644
--- a/webtools/uninstall_survey/models/result.php
+++ b/webtools/uninstall_survey/models/result.php
@@ -1,4 +1,41 @@
(Original Author)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
class Result extends AppModel {
var $name = 'Result';
diff --git a/webtools/uninstall_survey/vendors/csv/csv.php b/webtools/uninstall_survey/vendors/csv/csv.php
index 2bf206671a8..e69de29bb2d 100644
--- a/webtools/uninstall_survey/vendors/csv/csv.php
+++ b/webtools/uninstall_survey/vendors/csv/csv.php
@@ -1,78 +0,0 @@
-filename = $name;
-
- if (empty($this->filename)) {
- $this->filename = 'export-'.date('Y-m-d').'.csv';
- }
- }
-
-
- /**
- * Function to load data from an array into the object
- * @param array a 2 dimensional array
- */
- function loadDataFromArray(&$array)
- {
- $this->data = $array;
- }
-
- /**
- * Will send the CSV to the browser (including headers)
- */
- function sendCSV()
- {
- $this->_sendHeaders();
-
- $this->_cleanData();
-
- foreach ($this->data as $var => $val) {
- // We put quotes around each value here
- $line = implode('","',$val);
- echo "\"{$line}\"\n";
- }
- }
-
- /**
- * Cleans data for export into a csv (quotes and newlines)
- * @access private
- */
- function _cleanData()
- {
- foreach ($this->data as $var => $val) {
- // escape the quotes by doubling them
- $val = str_replace('"','""',$val);
-
- // fix newlines
- $val = str_replace("\n\r", "\n", str_replace("\r", "\n", $val));
- }
- }
-
- /**
- * Sends headers for a .csv
- * @access private
- */
- function _sendHeaders()
- {
- header("Content-type: application/x-csv");
- header('Content-disposition: inline; filename="'.$this->filename.'"');
- header('Cache-Control: private');
- header('Pragma: public');
- }
-
-}
diff --git a/webtools/uninstall_survey/views/elements/footer.thtml b/webtools/uninstall_survey/views/elements/footer.thtml
index c76320ac211..e69de29bb2d 100644
--- a/webtools/uninstall_survey/views/elements/footer.thtml
+++ b/webtools/uninstall_survey/views/elements/footer.thtml
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-