17bc81e2996fe9fca32f6e0206808af5f75681c3
Author: Jonathan Bradley
Date: 2009-07-26 05:11:31 -0400
diff --git a/controllers/components/empty b/controllers/components/empty
new file mode 100644
index 0000000..e69de29
diff --git a/locale/eng/LC_MESSAGES/empty b/locale/eng/LC_MESSAGES/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/models/behaviors/empty b/models/behaviors/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/models/datasources/empty b/models/datasources/empty
new file mode 100644
index 0000000..e69de29
diff --git a/plugins/dreamhost/controllers/components/dreamhost.php b/plugins/dreamhost/controllers/components/dreamhost.php
index b8e2ea3..6f9c21d 100644
--- a/plugins/dreamhost/controllers/components/dreamhost.php
+++ b/plugins/dreamhost/controllers/components/dreamhost.php
@@ -10,7 +10,12 @@ class DreamhostComponent extends Object {
function initialize(&$controller, $settings = array()) {
$this->Settings =& ClassRegistry::init('Setting');
$this->Settings = $this->Settings->settings();
- $this->key = $this->Settings['key'];
+ $this->key = $this->Settings['dreamhost_key'];
+ }
+
+ function find($command) {
+ $this->dreamhost->configs($this->key, $this->uuid());
+ return $this->dreamhost->connect($command);
}
function startup() {
@@ -43,21 +48,6 @@ class DreamhostComponent extends Object {
return $str;
}
- function save($params) {
- $this->dreamhost->configs($this->key, $this->uuid());
- return $this->dreamhost->connect('mysql-add_hostname', $params);
- }
-
- function delete($cmd, $params) {
- $this->dreamhost->configs($this->key, $this->uuid());
- return $this->dreamhost->connect($cmd, $params);
- }
-
- function find($command) {
- $this->dreamhost->configs($this->key, $this->uuid());
- return $this->dreamhost->connect($command);
- }
-
}
?>
\ No newline at end of file
diff --git a/plugins/dreamhost/controllers/components/empty b/plugins/dreamhost/controllers/components/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/plugins/dreamhost/controllers/crons_controller.php b/plugins/dreamhost/controllers/crons_controller.php
deleted file mode 100644
index a72e925..0000000
--- a/plugins/dreamhost/controllers/crons_controller.php
+++ /dev/null
@@ -1,113 +0,0 @@
-<?php
-
-class CronsController extends DreamhostAppController {
-
- var $name = 'Crons';
- var $uses = array('Dreamhost.DreamhostUser', 'Dreamhost.DreamhostDomain', 'Dreamhost.DreamhostRegistered', 'Dreamhost.DreamhostHostname');
- var $components = array('Dreamhost.Dreamhost');
-
- function beforeFilter() {
- parent::beforeFilter();
- }
-
- function setup() {
- echo 'Pulling data from dreamhost';
- $this->users(0);
- $this->domains(0);
- $this->registered(0);
- $this->hostnames(0);
- $this->Session->setFlash('First Data Aggregation done');
- $this->redirect(array('controller' => 'domains'));
- }
-
- function users($redirect = 1) {
- $data = $this->Dreamhost->find('user-list_users');
- $this->DreamhostUser->truncate();
- foreach ($data as $key => $value) {
-
- $users['DreamhostUser'] = (array)$value;
- if ($this->DreamhostUser->check($users) == 0) {
- $this->DreamhostUser->create();
- $this->DreamhostUser->save($users);
- $new++;
- }
- else {
- $this->DreamhostUser->save($users['User']);
- $old++;
- }
- }
- if ($redirect == 1) {
- $this->Session->setFlash('Database updated');
- $this->redirect(array('controller' => 'users', 'action' => 'index'));
- }
- }
-
- function domains($redirect = 1) {
- $data = $this->Dreamhost->find('domain-list_domains');
- $this->DreamhostDomain->truncate();
- foreach ($data as $key => $value) {
- $domain['DreamhostDomain'] = (array)$value;
- if (isset($value->user) && $value->user != null) {
- $domain['DreamhostDomain']['user_id'] = $this->DreamhostUser->getUser($value->user);
- }
-
-
- if ($this->DreamhostDomain->check($domain) == 0) {
- $this->DreamhostDomain->create();
- $this->DreamhostDomain->save($domain);
- }
- else {
- $this->DreamhostDomain->save($domain['DreamhostDomain']);
- }
- }
- if ($redirect == 1) {
- $this->Session->setFlash('Database updated');
- $this->redirect(array('controller' => 'domains', 'action' => 'index'));
- }
- }
-
-
- function hostnames($redirect = 1) {
- $this->domains(0);
- $data = $this->Dreamhost->find('mysql-list_hostnames');
- $this->DreamhostHostname->truncate();
- foreach ($data as $key => $value) {
- $hostname['DreamhostHostname'] = (array)$value;
- $hostname['DreamhostHostname']['domain_id'] = $this->DreamhostDomain->getDomain($value->domain);
- if ($this->DreamhostHostname->check($hostname) == 0) {
-
- $this->DreamhostHostname->create();
- $this->DreamhostHostname->save($hostname);
- }
- else {
- $this->DreamhostHostname->save($hostname['DreamhostHostname']);
- }
- }
- if ($redirect == 1) {
- $this->Session->setFlash('Database updated');
- $this->redirect(array('controller' => 'databases', 'action' => 'hostnames'));
- }
- }
-
- function registered($redirect = 1) {
- $data = $this->Dreamhost->find('domain-list_registrations');
- $this->DreamhostRegistered->truncate();
- foreach ($data as $key => $value) {
- $registered['DreamhostRegistered'] = (array)$value;
-
- if ($this->DreamhostRegistered->check($registered) == 0) {
- $this->DreamhostRegistered->create();
- $this->DreamhostRegistered->save($registered);
- }
- else {
- $this->DreamhostReserved->save($registered['DreamhostRegistered']);
- }
- }
- if ($redirect == 1) {
- $this->Session->setFlash('Database updated');
- $this->redirect(array('controller' => 'domains', 'action' => 'registered'));
- }
-
- }
-}
-?>
\ No newline at end of file
diff --git a/plugins/dreamhost/controllers/databases_controller.php b/plugins/dreamhost/controllers/databases_controller.php
deleted file mode 100644
index 0f80258..0000000
--- a/plugins/dreamhost/controllers/databases_controller.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-
-class DatabasesController extends DreamhostAppController {
-
- var $name = 'Databases';
- var $uses = array('Dreamhost.DreamhostHostname');
- var $components = array('Dreamhost.Dreamhost');
-
- function beforeFilter() {
- parent::beforeFilter();
- }
-
- function index() {
- $data = $this->DreamhostDomain->getList();
- $this->set(compact('data'));
- }
-
- function hostnames() {
- $data = $this->DreamhostHostname->find('all');
- $this->set(compact('data'));
- }
-
- function users() {
- $data = $this->DreamhostDatabase->find('mysql-list_users');
- $this->set(compact('data'));
- }
-
- function delete_hostname($hostname, $id) {
- $response = $this->DreamhostDreamhost->delete('mysql-remove_hostname', array('hostname' => $hostname));
- switch ($response) {
- case 'hostname_removed':
- case 'success':
- $this->Session->setFlash('Hostname Deleted');
- break;
- case 'no_hostname':
- case 'invalid_hostname':
- case 'internal_error_removing_hostname':
- $this->Session->setFlash('Hostname Not Deleted');
- break;
- }
- $this->DreamhostHostname->del($id);
- $this->redirect('hostnames', null, false);
- }
-
- function add_host() {
- if (!empty($this->data)) {
- $hostname = implode('.', $this->data['DreamhostDatabase']);
- $response = $this->DreamhostDreamhost->save(array('hostname' => $hostname));
- $response = str_replace('_', ' ', $response);
- $response = ucwords($response);
- $this->Session->setFlash($response);
- $this->redirect(array('controller' => 'crons', 'action' => 'hostnames'), null, false);
- }
- $domain = $this->Dreamhost->hostnames();
- $this->set(compact('domain'));
- }
-
- function domains() {
- $domains = $this->DreamhostDomain->find('list', array('fields' => array('Domain.id', 'DreamhostDomain.domain')));
- foreach ($domains as $key => $value) {
- $domain[$value] = $value;
- }
- return $domain;
- }
-}
-?>
\ No newline at end of file
diff --git a/plugins/dreamhost/controllers/domains_controller.php b/plugins/dreamhost/controllers/domains_controller.php
deleted file mode 100644
index 534d5d0..0000000
--- a/plugins/dreamhost/controllers/domains_controller.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-class DomainsController extends DreamhostAppController {
-
- var $name = 'Domains';
- var $uses = array('Dreamhost.DreamhostDomain', 'Dreamhost.DreamhostRegistered');
-
- function index() {
- $data = $this->DreamhostDomain->getList();
- $this->set(compact('data'));
- }
-
- function registered() {
- $data = $this->DreamhostRegistered->find('all');
- $this->set(compact('data'));
- }
-}
-?>
\ No newline at end of file
diff --git a/plugins/dreamhost/controllers/fetch_controller.php b/plugins/dreamhost/controllers/fetch_controller.php
new file mode 100644
index 0000000..f1b4bb7
--- /dev/null
+++ b/plugins/dreamhost/controllers/fetch_controller.php
@@ -0,0 +1,54 @@
+<?php
+
+class FetchController extends DreamhostAppController {
+
+ var $name = 'Fetch';
+ var $uses = array();
+ var $components = array('Dreamhost.Dreamhost');
+ var $helpers = array('Dreamhost.Dreamhost');
+
+ var $functions = array(
+ 'announcement_list-list_lists',
+ 'announcement_list-list_subscribers',
+ 'domain-list_domains',
+ 'domain-list_registrations',
+ 'dns-list_records',
+ 'mysql-list_dbs',
+ 'mysql-list_hostnames',
+ 'mysql-list_users',
+ 'mail-list_filters',
+ 'user-list_users',
+ 'user-list_users_no_pw',
+ 'dreamhost_ps-list_pending_ps',
+ 'dreamhost_ps-list_ps',
+ 'dreamhost_ps-list_settings',
+ 'dreamhost_ps-list_size_history',
+ 'dreamhost_ps-list_reboot_history',
+ 'dreamhost_ps-list_usage',
+ );
+
+ function index() {
+ if (!empty($this->data)) {
+ $data = $this->Dreamhost->find($this->data['Fetch']['command']);
+ if (is_array($data)) $this->set('data', $data);
+ }
+ $this->set('cmds', $this->commands());
+ }
+
+ function commands() {
+ foreach ($this->functions as $key => $value) {
+ $clean = str_replace(array('_', '-'), ' ', $value);
+ $clean = ucwords($clean);
+ $cmd[$value] = $clean;
+ }
+ return $cmd;
+ }
+
+
+ function sFlash($command, $response) {
+ $this->Session->setFlash(ucwords(str_replace('_', ' ', $response)));
+ $this->redirect(array('action' => 'fetch', str_replace('remove', 'list', $command) . 's'), null, false);
+ }
+
+}
+?>
\ No newline at end of file
diff --git a/plugins/dreamhost/controllers/users_controller.php b/plugins/dreamhost/controllers/users_controller.php
deleted file mode 100644
index b94a682..0000000
--- a/plugins/dreamhost/controllers/users_controller.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-
-class UsersController extends DreamhostAppController {
-
- var $name = 'Users';
- var $uses = array('Dreamhost.DreamhostUser');
-
- function index() {
- $data = $this->DreamhostUser->getList();
- $this->set(compact('data'));
- }
-}
-?>
\ No newline at end of file
diff --git a/plugins/dreamhost/dreamhost_app_controller.php b/plugins/dreamhost/dreamhost_app_controller.php
index 14e8e94..6a2d20e 100644
--- a/plugins/dreamhost/dreamhost_app_controller.php
+++ b/plugins/dreamhost/dreamhost_app_controller.php
@@ -1,8 +1,7 @@
<?php
class DreamhostAppController extends AppController {
-
-
-
+ //var $components = array('DebugKit.Toolbar');
+ var $helpers = array('Html', 'Form', 'Javascript');
}
?>
\ No newline at end of file
diff --git a/plugins/dreamhost/dreamhost_app_model.php b/plugins/dreamhost/dreamhost_app_model.php
deleted file mode 100644
index 9724242..0000000
--- a/plugins/dreamhost/dreamhost_app_model.php
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-
-class DreamhostAppModel extends AppModel {
-}
-?>
\ No newline at end of file
diff --git a/plugins/dreamhost/models/dreamhost_database.php b/plugins/dreamhost/models/dreamhost_database.php
deleted file mode 100644
index e69de29..0000000
diff --git a/plugins/dreamhost/models/dreamhost_domain.php b/plugins/dreamhost/models/dreamhost_domain.php
deleted file mode 100644
index cb73b11..0000000
--- a/plugins/dreamhost/models/dreamhost_domain.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-
-class DreamhostDomain extends DreamhostAppModel {
-
- var $name = 'DreamhostDomain';
- var $actAs = array('Containable');
- var $belongsTo = array(
- 'DreamhostUser' => array(
- 'className' => 'DreamhostUser',
- 'foreignKey' => 'dreamhost_user_id'
- )
- );
-
- function getList() {
- return $this->find('all', array(
- 'conditions' => array(
- 'DreamhostDomain.type !=' => 'mysqldns'
- ),
- 'fields' => array(
- 'DreamhostDomain.domain',
- 'DreamhostDomain.path',
- 'DreamhostDomain.home',
- 'DreamhostUser.username',
- 'DreamhostUser.password',
- 'DreamhostUser.shell',
- 'DreamhostUser.type')
- )
- );
- }
-
- function getDreamhostDomain($domain) {
- $domains = $this->find('first', array(
- 'conditions' => array(
- 'DreamhostDomain' => $domain
- ),
- 'fields' => array(
- 'DreamhostDomain.id'
- )
- ));
- return $domains['DreamhostDomain']['id'];
- }
-
- function check($data) {
- return $this->find('count', array(
- 'conditions' => array(
- 'domain' => $data['DreamhostDomain']['domain']
- )
- ));
- }
-
- function truncate() {
- $this->query('TRUNCATE TABLE ' . $this->useTable);
- }
-}
-?>
\ No newline at end of file
diff --git a/plugins/dreamhost/models/dreamhost_hostname.php b/plugins/dreamhost/models/dreamhost_hostname.php
deleted file mode 100644
index 6883356..0000000
--- a/plugins/dreamhost/models/dreamhost_hostname.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-
-class DreamhostHostname extends DreamhostAppModel {
-
- var $name = 'DreamhostHostname';
- var $belongsTo = array(
- 'DreamhostDomain' => array(
- 'className' => 'DreamhostDomain',
- 'foreignKey' => 'dreamhost_domain_id'
- )
- );
-
- function getList() {
- return $this->find('all', array(
- 'conditions' => array(
- 'DreamhostDomain.type !=' => 'mysqldns'
- ),
- 'fields' => array(
- 'DreamhostDomain.domain',
- 'DreamhostDomain.path',
- 'DreamhostDomain.home',
- 'DreamhostUser.username',
- 'DreamhostUser.password',
- 'DreamhostUser.shell',
- 'DreamhostUser.type'
- )
- ));
- }
-
- function check($data) {
- return $this->find('count', array(
- 'conditions' => array(
- 'domain' => $data['DreamhostHostname']['domain']
- )
- ));
- return $domain;
- }
-
- function truncate() {
- $this->query('TRUNCATE TABLE ' . $this->useTable);
- }
-}
-?>
\ No newline at end of file
diff --git a/plugins/dreamhost/models/dreamhost_registered.php b/plugins/dreamhost/models/dreamhost_registered.php
deleted file mode 100644
index 8217e7e..0000000
--- a/plugins/dreamhost/models/dreamhost_registered.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-
-class DreamhostRegistered extends DreamhostAppModel {
-
- var $name = 'DreamhostRegistered';
- var $useTable = 'dreamhost_registered';
-
- function check($data) {
- return $this->find('count', array(
- 'conditions' => array(
- 'domain' => $data['DreamhostRegistered']['domain']
- )
- ));
- }
-
- function truncate() {
- $this->query('TRUNCATE TABLE ' . $this->useTable);
- }
-}
-?>
\ No newline at end of file
diff --git a/plugins/dreamhost/models/dreamhost_user.php b/plugins/dreamhost/models/dreamhost_user.php
deleted file mode 100644
index 75eabe5..0000000
--- a/plugins/dreamhost/models/dreamhost_user.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-class DreamhostUser extends DreamhostAppModel {
-
- var $name = 'DreamhostUser';
-
- function getList() {
- return $this->find('all', array(
- 'fields' => array('DreamhostUser.username', 'DreamhostUser.home', 'DreamhostUser.password', 'DreamhostUser.shell', 'DreamhostUser.type')
- ));
- }
-
- function check($data) {
- return $this->find('count', array(
- 'conditions' => array(
- 'username' => $data['DreamhostUser']['username']
- )
- ));
- }
-
- function getUser($username) {
- $user = $this->find('first', array(
- 'conditions' => array(
- 'username' => $username
- ),
- 'fields' => array('DreamhostUser.id')
- ));
- return $user['DreamhostUser']['id'];
- }
-
- function truncate() {
- $this->query('TRUNCATE TABLE ' . $this->useTable);
- }
-}
-?>
\ No newline at end of file
diff --git a/plugins/dreamhost/views/databases/add_host.ctp b/plugins/dreamhost/views/databases/add_host.ctp
deleted file mode 100644
index fd2075e..0000000
--- a/plugins/dreamhost/views/databases/add_host.ctp
+++ /dev/null
@@ -1,8 +0,0 @@
-<h2>Add MySQL Hostname</h2>
-
-<?php
-echo $form->create('DreamhostDatabase', array('action' => 'add_host'));
-echo $form->input('prefix');
-echo $form->input('domain', array('type' => 'select', 'empty' => 'Select Domain', 'options' => $domain));
-echo $form->end('Add Hostname');
-?>
\ No newline at end of file
diff --git a/plugins/dreamhost/views/databases/hostnames.ctp b/plugins/dreamhost/views/databases/hostnames.ctp
deleted file mode 100644
index fc2cbab..0000000
--- a/plugins/dreamhost/views/databases/hostnames.ctp
+++ /dev/null
@@ -1,21 +0,0 @@
-<h2>Current Hostnames</h2>
-<?php echo $html->link('Update From Dreamhost', array('controller' => 'crons', 'action' => 'hostnames')); ?> |
-<?php echo $html->link('Add Hostname', array('action' =>'add_host'), null, null, false) ?>
-<table>
- <tr>
- <th>Domain</th>
- <th>Server</th>
- <th>Action</th>
- </tr>
- <?php foreach($data as $key => $value) { ?>
- <tr>
- <td><?php echo $value['DreamhostDomain']['domain']; ?></td>
- <td><?php echo $value['DreamhostHostname']['home']; ?></td>
- <td>
- <?php
- echo $html->link('Delete', array('action' =>'delete_hostname', $value['DreamhostDomain']['domain'], $value['DreamhostHostname']['id']), null, 'Are you sure?', false)
- ?>
- </td>
- </tr>
- <?php } ?>
-</table>
\ No newline at end of file
diff --git a/plugins/dreamhost/views/databases/index.ctp b/plugins/dreamhost/views/databases/index.ctp
deleted file mode 100644
index 727d9c2..0000000
--- a/plugins/dreamhost/views/databases/index.ctp
+++ /dev/null
@@ -1,15 +0,0 @@
-<h2>Current Databases</h2>
-<table>
- <tr>
- <th>Name</th>
- <th>Disk Usuage (MB)</th>
- <th>Type</th>
- </tr>
- <?php foreach($data as $key => $value) { ?>
- <tr>
- <td><?php echo $value->db; ?></td>
- <td><?php echo $value->disk_usage_mb; ?></td>
- <td><?php echo $value->description; ?></td>
- </tr>
- <?php } ?>
-</table>
\ No newline at end of file
diff --git a/plugins/dreamhost/views/databases/users.ctp b/plugins/dreamhost/views/databases/users.ctp
deleted file mode 100644
index edd3af5..0000000
--- a/plugins/dreamhost/views/databases/users.ctp
+++ /dev/null
@@ -1,36 +0,0 @@
-<h2>Current Databases Users</h2>
-<table>
- <tr>
- <th>Username</th>
- <th>Database</th>
- <th>Hostname</th>
- <th>Alter</th>
- <th>Index</th>
- <th>Create</th>
- <th>Update</th>
- <th>Select</th>
- <th>Insert</th>
- <th>Drop</th>
- <th>Delete</th>
- </tr>
- <?php foreach($data as $key => $value) { ?>
- <tr>
- <td><?php echo $value->username; ?></td>
- <td><?php echo $value->db; ?></td>
- <td>
- <?php
- if ($value->host == '') echo 'localhost';
- else echo $value->host;
- ?>
- </td>
- <td><?php echo $value->alter_priv; ?></td>
- <td><?php echo $value->index_priv; ?></td>
- <td><?php echo $value->create_priv; ?></td>
- <td><?php echo $value->update_priv; ?></td>
- <td><?php echo $value->select_priv; ?></td>
- <td><?php echo $value->insert_priv; ?></td>
- <td><?php echo $value->drop_priv; ?></td>
- <td><?php echo $value->delete_priv; ?></td>
- </tr>
- <?php } ?>
-</table>
\ No newline at end of file
diff --git a/plugins/dreamhost/views/domains/index.ctp b/plugins/dreamhost/views/domains/index.ctp
deleted file mode 100644
index 3382c9b..0000000
--- a/plugins/dreamhost/views/domains/index.ctp
+++ /dev/null
@@ -1,23 +0,0 @@
-<h2>Active Domains</h2>
-<? echo $html->link('Update From Dreamhost', array('controller' => 'crons', 'action' => 'domains')); ?>
-<table>
- <tr>
- <th>Name</th>
- <th>Path</th>
- <th>FTP Address</th>
- <th>Username</th>
- <th>Password</th>
- <th>Access</th>
- </tr>
- <?php foreach($data as $key => $value) { ?>
- <tr>
- <td><?php echo $value['DreamhostDomain']['domain']; ?></td>
- <td><?php echo $value['DreamhostDomain']['path']; ?></td>
- <td><?php echo $value['DreamhostDomain']['home']; ?></td>
- <td><?php echo $value['DreamhostUser']['username']; ?></td>
- <td><?php echo $value['DreamhostUser']['password']; ?></td>
- <td><?php echo $value['DreamhostUser']['shell'] . ' ' .$value['DreamhostUser']['type']; ?></td>
- </tr>
- <?php } ?>
-</table>
-
diff --git a/plugins/dreamhost/views/domains/registered.ctp b/plugins/dreamhost/views/domains/registered.ctp
deleted file mode 100644
index 44c155a..0000000
--- a/plugins/dreamhost/views/domains/registered.ctp
+++ /dev/null
@@ -1,24 +0,0 @@
-<h2>Registered Domains</h2>
-<? echo $html->link('Update From Dreamhost', array('controller' => 'crons', 'action' => 'registered')); ?>
-<table>
- <tr>
- <th>Name</th>
- <th>Created</th>
- <th>Updated</th>
- <th>Expires</th>
- <th>DNS (Primary)</th>
- <th>DNS (Secondary)</th>
- <th>DNS (Tietary)</th>
- </tr>
- <?php foreach($data as $key => $value) { ?>
- <tr>
- <td><?php echo $value['DreamhostRegistered']['domain']; ?></td>
- <td><?php echo $value['DreamhostRegistered']['modified']; ?></td>
- <td><?php echo $value['DreamhostRegistered']['created']; ?></td>
- <td><?php echo $value['DreamhostRegistered']['expires']; ?></td>
- <td><?php echo $value['DreamhostRegistered']['ns1']; ?></td>
- <td><?php echo $value['DreamhostRegistered']['ns2']; ?></td>
- <td><?php echo $value['DreamhostRegistered']['ns3']; ?></td>
- </tr>
- <?php } ?>
-</table>
\ No newline at end of file
diff --git a/plugins/dreamhost/views/fetch/index.ctp b/plugins/dreamhost/views/fetch/index.ctp
new file mode 100644
index 0000000..894aa94
--- /dev/null
+++ b/plugins/dreamhost/views/fetch/index.ctp
@@ -0,0 +1,18 @@
+<?php
+echo $form->create('Fetch', array('url' => '/dreamhost/fetch'));
+echo $form->input('command', array('label' => 'Select a command','type' => 'select', 'options' => $cmds));
+echo $form->end('Submit');
+?>
+<h2>
+ <?php
+ if (isset($this->params['data']['Fetch']) && !empty($data)) {
+ echo 'Query: ' . $dreamhost->title($this->params['data']['Fetch']['command']);
+ }
+ else echo 'No Results';
+ ?>
+</h2>
+<?php if (!empty($data)): ?>
+<table>
+ <?php echo $dreamhost->table($data); ?>
+</table>
+<?php endif;?>
\ No newline at end of file
diff --git a/plugins/dreamhost/views/helpers/dreamhost.php b/plugins/dreamhost/views/helpers/dreamhost.php
new file mode 100644
index 0000000..57045d0
--- /dev/null
+++ b/plugins/dreamhost/views/helpers/dreamhost.php
@@ -0,0 +1,58 @@
+<?php
+
+class DreamhostHelper extends Helper {
+
+ var $helpers = array('Html');
+
+ var $ignore = array(
+ 'php_fcgid', 'unique_ip', 'account_id', 'fastcgi', 'passenger',
+ 'php', 'xcache', 'security', 'outside_url', 'www_or_not', 'home', 'hosting_type'
+ );
+
+ function table($data) {
+ $keys = $this->getKeys(array_keys((array) $data[0]));
+ // echo '<pre>'; print_r($keys); die;
+ $rows = $this->setRows($data, $keys);
+ $row = '';
+ for ($i = 0; $i < count($rows); $i++) {
+ if ($i == 0) $class = 'row';
+ if ($i % 2) $class = 'row'; else $class = 'altrow';
+
+ $row .= '<tr class="' . $class .'">';
+ foreach ($rows[$i] as $key => $value) {
+ if ($key == 0) $row .= '<th>' . $value . '</th>';
+ else $row .= '<td>' . $value . '</td>';
+ }
+ $row .= '</tr>' . "\r";
+ }
+ return $row;
+ }
+
+ function title($name) {
+ $clean = str_replace(array('_', '-'), ' ', $name);
+ return ucwords($clean);
+ }
+
+ function setRows($data, $keys) {
+ foreach ($data as $key => $value) {
+ foreach ($keys as $key2 => $value2) {
+ $rows[$key2][0] = ucwords(str_replace('_', ' ', $value2));
+ if (isset($value->{$value2})) {
+ $rows[$key2][] = $value->{$value2};
+ }
+ else {
+ $rows[$key2][] = '';
+ }
+ }
+ }
+ return $rows;
+ }
+
+ function getKeys($data) {
+ foreach ($data as $key => $value) {
+ if (!in_array($value, $this->ignore)) $keys[] = $value;
+ }
+ return $keys;
+ }
+}
+?>
\ No newline at end of file
diff --git a/plugins/dreamhost/views/users/index.ctp b/plugins/dreamhost/views/users/index.ctp
deleted file mode 100644
index 932f0f6..0000000
--- a/plugins/dreamhost/views/users/index.ctp
+++ /dev/null
@@ -1,21 +0,0 @@
-<h2>Active Users</h2>
-<? echo $html->link('Update From Dreamhost', array('controller' => 'crons', 'action' => 'users')); ?>
-<table>
- <tr>
- <th>Username</th>
- <th>Password</th>
- <th>Server</th>
- <th>Shell</th>
- <th>Access</th>
- </tr>
- <?php foreach($data as $key => $value) { ?>
- <tr>
- <td><?php echo $value['DreamhostUser']['username']; ?></td>
- <td><?php echo $value['DreamhostUser']['password']; ?></td>
- <td><?php echo $value['DreamhostUser']['home']; ?></td>
- <td><?php echo $value['DreamhostUser']['shell']; ?></td>
- <td><?php echo $value['DreamhostUser']['type']; ?></td>
- </tr>
- <?php } ?>
-</table>
-
diff --git a/tests/cases/behaviors/empty b/tests/cases/behaviors/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/cases/components/empty b/tests/cases/components/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/cases/controllers/empty b/tests/cases/controllers/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/cases/helpers/empty b/tests/cases/helpers/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/cases/models/empty b/tests/cases/models/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/fixtures/empty b/tests/fixtures/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/groups/empty b/tests/groups/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/tmp/cache/models/empty b/tmp/cache/models/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/tmp/cache/persistent/empty b/tmp/cache/persistent/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/tmp/cache/views/empty b/tmp/cache/views/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/tmp/logs/debug.log b/tmp/logs/debug.log
index d7f4298..c3f96ba 100644
--- a/tmp/logs/debug.log
+++ b/tmp/logs/debug.log
@@ -1,111 +1,163 @@
-2009-07-21 22:20:03 Debug: Notice (8): Undefined property: Domain::$config in [APP\plugins\dreamhost\dreamhost_app_model.php, line 6]
-2009-07-21 22:25:27 Debug: Notice (8): Undefined property: DreamhostSource::$Session in [APP\plugins\dreamhost\models\datasources\dreamhost_source.php, line 21]
-2009-07-21 22:26:27 Debug: Notice (8): Undefined variable: Session in [APP\plugins\dreamhost\models\datasources\dreamhost_source.php, line 21]
-2009-07-21 22:37:21 Debug: Notice (8): Undefined variable: config in [APP\plugins\dreamhost\models\datasources\dreamhost_source.php, line 22]
-2009-07-21 22:37:22 Debug: Notice (8): Trying to get property of non-object in [APP\plugins\dreamhost\models\datasources\dreamhost_source.php, line 59]
-2009-07-21 22:37:32 Debug: Notice (8): Undefined variable: config in [APP\plugins\dreamhost\models\datasources\dreamhost_source.php, line 22]
-2009-07-21 22:45:15 Debug: Notice (8): Undefined property: Domain::$Session in [APP\plugins\dreamhost\dreamhost_app_model.php, line 8]
-2009-07-21 22:47:04 Debug: Notice (8): Undefined variable: _SESSION in [CORE\cake\libs\session.php, line 319]
-2009-07-21 22:47:40 Debug: Notice (8): Undefined variable: _SESSION in [CORE\cake\libs\session.php, line 319]
-2009-07-21 22:47:57 Debug: Notice (8): Undefined variable: _SESSION in [CORE\cake\libs\session.php, line 319]
-2009-07-21 22:48:24 Debug: Notice (8): Undefined property: Domain::$Session in [APP\plugins\dreamhost\dreamhost_app_model.php, line 6]
-2009-07-21 22:49:41 Debug: Notice (8): Undefined variable: _SESSION in [APP\plugins\dreamhost\dreamhost_app_model.php, line 6]
-2009-07-21 22:54:50 Debug: Notice (8): Undefined property: Domain::$Session in [APP\plugins\dreamhost\dreamhost_app_model.php, line 6]
-2009-07-22 21:21:59 Debug: Notice (8): Undefined variable: list in [APP\plugins\dreamhost\controllers\crons_controller.php, line 14]
-2009-07-22 21:27:42 Debug: Notice (8): Undefined variable: list in [APP\plugins\dreamhost\controllers\crons_controller.php, line 15]
-2009-07-22 21:43:56 Debug: Notice (8): Undefined index: dreamhost in [APP\plugins\dreamhost\models\user.php, line 11]
-2009-07-22 21:52:26 Debug: Notice (8): Undefined property: stdClass::$username in [APP\plugins\dreamhost\controllers\crons_controller.php, line 33]
-2009-07-22 21:52:26 Debug: Notice (8): Undefined variable: data in [APP\plugins\dreamhost\models\user.php, line 19]
-2009-07-22 21:52:26 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1683]
-2009-07-22 21:52:26 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1687]
-2009-07-22 21:52:26 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1691]
-2009-07-22 21:52:26 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1692]
-2009-07-22 21:52:47 Debug: Notice (8): Undefined variable: data in [APP\plugins\dreamhost\models\user.php, line 19]
-2009-07-22 21:52:47 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1683]
-2009-07-22 21:52:47 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1687]
-2009-07-22 21:52:47 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1691]
-2009-07-22 21:52:47 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1692]
-2009-07-22 21:53:14 Debug: Notice (8): Undefined variable: data in [APP\plugins\dreamhost\models\user.php, line 19]
-2009-07-22 21:53:14 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1683]
-2009-07-22 21:53:14 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1687]
-2009-07-22 21:53:14 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1691]
-2009-07-22 21:53:14 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1692]
-2009-07-22 21:53:30 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1683]
-2009-07-22 21:53:30 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1687]
-2009-07-22 21:53:30 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1691]
-2009-07-22 21:53:30 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1692]
-2009-07-22 21:54:56 Debug: Notice (8): Undefined property: stdClass::$user in [APP\plugins\dreamhost\controllers\crons_controller.php, line 34]
-2009-07-22 21:55:19 Debug: Notice (8): Undefined property: CronsController::$domain in [APP\plugins\dreamhost\controllers\crons_controller.php, line 41]
-2009-07-22 21:55:36 Debug: Notice (8): Undefined index: domain in [APP\plugins\dreamhost\controllers\crons_controller.php, line 41]
-2009-07-22 21:55:36 Debug: Notice (8): Undefined property: stdClass::$user in [APP\plugins\dreamhost\controllers\crons_controller.php, line 34]
-2009-07-22 21:56:10 Debug: Notice (8): Undefined property: stdClass::$user in [APP\plugins\dreamhost\controllers\crons_controller.php, line 34]
-2009-07-22 21:57:11 Debug: Notice (8): Undefined property: stdClass::$user in [APP\plugins\dreamhost\controllers\crons_controller.php, line 34]
-2009-07-22 21:57:48 Debug: Notice (8): Undefined property: stdClass::$user in [APP\plugins\dreamhost\controllers\crons_controller.php, line 34]
-2009-07-22 21:58:20 Debug: Notice (8): Undefined property: stdClass::$user in [APP\plugins\dreamhost\controllers\crons_controller.php, line 34]
-2009-07-22 22:40:53 Debug: Notice (8): Undefined variable: str in [APP\plugins\dreamhost\controllers\crons_controller.php, line 57]
-2009-07-22 22:45:01 Debug: Notice (8): Undefined variable: str in [APP\plugins\dreamhost\controllers\crons_controller.php, line 57]
-2009-07-22 22:45:01 Debug: Notice (8): Undefined property: CronsController::$Reserved in [APP\plugins\dreamhost\controllers\crons_controller.php, line 64]
-2009-07-22 22:45:36 Debug: Notice (8): Undefined property: CronsController::$Reserved in [APP\plugins\dreamhost\controllers\crons_controller.php, line 60]
-2009-07-22 22:46:08 Debug: Notice (8): Undefined index: Reserved in [APP\models\registered.php, line 11]
-2009-07-22 22:47:08 Debug: Notice (8): Trying to get property of non-object in [APP\views\domains\registered.ctp, line 14]
-2009-07-22 22:47:08 Debug: Notice (8): Trying to get property of non-object in [APP\views\domains\registered.ctp, line 15]
-2009-07-22 22:47:08 Debug: Notice (8): Trying to get property of non-object in [APP\views\domains\registered.ctp, line 16]
-2009-07-22 22:47:08 Debug: Notice (8): Trying to get property of non-object in [APP\views\domains\registered.ctp, line 17]
-2009-07-22 22:47:08 Debug: Notice (8): Trying to get property of non-object in [APP\views\domains\registered.ctp, line 18]
-2009-07-22 22:47:08 Debug: Notice (8): Trying to get property of non-object in [APP\views\domains\registered.ctp, line 19]
-2009-07-22 22:47:08 Debug: Notice (8): Trying to get property of non-object in [APP\views\domains\registered.ctp, line 20]
-2009-07-22 22:48:25 Debug: Notice (8): Undefined index: Reserved in [APP\models\registered.php, line 11]
-2009-07-22 23:10:31 Debug: Notice (8): Undefined index: name in [APP\models\setting.php, line 10]
-2009-07-22 23:11:14 Debug: Notice (8): Undefined offset: 0 in [CORE\cake\libs\model\model.php, line 2055]
-2009-07-22 23:11:14 Debug: Notice (8): Undefined offset: 0 in [CORE\cake\libs\model\model.php, line 2056]
-2009-07-22 23:16:45 Debug: Notice (8): Undefined property: CronsController::$Dreamhost in [APP\controllers\crons_controller.php, line 31]
-2009-07-22 23:18:01 Debug: Notice (8): Undefined property: CronsController::$Dreamhost in [APP\controllers\crons_controller.php, line 35]
-2009-07-22 23:19:40 Debug: Notice (8): Undefined property: DreamhostComponent::$Session in [APP\controllers\components\dreamhost.php, line 13]
-2009-07-22 23:20:50 Debug: Notice (8): Undefined property: DreamhostComponent::$Session in [APP\controllers\components\dreamhost.php, line 14]
-2009-07-22 23:58:10 Debug: Notice (8): Undefined variable: db in [APP\controllers\installer_controller.php, line 41]
-2009-07-22 23:58:31 Debug: Notice (8): Undefined variable: db in [APP\controllers\installer_controller.php, line 32]
-2009-07-23 00:05:03 Debug: Notice (8): Undefined variable: form in [APP\views\settings\config.ctp, line 3]
-2009-07-23 00:06:22 Debug: Notice (8): Undefined variable: new in [APP\controllers\crons_controller.php, line 30]
-2009-07-23 00:08:42 Debug: Notice (8): Undefined index: Reserved in [APP\models\registered.php, line 11]
-2009-07-23 00:33:51 Debug: Notice (8): Undefined variable: old in [APP\controllers\crons_controller.php, line 34]
-2009-07-23 00:41:20 Debug: Notice (8): Undefined property: stdClass::$id in [APP\controllers\crons_controller.php, line 72]
-2009-07-23 00:43:42 Debug: Notice (8): Undefined index: Domain in [APP\models\hostname.php, line 23]
-2009-07-23 00:44:59 Debug: Notice (8): Trying to get property of non-object in [APP\views\databases\hostnames.ctp, line 11]
-2009-07-23 00:44:59 Debug: Notice (8): Trying to get property of non-object in [APP\views\databases\hostnames.ctp, line 12]
-2009-07-23 00:44:59 Debug: Notice (8): Trying to get property of non-object in [APP\views\databases\hostnames.ctp, line 15]
-2009-07-23 00:48:16 Debug: Notice (8): Undefined property: DatabasesController::$Dreamohost in [APP\controllers\databases_controller.php, line 24]
-2009-07-23 00:49:27 Debug: Notice (8): Undefined property: DatabasesController::$Database in [APP\controllers\databases_controller.php, line 51]
-2009-07-23 00:50:09 Debug: Notice (8): Undefined property: DatabasesController::$Domain in [APP\controllers\databases_controller.php, line 51]
-2009-07-23 00:52:01 Debug: Notice (8): Undefined variable: domains in [APP\views\databases\add_host.ctp, line 6]
-2009-07-23 00:52:44 Debug: Notice (8): Undefined index: Domain in [APP\models\hostname.php, line 23]
-2009-07-23 00:56:24 Debug: Notice (8): Undefined index: Domain in [APP\models\hostname.php, line 23]
-2009-07-23 00:56:49 Debug: Notice (8): Undefined index: Domain in [APP\models\hostname.php, line 23]
-2009-07-23 00:57:39 Debug: Notice (8): Trying to get property of non-object in [APP\controllers\components\dreamhost.php, line 46]
-2009-07-23 00:57:54 Debug: Notice (8): Trying to get property of non-object in [APP\controllers\components\dreamhost.php, line 46]
-2009-07-23 00:58:22 Debug: Notice (8): Trying to get property of non-object in [APP\controllers\components\dreamhost.php, line 46]
-2009-07-23 00:58:31 Debug: Notice (8): Trying to get property of non-object in [APP\controllers\components\dreamhost.php, line 46]
-2009-07-23 00:58:49 Debug: Notice (8): Trying to get property of non-object in [APP\controllers\components\dreamhost.php, line 46]
-2009-07-23 00:59:28 Debug: Notice (8): Trying to get property of non-object in [APP\controllers\components\dreamhost.php, line 46]
-2009-07-24 02:11:58 Debug: Notice (8): Trying to get property of non-object in [APP\models\datasources\dreamhost_source.php, line 34]
-2009-07-24 02:12:19 Debug: Notice (8): Trying to get property of non-object in [APP\models\datasources\dreamhost_source.php, line 34]
-2009-07-24 02:13:43 Debug: Notice (8): Undefined property: DreamhostComponent::$Session in [APP\controllers\components\dreamhost.php, line 12]
-2009-07-24 02:15:22 Debug: Notice (8): Undefined variable: key in [APP\models\datasources\dreamhost_source.php, line 18]
-2009-07-24 02:16:06 Debug: Notice (8): Undefined variable: key in [APP\models\datasources\dreamhost_source.php, line 18]
-2009-07-24 02:16:16 Debug: Notice (8): Undefined variable: key in [APP\models\datasources\dreamhost_source.php, line 18]
-2009-07-24 02:17:33 Debug: Notice (8): Undefined variable: old in [APP\controllers\crons_controller.php, line 35]
-2009-07-24 02:17:53 Debug: Notice (8): Undefined variable: new in [APP\controllers\crons_controller.php, line 32]
-2009-07-24 02:19:17 Debug: Notice (8): Undefined index: Domain in [APP\models\hostname.php, line 23]
-2009-07-24 02:19:31 Debug: Notice (8): Undefined index: Domain in [APP\models\hostname.php, line 23]
-2009-07-24 02:20:25 Debug: Notice (8): Undefined property: DatabasesController::$Database in [APP\controllers\databases_controller.php, line 19]
-2009-07-24 02:21:48 Debug: Notice (8): Undefined index: Reserved in [APP\models\registered.php, line 11]
-2009-07-24 02:22:49 Debug: Notice (8): Undefined variable: id in [APP\controllers\databases_controller.php, line 36]
-2009-07-24 02:32:38 Debug: Notice (8): Undefined property: DatabasesController::$Database in [APP\controllers\databases_controller.php, line 19]
-2009-07-24 02:49:40 Debug: Notice (8): Undefined index: Reserved in [APP\models\registered.php, line 11]
-2009-07-26 01:36:12 Debug: Notice (8): Undefined variable: javascript in [APP\views\layouts\default.ctp, line 37]
-2009-07-26 01:38:13 Debug: Notice (8): Undefined index: Registered in [APP\plugins\dreamhost\views\domains\registered.ctp, line 15]
-2009-07-26 01:38:13 Debug: Notice (8): Undefined index: Registered in [APP\plugins\dreamhost\views\domains\registered.ctp, line 16]
-2009-07-26 01:38:13 Debug: Notice (8): Undefined index: Registered in [APP\plugins\dreamhost\views\domains\registered.ctp, line 17]
-2009-07-26 01:38:13 Debug: Notice (8): Undefined index: Registered in [APP\plugins\dreamhost\views\domains\registered.ctp, line 18]
-2009-07-26 01:38:13 Debug: Notice (8): Undefined index: Registered in [APP\plugins\dreamhost\views\domains\registered.ctp, line 19]
-2009-07-26 01:38:13 Debug: Notice (8): Undefined index: Registered in [APP\plugins\dreamhost\views\domains\registered.ctp, line 20]
-2009-07-26 01:38:13 Debug: Notice (8): Undefined index: Registered in [APP\plugins\dreamhost\views\domains\registered.ctp, line 21]
+2009-07-26 02:22:04 Debug: Notice (8): Trying to get property of non-object in [APP\models\datasources\dreamhost_source.php, line 49]
+2009-07-26 02:33:35 Debug: Notice (8): Undefined variable: action in [APP\controllers\dreamhost_controller.php, line 10]
+2009-07-26 02:36:44 Debug: Notice (8): Undefined property: stdClass::$path in [APP\views\dreamhost\domain-list_domains.ctp, line 13]
+2009-07-26 02:36:44 Debug: Notice (8): Undefined property: stdClass::$user in [APP\views\dreamhost\domain-list_domains.ctp, line 15]
+2009-07-26 02:37:03 Debug: Notice (8): Undefined property: stdClass::$user in [APP\views\dreamhost\domain-list_domains.ctp, line 15]
+2009-07-26 02:47:50 Debug: Notice (8): Undefined property: stdClass::$id in [APP\views\dreamhost\mysql-list_hostnames.ctp, line 15]
+2009-07-26 02:50:55 Debug: Notice (8): Undefined offset: 0 in [APP\controllers\dreamhost_controller.php, line 11]
+2009-07-26 02:52:38 Debug: Notice (8): Undefined variable: cmd in [APP\controllers\components\dreamhost.php, line 24]
+2009-07-26 02:52:40 Debug: Notice (8): Trying to get property of non-object in [APP\models\datasources\dreamhost_source.php, line 49]
+2009-07-26 02:52:45 Debug: Notice (8): Undefined variable: cmd in [APP\controllers\components\dreamhost.php, line 24]
+2009-07-26 02:52:45 Debug: Notice (8): Trying to get property of non-object in [APP\models\datasources\dreamhost_source.php, line 49]
+2009-07-26 02:52:46 Debug: Notice (8): Undefined variable: cmd in [APP\controllers\components\dreamhost.php, line 24]
+2009-07-26 02:52:48 Debug: Notice (8): Trying to get property of non-object in [APP\models\datasources\dreamhost_source.php, line 49]
+2009-07-26 02:59:21 Debug: Notice (8): Undefined variable: data in [APP\controllers\dreamhost_controller.php, line 33]
+2009-07-26 03:16:38 Debug: Notice (8): Undefined variable: header in [APP\views\dreamhost\fetch.ctp, line 5]
+2009-07-26 03:20:21 Debug: Notice (8): Trying to get property of non-object in [APP\models\datasources\dreamhost_source.php, line 49]
+2009-07-26 03:20:21 Debug: Notice (8): Undefined variable: header in [APP\views\helpers\dreamhost.php, line 12]
+2009-07-26 03:31:05 Debug: Notice (8): Undefined property: stdClass::$Domain in [APP\views\helpers\dreamhost.php, line 12]
+2009-07-26 03:31:05 Debug: Notice (8): Undefined property: stdClass::$Home in [APP\views\helpers\dreamhost.php, line 12]
+2009-07-26 03:31:05 Debug: Notice (8): Undefined property: stdClass::$Accountid in [APP\views\helpers\dreamhost.php, line 12]
+2009-07-26 03:35:29 Debug: Notice (8): Undefined offset: 0 in [APP\views\helpers\dreamhost.php, line 19]
+2009-07-26 03:35:29 Debug: Notice (8): Trying to get property of non-object in [APP\views\helpers\dreamhost.php, line 19]
+2009-07-26 03:35:29 Debug: Notice (8): Undefined offset: 1 in [APP\views\helpers\dreamhost.php, line 19]
+2009-07-26 03:35:29 Debug: Notice (8): Undefined offset: 2 in [APP\views\helpers\dreamhost.php, line 19]
+2009-07-26 03:35:29 Debug: Notice (8): Undefined offset: 3 in [APP\views\helpers\dreamhost.php, line 19]
+2009-07-26 03:36:12 Debug: Notice (8): Undefined variable: i in [APP\views\helpers\dreamhost.php, line 19]
+2009-07-26 03:36:12 Debug: Notice (8): Undefined index: in [APP\views\helpers\dreamhost.php, line 19]
+2009-07-26 03:36:12 Debug: Notice (8): Trying to get property of non-object in [APP\views\helpers\dreamhost.php, line 19]
+2009-07-26 03:36:21 Debug: Notice (8): Trying to get property of non-object in [APP\views\helpers\dreamhost.php, line 19]
+2009-07-26 03:36:33 Debug: Notice (8): Trying to get property of non-object in [APP\views\helpers\dreamhost.php, line 19]
+2009-07-26 03:38:49 Debug: Notice (8): Undefined offset: 0 in [APP\views\helpers\dreamhost.php, line 11]
+2009-07-26 03:42:03 Debug: Notice (8): Undefined variable: row in [APP\views\helpers\dreamhost.php, line 12]
+2009-07-26 03:42:03 Debug: Notice (8): Undefined offset: 1 in [APP\views\helpers\dreamhost.php, line 12]
+2009-07-26 03:42:03 Debug: Notice (8): Undefined offset: 2 in [APP\views\helpers\dreamhost.php, line 12]
+2009-07-26 03:42:06 Debug: Notice (8): Undefined variable: row in [APP\views\helpers\dreamhost.php, line 12]
+2009-07-26 03:42:06 Debug: Notice (8): Undefined offset: 1 in [APP\views\helpers\dreamhost.php, line 12]
+2009-07-26 03:42:06 Debug: Notice (8): Undefined offset: 2 in [APP\views\helpers\dreamhost.php, line 12]
+2009-07-26 03:42:18 Debug: Notice (8): Undefined offset: 1 in [APP\views\helpers\dreamhost.php, line 13]
+2009-07-26 03:42:18 Debug: Notice (8): Undefined offset: 2 in [APP\views\helpers\dreamhost.php, line 13]
+2009-07-26 03:42:21 Debug: Notice (8): Undefined offset: 1 in [APP\views\helpers\dreamhost.php, line 13]
+2009-07-26 03:42:21 Debug: Notice (8): Undefined offset: 2 in [APP\views\helpers\dreamhost.php, line 13]
+2009-07-26 03:43:13 Debug: Notice (8): Undefined property: stdClass::$php_fcgid in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:43:13 Debug: Notice (8): Undefined property: stdClass::$hosting_type in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:43:13 Debug: Notice (8): Undefined property: stdClass::$path in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:43:13 Debug: Notice (8): Undefined property: stdClass::$outside_url in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:43:13 Debug: Notice (8): Undefined property: stdClass::$fastcgi in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:43:13 Debug: Notice (8): Undefined property: stdClass::$www_or_not in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:43:13 Debug: Notice (8): Undefined property: stdClass::$passenger in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:43:13 Debug: Notice (8): Undefined property: stdClass::$php in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:43:13 Debug: Notice (8): Undefined property: stdClass::$xcache in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:43:13 Debug: Notice (8): Undefined property: stdClass::$security in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:43:13 Debug: Notice (8): Undefined property: stdClass::$user in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:43:34 Debug: Notice (8): Undefined property: stdClass::$php_fcgid in [APP\views\helpers\dreamhost.php, line 34]
+2009-07-26 03:43:34 Debug: Notice (8): Undefined property: stdClass::$hosting_type in [APP\views\helpers\dreamhost.php, line 34]
+2009-07-26 03:43:34 Debug: Notice (8): Undefined property: stdClass::$path in [APP\views\helpers\dreamhost.php, line 34]
+2009-07-26 03:43:34 Debug: Notice (8): Undefined property: stdClass::$outside_url in [APP\views\helpers\dreamhost.php, line 34]
+2009-07-26 03:43:34 Debug: Notice (8): Undefined property: stdClass::$fastcgi in [APP\views\helpers\dreamhost.php, line 34]
+2009-07-26 03:43:34 Debug: Notice (8): Undefined property: stdClass::$www_or_not in [APP\views\helpers\dreamhost.php, line 34]
+2009-07-26 03:43:34 Debug: Notice (8): Undefined property: stdClass::$passenger in [APP\views\helpers\dreamhost.php, line 34]
+2009-07-26 03:43:34 Debug: Notice (8): Undefined property: stdClass::$php in [APP\views\helpers\dreamhost.php, line 34]
+2009-07-26 03:43:34 Debug: Notice (8): Undefined property: stdClass::$xcache in [APP\views\helpers\dreamhost.php, line 34]
+2009-07-26 03:43:34 Debug: Notice (8): Undefined property: stdClass::$security in [APP\views\helpers\dreamhost.php, line 34]
+2009-07-26 03:43:34 Debug: Notice (8): Undefined property: stdClass::$user in [APP\views\helpers\dreamhost.php, line 34]
+2009-07-26 03:44:16 Debug: Notice (8): Undefined property: stdClass::$php_fcgid in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:44:16 Debug: Notice (8): Undefined property: stdClass::$hosting_type in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:44:16 Debug: Notice (8): Undefined property: stdClass::$path in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:44:16 Debug: Notice (8): Undefined property: stdClass::$outside_url in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:44:16 Debug: Notice (8): Undefined property: stdClass::$fastcgi in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:44:16 Debug: Notice (8): Undefined property: stdClass::$www_or_not in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:44:16 Debug: Notice (8): Undefined property: stdClass::$passenger in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:44:16 Debug: Notice (8): Undefined property: stdClass::$php in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:44:16 Debug: Notice (8): Undefined property: stdClass::$xcache in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:44:16 Debug: Notice (8): Undefined property: stdClass::$security in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:44:16 Debug: Notice (8): Undefined property: stdClass::$user in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:44:33 Debug: Notice (8): Undefined property: stdClass::$php_fcgid in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:44:33 Debug: Notice (8): Undefined property: stdClass::$hosting_type in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:44:33 Debug: Notice (8): Undefined property: stdClass::$path in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:44:33 Debug: Notice (8): Undefined property: stdClass::$outside_url in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:44:34 Debug: Notice (8): Undefined property: stdClass::$fastcgi in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:44:34 Debug: Notice (8): Undefined property: stdClass::$www_or_not in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:44:34 Debug: Notice (8): Undefined property: stdClass::$passenger in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:44:34 Debug: Notice (8): Undefined property: stdClass::$php in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:44:34 Debug: Notice (8): Undefined property: stdClass::$xcache in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:44:34 Debug: Notice (8): Undefined property: stdClass::$security in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:44:34 Debug: Notice (8): Undefined property: stdClass::$user in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:48:44 Debug: Notice (8): Trying to get property of non-object in [APP\views\helpers\dreamhost.php, line 31]
+2009-07-26 03:51:14 Debug: Notice (8): Undefined property: stdClass::$php_fcgid in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:51:14 Debug: Notice (8): Undefined property: stdClass::$hosting_type in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:51:14 Debug: Notice (8): Undefined property: stdClass::$path in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:51:14 Debug: Notice (8): Undefined property: stdClass::$outside_url in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:51:14 Debug: Notice (8): Undefined property: stdClass::$fastcgi in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:51:14 Debug: Notice (8): Undefined property: stdClass::$www_or_not in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:51:14 Debug: Notice (8): Undefined property: stdClass::$passenger in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:51:14 Debug: Notice (8): Undefined property: stdClass::$php in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:51:14 Debug: Notice (8): Undefined property: stdClass::$xcache in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:51:14 Debug: Notice (8): Undefined property: stdClass::$security in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:51:14 Debug: Notice (8): Undefined property: stdClass::$user in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 04:06:34 Debug: Notice (8): Object of class stdClass to string conversion in [APP\views\helpers\dreamhost.php, line 32]
+2009-07-26 04:11:05 Debug: Notice (8): Undefined variable: class in [APP\views\helpers\dreamhost.php, line 21]
+2009-07-26 04:19:56 Debug: Notice (8): Undefined variable: class in [APP\views\helpers\dreamhost.php, line 13]
+2009-07-26 04:19:59 Debug: Notice (8): Undefined variable: class in [APP\views\helpers\dreamhost.php, line 13]
+2009-07-26 04:20:16 Debug: Notice (8): Undefined variable: class in [APP\views\helpers\dreamhost.php, line 15]
+2009-07-26 04:20:19 Debug: Notice (8): Undefined variable: class in [APP\views\helpers\dreamhost.php, line 15]
+2009-07-26 04:20:39 Debug: Notice (8): Undefined variable: class in [APP\views\helpers\dreamhost.php, line 13]
+2009-07-26 04:20:42 Debug: Notice (8): Undefined variable: class in [APP\views\helpers\dreamhost.php, line 13]
+2009-07-26 04:22:40 Debug: Notice (8): Undefined variable: count in [APP\views\helpers\dreamhost.php, line 13]
+2009-07-26 04:22:43 Debug: Notice (8): Undefined variable: count in [APP\views\helpers\dreamhost.php, line 13]
+2009-07-26 04:42:14 Debug: Notice (8): Undefined variable: command in [APP\controllers\dreamhost_controller.php, line 14]
+2009-07-26 04:42:14 Debug: Notice (8): Undefined variable: command in [APP\controllers\dreamhost_controller.php, line 15]
+2009-07-26 04:42:14 Debug: Notice (8): Undefined variable: command in [APP\controllers\dreamhost_controller.php, line 16]
+2009-07-26 04:42:14 Debug: Notice (8): Undefined variable: type in [APP\controllers\dreamhost_controller.php, line 19]
+2009-07-26 04:42:14 Debug: Notice (8): Undefined variable: type in [APP\controllers\dreamhost_controller.php, line 22]
+2009-07-26 04:42:14 Debug: Notice (8): Undefined variable: type in [APP\controllers\dreamhost_controller.php, line 26]
+2009-07-26 04:42:15 Debug: Notice (8): Undefined variable: data in [APP\views\dreamhost\fetch.ctp, line 4]
+2009-07-26 04:42:15 Debug: Notice (8): Undefined variable: keys in [APP\views\helpers\dreamhost.php, line 50]
+2009-07-26 04:42:15 Debug: Notice (8): Undefined variable: rows in [APP\views\helpers\dreamhost.php, line 43]
+2009-07-26 04:42:15 Debug: Notice (8): Undefined variable: command in [APP\controllers\dreamhost_controller.php, line 14]
+2009-07-26 04:42:15 Debug: Notice (8): Undefined variable: command in [APP\controllers\dreamhost_controller.php, line 15]
+2009-07-26 04:42:15 Debug: Notice (8): Undefined variable: command in [APP\controllers\dreamhost_controller.php, line 16]
+2009-07-26 04:42:15 Debug: Notice (8): Undefined variable: type in [APP\controllers\dreamhost_controller.php, line 19]
+2009-07-26 04:42:15 Debug: Notice (8): Undefined variable: type in [APP\controllers\dreamhost_controller.php, line 22]
+2009-07-26 04:42:15 Debug: Notice (8): Undefined variable: type in [APP\controllers\dreamhost_controller.php, line 26]
+2009-07-26 04:42:15 Debug: Notice (8): Undefined variable: data in [APP\views\dreamhost\fetch.ctp, line 4]
+2009-07-26 04:42:15 Debug: Notice (8): Undefined variable: keys in [APP\views\helpers\dreamhost.php, line 50]
+2009-07-26 04:42:15 Debug: Notice (8): Undefined variable: rows in [APP\views\helpers\dreamhost.php, line 43]
+2009-07-26 04:42:45 Debug: Notice (8): Undefined variable: command in [APP\controllers\dreamhost_controller.php, line 14]
+2009-07-26 04:42:45 Debug: Notice (8): Undefined variable: command in [APP\controllers\dreamhost_controller.php, line 15]
+2009-07-26 04:42:45 Debug: Notice (8): Undefined variable: command in [APP\controllers\dreamhost_controller.php, line 16]
+2009-07-26 04:42:45 Debug: Notice (8): Undefined variable: type in [APP\controllers\dreamhost_controller.php, line 19]
+2009-07-26 04:42:45 Debug: Notice (8): Undefined variable: type in [APP\controllers\dreamhost_controller.php, line 22]
+2009-07-26 04:42:45 Debug: Notice (8): Undefined variable: type in [APP\controllers\dreamhost_controller.php, line 26]
+2009-07-26 04:42:45 Debug: Notice (8): Undefined variable: data in [APP\views\dreamhost\fetch.ctp, line 4]
+2009-07-26 04:42:45 Debug: Notice (8): Undefined variable: keys in [APP\views\helpers\dreamhost.php, line 50]
+2009-07-26 04:42:45 Debug: Notice (8): Undefined variable: rows in [APP\views\helpers\dreamhost.php, line 43]
+2009-07-26 04:42:48 Debug: Notice (8): Undefined variable: command in [APP\controllers\dreamhost_controller.php, line 14]
+2009-07-26 04:42:48 Debug: Notice (8): Undefined variable: command in [APP\controllers\dreamhost_controller.php, line 15]
+2009-07-26 04:42:48 Debug: Notice (8): Undefined variable: command in [APP\controllers\dreamhost_controller.php, line 16]
+2009-07-26 04:42:48 Debug: Notice (8): Undefined variable: type in [APP\controllers\dreamhost_controller.php, line 19]
+2009-07-26 04:42:48 Debug: Notice (8): Undefined variable: type in [APP\controllers\dreamhost_controller.php, line 22]
+2009-07-26 04:42:48 Debug: Notice (8): Undefined variable: type in [APP\controllers\dreamhost_controller.php, line 26]
+2009-07-26 04:42:48 Debug: Notice (8): Undefined variable: data in [APP\views\dreamhost\fetch.ctp, line 4]
+2009-07-26 04:42:48 Debug: Notice (8): Undefined variable: keys in [APP\views\helpers\dreamhost.php, line 50]
+2009-07-26 04:42:48 Debug: Notice (8): Undefined variable: rows in [APP\views\helpers\dreamhost.php, line 43]
+2009-07-26 04:46:13 Debug: Notice (8): Undefined variable: command in [APP\controllers\dreamhost_controller.php, line 35]
+2009-07-26 04:46:13 Debug: Notice (8): Undefined variable: command in [APP\controllers\dreamhost_controller.php, line 36]
+2009-07-26 04:46:13 Debug: Notice (8): Undefined variable: command in [APP\controllers\dreamhost_controller.php, line 37]
+2009-07-26 04:46:13 Debug: Notice (8): Undefined variable: type in [APP\controllers\dreamhost_controller.php, line 40]
+2009-07-26 04:46:13 Debug: Notice (8): Undefined variable: type in [APP\controllers\dreamhost_controller.php, line 43]
+2009-07-26 04:46:13 Debug: Notice (8): Undefined variable: type in [APP\controllers\dreamhost_controller.php, line 47]
+2009-07-26 04:46:13 Debug: Notice (8): Undefined variable: commands in [APP\controllers\dreamhost_controller.php, line 56]
+2009-07-26 04:46:13 Debug: Notice (8): Undefined variable: cmd in [APP\controllers\dreamhost_controller.php, line 61]
+2009-07-26 04:46:22 Debug: Notice (8): Undefined variable: command in [APP\controllers\dreamhost_controller.php, line 35]
+2009-07-26 04:46:22 Debug: Notice (8): Undefined variable: command in [APP\controllers\dreamhost_controller.php, line 36]
+2009-07-26 04:46:22 Debug: Notice (8): Undefined variable: command in [APP\controllers\dreamhost_controller.php, line 37]
+2009-07-26 04:46:22 Debug: Notice (8): Undefined variable: type in [APP\controllers\dreamhost_controller.php, line 40]
+2009-07-26 04:46:22 Debug: Notice (8): Undefined variable: type in [APP\controllers\dreamhost_controller.php, line 43]
+2009-07-26 04:46:22 Debug: Notice (8): Undefined variable: type in [APP\controllers\dreamhost_controller.php, line 47]
+2009-07-26 04:47:39 Debug: Notice (8): Undefined variable: data in [APP\views\dreamhost\fetch.ctp, line 4]
+2009-07-26 04:47:39 Debug: Notice (8): Undefined variable: keys in [APP\views\helpers\dreamhost.php, line 50]
+2009-07-26 04:47:39 Debug: Notice (8): Undefined variable: rows in [APP\views\helpers\dreamhost.php, line 43]
+2009-07-26 04:54:46 Debug: Notice (8): Undefined variable: value in [APP\views\helpers\dreamhost.php, line 32]
+2009-07-26 04:56:37 Debug: Notice (8): Undefined variable: keys in [APP\views\helpers\dreamhost.php, line 55]
+2009-07-26 04:56:37 Debug: Notice (8): Undefined variable: rows in [APP\views\helpers\dreamhost.php, line 48]
diff --git a/tmp/logs/empty b/tmp/logs/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/tmp/logs/error.log b/tmp/logs/error.log
index 4faf7ef..da88bf5 100644
--- a/tmp/logs/error.log
+++ b/tmp/logs/error.log
@@ -1,70 +1,29 @@
-2009-07-21 03:17:29 Error: Fatal Error (256): ConnectionManager::getDataSource - Non-existent data source default in [CORE\cake\libs\model\connection_manager.php, line 109]
-2009-07-21 03:27:21 Error: Fatal Error (256): ConnectionManager::getDataSource - Non-existent data source default in [CORE\cake\libs\model\connection_manager.php, line 109]
-2009-07-21 03:27:50 Error: Fatal Error (256): Unable to load DataSource file dreamhost_source.php in [CORE\cake\libs\model\connection_manager.php, line 179]
-2009-07-21 22:37:21 Warning: Warning (2): array_merge() [<a href='http://php.net/function.array-merge'>function.array-merge</a>]: Argument #3 is not an array in [CORE\cake\libs\model\datasources\datasource.php, line 379]
-2009-07-21 22:37:22 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\plugins\dreamhost\views\domains\index.ctp, line 9]
-2009-07-21 22:37:32 Warning: Warning (2): array_merge() [<a href='http://php.net/function.array-merge'>function.array-merge</a>]: Argument #3 is not an array in [CORE\cake\libs\model\datasources\datasource.php, line 379]
-2009-07-22 21:09:58 Error: Fatal Error (256): ConnectionManager::getDataSource - Non-existent data source dreamhost in [CORE\cake\libs\model\connection_manager.php, line 109]
-2009-07-22 21:13:10 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'fetch' at line 1</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 21:14:13 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'getList' at line 1</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 21:15:25 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'getList' at line 1</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 21:15:57 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'getList' at line 1</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 21:16:21 Error: Fatal Error (256): Unable to load DataSource file dreamhost_source.php in [CORE\cake\libs\model\connection_manager.php, line 179]
-2009-07-22 21:52:26 Warning: Warning (2): preg_match() expects parameter 2 to be string, array given in [CORE\cake\libs\model\datasources\dbo_source.php, line 1680]
-2009-07-22 21:52:26 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1054: Unknown column 'User.Array' in 'field list'</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 21:52:47 Warning: Warning (2): preg_match() expects parameter 2 to be string, array given in [CORE\cake\libs\model\datasources\dbo_source.php, line 1680]
-2009-07-22 21:52:47 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1054: Unknown column 'User.Array' in 'field list'</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 21:53:14 Warning: Warning (2): preg_match() expects parameter 2 to be string, array given in [CORE\cake\libs\model\datasources\dbo_source.php, line 1680]
-2009-07-22 21:53:14 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1054: Unknown column 'User.Array' in 'field list'</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 21:53:30 Warning: Warning (2): preg_match() expects parameter 2 to be string, array given in [CORE\cake\libs\model\datasources\dbo_source.php, line 1680]
-2009-07-22 21:53:30 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1054: Unknown column 'User.Array' in 'field list'</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 21:54:56 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 22:03:40 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1054: Unknown column 'Domain.name' in 'field list'</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 22:04:20 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1054: Unknown column 'Domain.server' in 'field list'</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 22:46:35 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'registered' at line 1</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 22:46:35 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\views\domains\registered.ctp, line 12]
-2009-07-22 22:46:36 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'registered' at line 1</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 22:46:36 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\views\domains\registered.ctp, line 12]
-2009-07-22 23:11:14 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'settings` AS `Setting` WHERE 1 = 1' at line 1</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 23:50:19 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1072: Key column 'id' doesn't exist in table</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 23:50:57 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1072: Key column 'id' doesn't exist in table</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 23:52:04 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1072: Key column 'id' doesn't exist in table</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 23:59:18 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1050: Table 'domains' already exists</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 23:59:18 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1050: Table 'users' already exists</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 23:59:18 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1050: Table 'registered' already exists</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 23:59:18 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1050: Table 'settings' already exists</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 23:59:38 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1050: Table 'domains' already exists</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 23:59:38 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1050: Table 'users' already exists</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 23:59:38 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1050: Table 'registered' already exists</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-22 23:59:38 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1050: Table 'settings' already exists</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-23 00:06:23 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\controllers\crons_controller.php, line 47]
-2009-07-23 00:06:29 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\controllers\crons_controller.php, line 73]
-2009-07-23 00:06:30 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1054: Unknown column 'Domain.user_id' in 'on clause'</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-23 00:06:30 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\views\domains\index.ctp, line 12]
-2009-07-23 00:41:20 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'getDomain' at line 1</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-23 00:41:44 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'getDomain' at line 1</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-23 00:57:39 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\controllers\crons_controller.php, line 47]
-2009-07-23 00:57:39 Warning: Warning (2): session_regenerate_id() [<a href='http://php.net/function.session-regenerate-id'>function.session-regenerate-id</a>]: Session object destruction failed in [CORE\cake\libs\session.php, line 599]
-2009-07-23 00:57:39 Warning: Warning (2): session_regenerate_id() [<a href='http://php.net/function.session-regenerate-id'>function.session-regenerate-id</a>]: Session object destruction failed in [CORE\cake\libs\session.php, line 599]
-2009-07-23 00:57:39 Warning: Warning (2): session_regenerate_id() [<a href='http://php.net/function.session-regenerate-id'>function.session-regenerate-id</a>]: Session object destruction failed in [CORE\cake\libs\session.php, line 599]
-2009-07-23 00:57:39 Warning: Warning (2): session_regenerate_id() [<a href='http://php.net/function.session-regenerate-id'>function.session-regenerate-id</a>]: Session object destruction failed in [CORE\cake\libs\session.php, line 599]
-2009-07-23 00:57:54 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\controllers\crons_controller.php, line 47]
-2009-07-23 00:57:59 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\controllers\crons_controller.php, line 72]
-2009-07-23 00:58:22 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\controllers\crons_controller.php, line 47]
-2009-07-23 00:58:23 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\controllers\crons_controller.php, line 74]
-2009-07-23 00:58:31 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\controllers\crons_controller.php, line 47]
-2009-07-24 02:10:53 Error: Fatal Error (256): Unable to load DataSource file dreamhost_source.php in [CORE\cake\libs\model\connection_manager.php, line 179]
-2009-07-24 02:11:00 Error: Fatal Error (256): Unable to load DataSource file dreamhost_source.php in [CORE\cake\libs\model\connection_manager.php, line 179]
-2009-07-24 02:11:58 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\controllers\crons_controller.php, line 25]
-2009-07-24 02:15:22 Warning: Warning (2): Missing argument 1 for DreamhostSource::configs(), called in C:\xampp\htdocs\scraps\app\controllers\components\dreamhost.php on line 14 and defined in [APP\models\datasources\dreamhost_source.php, line 13]
-2009-07-24 02:16:06 Warning: Warning (2): Missing argument 1 for DreamhostSource::configs(), called in C:\xampp\htdocs\scraps\app\controllers\components\dreamhost.php on line 14 and defined in [APP\models\datasources\dreamhost_source.php, line 13]
-2009-07-24 02:16:16 Warning: Warning (2): Missing argument 1 for DreamhostSource::configs(), called in C:\xampp\htdocs\scraps\app\controllers\components\dreamhost.php on line 14 and defined in [APP\models\datasources\dreamhost_source.php, line 13]
-2009-07-24 02:18:26 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\controllers\crons_controller.php, line 74]
-2009-07-24 02:22:48 Warning: Warning (2): Missing argument 2 for DatabasesController::delete_hostname(), called in C:\xampp\htdocs\scraps\cake\libs\object.php on line 117 and defined in [APP\controllers\databases_controller.php, line 23]
-2009-07-24 02:24:19 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\controllers\crons_controller.php, line 48]
-2009-07-24 02:24:49 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\controllers\crons_controller.php, line 48]
-2009-07-24 02:25:07 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\controllers\crons_controller.php, line 74]
-2009-07-26 01:37:21 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1054: Unknown column 'DreamhostDomain.dreamhost_user_id' in 'on clause'</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-26 01:37:22 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\plugins\dreamhost\views\domains\index.ctp, line 12]
-2009-07-26 01:40:08 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1066: Not unique table/alias: 'DreamhostHostname'</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
-2009-07-26 01:40:08 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\plugins\dreamhost\views\databases\hostnames.ctp, line 10]
+2009-07-26 02:18:45 Warning: Warning (2): mysql_connect() [<a href='http://php.net/function.mysql-connect'>function.mysql-connect</a>]: Can't connect to MySQL server on 'localhost' (10061) in [CORE\cake\libs\model\datasources\dbo\dbo_mysql.php, line 374]
+2009-07-26 02:18:45 Warning: Warning (2): mysql_select_db(): supplied argument is not a valid MySQL-Link resource in [CORE\cake\libs\model\datasources\dbo\dbo_mysql.php, line 379]
+2009-07-26 02:18:45 Warning: Warning (2): mysql_get_server_info(): supplied argument is not a valid MySQL-Link resource in [CORE\cake\libs\model\datasources\dbo\dbo_mysql.php, line 387]
+2009-07-26 02:18:45 Warning: Warning (2): mysql_query(): supplied argument is not a valid MySQL-Link resource in [CORE\cake\libs\model\datasources\dbo\dbo_mysql.php, line 411]
+2009-07-26 02:19:15 Warning: Warning (2): mysql_connect() [<a href='http://php.net/function.mysql-connect'>function.mysql-connect</a>]: Can't connect to MySQL server on 'localhost' (10061) in [CORE\cake\libs\model\datasources\dbo\dbo_mysql.php, line 374]
+2009-07-26 02:19:15 Warning: Warning (2): mysql_select_db(): supplied argument is not a valid MySQL-Link resource in [CORE\cake\libs\model\datasources\dbo\dbo_mysql.php, line 379]
+2009-07-26 02:19:15 Warning: Warning (2): mysql_get_server_info(): supplied argument is not a valid MySQL-Link resource in [CORE\cake\libs\model\datasources\dbo\dbo_mysql.php, line 387]
+2009-07-26 02:19:15 Warning: Warning (2): mysql_query(): supplied argument is not a valid MySQL-Link resource in [CORE\cake\libs\model\datasources\dbo\dbo_mysql.php, line 411]
+2009-07-26 03:20:21 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\views\helpers\dreamhost.php, line 8]
+2009-07-26 03:20:21 Warning: Warning (2): Invalid argument supplied for foreach() in [CORE\cake\libs\view\helpers\html.php, line 472]
+2009-07-26 03:38:49 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\views\helpers\dreamhost.php, line 17]
+2009-07-26 03:42:03 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\views\helpers\dreamhost.php, line 20]
+2009-07-26 03:42:06 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\views\helpers\dreamhost.php, line 20]
+2009-07-26 03:42:18 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\views\helpers\dreamhost.php, line 21]
+2009-07-26 03:42:21 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\views\helpers\dreamhost.php, line 21]
+2009-07-26 03:50:00 Warning: Warning (2): key() [<a href='http://php.net/function.key'>function.key</a>]: Passed variable is not an array or object in [APP\views\helpers\dreamhost.php, line 31]
+2009-07-26 03:50:43 Warning: Warning (2): key() [<a href='http://php.net/function.key'>function.key</a>]: Passed variable is not an array or object in [APP\views\helpers\dreamhost.php, line 33]
+2009-07-26 03:58:17 Warning: Warning (2): array_keys() [<a href='http://php.net/function.array-keys'>function.array-keys</a>]: The first argument should be an array in [APP\views\helpers\dreamhost.php, line 46]
+2009-07-26 03:58:48 Warning: Warning (2): array_keys() [<a href='http://php.net/function.array-keys'>function.array-keys</a>]: The first argument should be an array in [APP\views\helpers\dreamhost.php, line 9]
+2009-07-26 03:59:10 Warning: Warning (2): array_keys() [<a href='http://php.net/function.array-keys'>function.array-keys</a>]: The first argument should be an array in [APP\views\helpers\dreamhost.php, line 9]
+2009-07-26 04:02:19 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\views\helpers\dreamhost.php, line 21]
+2009-07-26 04:06:34 Warning: Warning (4096): Object of class stdClass could not be converted to string in [APP\views\helpers\dreamhost.php, line 32]
+2009-07-26 04:42:15 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\views\helpers\dreamhost.php, line 32]
+2009-07-26 04:42:15 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\views\helpers\dreamhost.php, line 32]
+2009-07-26 04:42:45 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\views\helpers\dreamhost.php, line 32]
+2009-07-26 04:42:48 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\views\helpers\dreamhost.php, line 32]
+2009-07-26 04:46:13 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\controllers\dreamhost_controller.php, line 56]
+2009-07-26 04:47:39 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\views\helpers\dreamhost.php, line 32]
+2009-07-26 04:56:37 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\views\helpers\dreamhost.php, line 37]
diff --git a/vendors/shells/dreamhost.php b/vendors/shells/dreamhost.php
deleted file mode 100644
index abbb44b..0000000
--- a/vendors/shells/dreamhost.php
+++ /dev/null
@@ -1,107 +0,0 @@
-<?php
-class DreamhostShell extends Shell {
-
- var $uses = array('User', 'Domain', 'Registered', 'Hostname');
-
- function initialize() {
- App::import('Component', 'Dreamhost');
- $this->Dreamhost =& new DreamhostComponent(null);
- }
-
- function main() {
- $this->users(0);
- $this->domains(0);
- $this->registered(0);
- $this->hostnames(0);
- }
-
- function users($redirect = 1) {
- $data = $this->Dreamhost->find('user-list_users');
- foreach ($data as $key => $value) {
-
- $users['User'] = (array)$value;
- if ($this->User->check($users) == 0) {
- $this->User->create();
- $this->User->save($users);
- $new++;
- }
- else {
- $this->User->save($users['User']);
- $old++;
- }
- }
- if ($redirect == 1) {
- $this->Session->setFlash('Database updated');
- $this->redirect(array('controller' => 'users', 'action' => 'index'));
- }
- }
-
- function domains($redirect = 1) {
- $data = $this->Dreamhost->find('domain-list_domains');
- $this->Domain->truncate();
- foreach ($data as $key => $value) {
- $domain['Domain'] = (array)$value;
- if (isset($value->user) && $value->user != null) {
- $domain['Domain']['user_id'] = $this->User->getUser($value->user);
- }
-
-
- if ($this->Domain->check($domain) == 0) {
- $this->Domain->create();
- $this->Domain->save($domain);
- }
- else {
- $this->Domain->save($domain['Domain']);
- }
- }
- if ($redirect == 1) {
- $this->Session->setFlash('Database updated');
- $this->redirect(array('controller' => 'domains', 'action' => 'index'));
- }
- }
-
-
- function hostnames($redirect = 1) {
- $this->domains(0);
- $data = $this->Dreamhost->find('mysql-list_hostnames');
- $this->Hostname->truncate();
- foreach ($data as $key => $value) {
- $hostname['Hostname'] = (array)$value;
- $hostname['Hostname']['domain_id'] = $this->Domain->getDomain($value->domain);
-
- if ($this->Hostname->check($hostname) == 0) {
- $this->Hostname->create();
- $this->Hostname->save($hostname);
- }
- else {
- $this->Hostname->save($hostname['Hostname']);
- }
- }
- if ($redirect == 1) {
- $this->Session->setFlash('Database updated');
- $this->redirect(array('controller' => 'databases', 'action' => 'hostnames'));
- }
- }
-
- function registered($redirect = 1) {
- $data = $this->Dreamhost->find('domain-list_registrations');
- $this->Registered->truncate();
- foreach ($data as $key => $value) {
- $registered['Registered'] = (array)$value;
-
- if ($this->Registered->check($registered) == 0) {
- $this->Registered->create();
- $this->Registered->save($registered);
- }
- else {
- $this->Reserved->save($registered['Registered']);
- }
- }
- if ($redirect == 1) {
- $this->Session->setFlash('Database updated');
- $this->redirect(array('controller' => 'domains', 'action' => 'registered'));
- }
-
- }
-}
-?>
diff --git a/vendors/shells/tasks/empty b/vendors/shells/tasks/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/vendors/shells/templates/empty b/vendors/shells/templates/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/views/elements/empty b/views/elements/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/views/elements/menu.ctp b/views/elements/menu.ctp
index 46a01ce..86bf8c6 100644
--- a/views/elements/menu.ctp
+++ b/views/elements/menu.ctp
@@ -1,31 +1,6 @@
<div id="menu">
<ul id="navmenu-h">
- <li><a href="/">Home</a></li>
- <li><a href="#">Dreamhost »</a>
- <ul>
- <li><?php echo $html->link('Domains »', array('controller' => 'domains', 'action' => 'index'), null, null, false); ?>
- <ul>
- <li><?php echo $html->link('Registered Domains', array('controller' => 'domains', 'action' => 'registered'), null, null, false); ?></li>
- </ul>
- </li>
- <li><?php echo $html->link('Users', array('controller' => 'users', 'action' => 'index'), null, null, false); ?></li>
-
- <li><a href="#">MySQL »</a>
- <ul>
- <li><?php echo $html->link('Databases', array('controller' => 'databases', 'action' => 'index'), null, null, false); ?></li>
- <li><?php echo $html->link('Hostnames »', array('controller' => 'databases', 'action' => 'hostnames'), null, null, false); ?>
- <ul>
- <li><?php echo $html->link('Add New Hostname', array('controller' => 'databases', 'action' => 'add_host'), null, null, false); ?></li>
- </ul>
- </li>
- <li><?php echo $html->link('Users »', array('controller' => 'databases', 'action' => 'users'), null, null, false); ?>
- <ul>
- <li><?php echo $html->link('Add New User', array('controller' => 'databases', 'action' => 'add_user'), null, null, false); ?></li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
+ <li><a href="/">Home</a></li>
+ <li><a href="/dreamhost/fetch">Dreamhost</a></li>
+ </ul>
</div>
\ No newline at end of file
diff --git a/views/errors/empty b/views/errors/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/views/helpers/css_menu.php b/views/helpers/css_menu.php
deleted file mode 100644
index 5e57683..0000000
--- a/views/helpers/css_menu.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-/*
- * CSS menu helper.
- * Author: John Reeves.
- */
-class CssMenuHelper extends Helper{
-
- var $helpers = array('Html');
-
- /*
- * display a menu list.
- * @arg $data: a nested associative array. The keys are the text that
- * is displayed for that menu item. If the value is an array, it is
- * treated as a sub menu, with the same format. Otherwise it is
- * interpreted as a URL to be used for a link.
- * @arg $type: the type of array. Can be right, left, or down.
- */
- function menu($data=array(), $type='right'){
- global $cm_css_inc;
- $out ='';
- if($cm_css_inc != true){
- $cm_css_inc = true;
- $out .= $this->Html->css('css_menu');
- }
- return $this->output($out . $this->_cm_render($data, $type));
- }
-
- /* render a menu.
- * This is a helper for recursion. The arguments are the
- * same as for $this->menu().
- */
- function _cm_render($data=array(), $type='right'){
- $out='';
- if($data == array()) return;
- if(is_array($data)){
- $out .= "<ul class=\"css_menu cm_$type\">\n";
- foreach($data as $key => $item){
- if(is_array($item)){
- $out .= '<li class="parent">'. $key. "\n";
- $out .= $this->_cm_render($item, $type);
- $out .= "</li>\n";
- }else{
- $out .= '<li><a href="'. $item. '">'. $key. '</a></li>'. "\n";
- }
- }
- $out .= "</ul>\n";
- }
- return $out;
- }
-}
-?>
\ No newline at end of file
diff --git a/views/helpers/html_cleaner.php b/views/helpers/html_cleaner.php
deleted file mode 100644
index 1ea1792..0000000
--- a/views/helpers/html_cleaner.php
+++ /dev/null
@@ -1,205 +0,0 @@
-<?php
-/**
- * Created: Sat February 26 EDT 2008
- *
- * A class to balance out html tags in texts. Makes your texts ready for excerpts with the TextHelper's truncate function.
- *
- *
- * Copyright (c) Debuggable Ltd. <http://debuggable.com>
- *
- * Licensed under The MIT License
- * Redistributions of files must retain the above copyright notice.
- *
- * Example:
- * $bogusHtml = $htmlCleaner->clean($bogusHtml);
- *
- * It also replaces the single closed tags with their proper xhtml equivalents. Like <br> --> <br />
- *
- *
- * @copyright Copyright (c) 2008, Debuggable Ltd. <http://debuggable.com>
- * @link http://www.debuggable.com
- * @license http://www.opensource.org/licenses/mit-license.php The MIT License
- */
-class HtmlCleanerHelper extends Helper {
-/**
- * An array of html tags that are singled ended: <img />
- *
- * @var string
- */
- var $singleTags = array('br', 'hr', 'img', 'input');
-/**
- * An array of nestable html tags
- *
- * @var string
- */
- var $nestableTags = array('blockquote', 'div', 'span');
-/**
- * Keeps track of which tags are in the text and thus need to be ended
- *
- * @var string
- */
- var $tagStack = array();
-/**
- * String of closing tags that is appended to the text to close all unclosed open tags
- *
- * @var string
- */
- var $tagQueue = '';
-/**
- * Resets stack and queue for a new processing
- *
- * @return void
- */
- function reset() {
- $this->tagStack = array();
- $this->tagQueue = '';
- }
-/**
- * Main function of this helper: clean and balance out html tags for a given string
- *
- * @param string $txt
- * @return void
- */
- function clean($txt) {
- $this->reset();
- $result = '';
-
- // just to cache the stack size and to prevent countless count()s
- $stackSize = 0;
-
- $txt = $this->takeOutComments($txt);
- $txt = $this->clearUnclosedTagsAtEnd($txt);
-
- while (preg_match("#<(/?\w*)\s*([^>]*)>#", $txt, $matches)) {
- $result .= $this->tagQueue;
- $this->tagQueue = '';
-
- $tagPos = strpos($txt, $matches[0]);
- $tagLength = strlen($matches[0]);
- $isStartingTag = $matches[1][0] != "/";
-
- if ($isStartingTag) {
- $tag = low($matches[1]);
-
- $isSingleTag = in_array($tag, $this->singleTags);
- $tagNotEmpty = (substr($matches[2], -1) != '/' && $tag != '');
-
- if ($tagNotEmpty && $isSingleTag) {
- $matches[2] .= '/';
- } else {
- $isNoNestableTag = !in_array($tag, $this->nestableTags);
- $isLastTag = ($stackSize > 0 && $this->tagStack[$stackSize - 1] == $tag);
-
- if ($isNoNestableTag && $isLastTag) {
- $this->tagQueue = '</'.array_pop($this->tagStack).'>';
- }
- $stackSize = array_push($this->tagStack, $tag);
- }
-
- $attributes = $matches[2];
- if ($attributes) {
- $attributes = ' ' . $attributes;
- }
- $tag = '<' . $tag . $attributes . '>';
-
- if (!empty($this->tagQueue)) {
- $this->tagQueue .= $tag;
- $tag = '';
- }
- } else {
- $tag = low(substr($matches[1], 1));
-
- if ($stackSize <= 0) {
- $tag = '';
- } elseif ($this->tagStack[$stackSize - 1] == $tag) {
- $tag = '</' . $tag . '>';
- array_pop($this->tagStack);
- $stackSize--;
- } else {
- for ($j = $stackSize - 1; $j >= 0; $j--) {
- if ($this->tagStack[$j] == $tag) {
- for ($k = $stackSize - 1; $k >= $j; $k--) {
- $this->tagQueue .= '</' . array_pop($this->tagStack) . '>';
- $stackSize--;
- }
- break;
- }
- }
- $tag = '';
- }
- }
- $result .= substr($txt, 0, $tagPos).$tag;
- $txt = substr($txt, $tagPos + $tagLength);
- }
- $result .= $this->tagQueue . $txt;
-
- $result = $this->addRemainingTags($result);
- $result = $this->reAddComments($result);
-
- return $result;
- }
-/**
- * Closes all tags in the text that are in the tag stack
- *
- * @param string $txt
- * @return void
- */
- function addRemainingTags($txt) {
- while ($x = array_pop($this->tagStack)) {
- $txt .= '</' . $x . '>';
- }
- return $txt;
- }
-/**
- * Clean up shitty comments ;p No idea for a better name for this...
- * It basically replaces comments temporarily with something else, so comments are not balanced out.
- * Haha how would that work anyway?
- *
- * @param string $txt
- * @return void
- */
- function takeOutComments($txt) {
- $txt = r('< !--', '< !--', $txt);
- $txt = preg_replace('#<([0-9]{1})#', '<$1', $txt);
- return $txt;
- }
-/**
- * Re-replace the comments. : )
- *
- * @param string $txt
- * @return void
- */
- function reAddComments($txt) {
- $txt = r('< !--', '<!--', $txt);
- $txt = r('< !--', '< !--', $txt);
- return $txt;
- }
-/**
- * Well cleans the '<div ' in <span>lala</span><div '. This is useful when you use CakePHP's truncate function
- * (from TextHelper) to build text excerpts, but use html in these texts. ; / Truncate could cut a html tag in two. ; /
- *
- * @param string $txt
- * @return void
- */
- function clearUnclosedTagsAtEnd($txt) {
- $tags = array('a', 'form', 'input', 'textarea', 'select', 'option', 'optiongroup', 'img',
- 'table', 'th', 'tr', 'td', 'div', 'span', 'p', 'label', 'fieldset', 'legend',
- 'style', 'ul', 'ol', 'li'
- );
-
- foreach ($tags as $tag) {
- $length = strlen($tag);
-
- for ($i = 0; $i < $length - 1; $i++) {
- $current = substr($tag, 0, $i);
- $pattern = '/^(.*?)<'.$current.'\s*([^>]*)$/im';
- if (preg_match($pattern, $txt)) {
- $txt = preg_replace($pattern, '$1', $txt);
- }
- }
- }
-
- return $txt;
- }
-}
-?>
\ No newline at end of file
diff --git a/views/installer/index.ctp b/views/installer/index.ctp
deleted file mode 100644
index e69de29..0000000
diff --git a/views/layouts/js/empty b/views/layouts/js/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/views/layouts/rss/empty b/views/layouts/rss/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/views/layouts/xml/empty b/views/layouts/xml/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/views/scaffolds/empty b/views/scaffolds/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/webroot/css/styles.css b/webroot/css/styles.css
index cbe1c80..8a10aa3 100644
--- a/webroot/css/styles.css
+++ b/webroot/css/styles.css
@@ -1,5 +1,24 @@
+* {
+ font-size: 8pt;
+}
body {
background: #ccc;
+ font-size: 8pt;
+}
+
+table, th, td {
+
+ font-size: 8pt;
+}
+
+table {
+ min-width: 100%;
+}
+
+th {
+ min-width: 150px;
+ text-align: left;
+ text-indent: 10px;
}
#header {
@@ -27,4 +46,11 @@ a, a:hover {
margin: 0;
padding: 0;
height: 34px;
+}
+form div {
+ margin: 0;
+}
+
+form div.submit {
+ margin: 0;
}
\ No newline at end of file
