Compare commits

...

10 Commits

Author SHA1 Message Date
abijah
1e6c69c70e Really intended to check the sandbox script into the pre_0.1 branch. I'll do that next, then merge here.
git-svn-id: file:///svn-source/pmgr/branches/sandbox_0.1@812 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-08-28 20:52:15 +00:00
abijah
75eecd9771 Added script to build a sandbox from the current data. The location of the script is unsafe, but since it can only muck up the sandbox database, it doesn't matter.
git-svn-id: file:///svn-source/pmgr/branches/sandbox_0.1@811 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-08-28 20:50:52 +00:00
abijah
50eb7c0f5d Merge out from the pre_0.1 branch
git-svn-id: file:///svn-source/pmgr/branches/sandbox_0.1@810 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-08-28 20:48:52 +00:00
abijah
fbc2de9427 Merge out from the pre_0.1 branch (previous so called 'merge in' was also really a merge out)
git-svn-id: file:///svn-source/pmgr/branches/sandbox_0.1@796 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-08-27 17:28:12 +00:00
abijah
0e8b541e34 Merge in from the pre_0.1 branch
git-svn-id: file:///svn-source/pmgr/branches/sandbox_0.1@794 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-08-27 17:23:22 +00:00
abijah
d32b002a98 Changed the theme to make it clear when we're in the sandbox.
git-svn-id: file:///svn-source/pmgr/branches/sandbox_0.1@748 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-08-23 18:53:21 +00:00
abijah
3c7f02e76c Merge in from pre_0.1 branch
git-svn-id: file:///svn-source/pmgr/branches/sandbox_0.1@747 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-08-23 18:50:59 +00:00
abijah
3e78240974 Modified to use the sandbox database
git-svn-id: file:///svn-source/pmgr/branches/sandbox_0.1@746 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-08-23 18:49:20 +00:00
abijah
3b98b74517 Merge in from the pre_0.1 branch
git-svn-id: file:///svn-source/pmgr/branches/sandbox_0.1@744 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-08-23 14:43:16 +00:00
abijah
9e550c7833 Branch to contain the most stable 0.1 work, along with changes to ensure a sandbox database is used.
git-svn-id: file:///svn-source/pmgr/branches/sandbox_0.1@742 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-08-23 14:25:05 +00:00
3 changed files with 19 additions and 15 deletions

View File

@@ -1,3 +1,6 @@
@echo off @echo off
mysql --user=pmgr --password=pmgruser < %~dp0\db\property_manager.sql sed "s/property_manager/pmgr_sand/g" %~dp0\db\property_manager.sql > H:\pmgr_sand.sql
echo Done! mysql --user=pmgr --password=pmgruser < H:\pmgr_sand.sql
del H:\pmgr_sand.sql
echo Rebuild Complete!

View File

@@ -222,6 +222,9 @@ class AppController extends Controller {
$this->addSideMenuLink('Assess Charges', $this->addSideMenuLink('Assess Charges',
array('controller' => 'leases', 'action' => 'assess_all'), null, array('controller' => 'leases', 'action' => 'assess_all'), null,
'SITE', $this->admin_area); 'SITE', $this->admin_area);
$this->addSideMenuLink('RESET DATA',
array('controller' => 'accounts', 'action' => 'reset_data'), null,
'SITE', $this->admin_area);
$this->addSideMenuLink('Un-Nuke', $this->addSideMenuLink('Un-Nuke',
@@ -231,7 +234,6 @@ class AppController extends Controller {
$this->addSideMenuLink('New Ledgers', $this->addSideMenuLink('New Ledgers',
array('controller' => 'accounts', 'action' => 'newledger'), null, array('controller' => 'accounts', 'action' => 'newledger'), null,
'SITE', $this->dev_area); 'SITE', $this->dev_area);
//array('name' => 'RESET DATA', array('controller' => 'accounts', 'action' => 'reset_data'));
$this->addSideMenuLink('New Receipt', $this->addSideMenuLink('New Receipt',
@@ -293,13 +295,13 @@ class AppController extends Controller {
$this->sideMenuEnable($area_name, $this->dev_area, false); $this->sideMenuEnable($area_name, $this->dev_area, false);
if (empty($this->params['admin'])) if (empty($this->params['admin']))
$this->sideMenuEnable($area_name, $this->admin_area, false); $this->sideMenuEnable($area_name, $this->admin_area, false);
}
$this->authorize("controller.{$this->params['controller']}"); $this->authorize("controller.{$this->params['controller']}");
$this->authorize("controller.{$this->params['controller']}"); $this->authorize("controller.{$this->params['controller']}");
$this->authorize("action.{$this->params['controller']}.{$this->params['action']}"); $this->authorize("action.{$this->params['controller']}.{$this->params['action']}");
$this->authorize("action.{$this->params['controller']}.{$this->params['action']}"); $this->authorize("action.{$this->params['controller']}.{$this->params['action']}");
} }
}
/************************************************************************** /**************************************************************************
@@ -335,17 +337,17 @@ class AppController extends Controller {
foreach ($subarea['priorities'] AS $pname => &$priority) { foreach ($subarea['priorities'] AS $pname => &$priority) {
if (empty($priority)) if (empty($priority))
unset($subarea['priorities'][$pname]); unset($subarea['priorities'][$pname]);
} }
unset($priority); unset($priority);
if (empty($subarea['priorities'])) if (empty($subarea['priorities']))
unset($area['subareas'][$sname]); unset($area['subareas'][$sname]);
} }
unset($subarea); unset($subarea);
if (empty($area['subareas'])) if (empty($area['subareas']))
unset($this->sidemenu['areas'][$aname]); unset($this->sidemenu['areas'][$aname]);
} }
unset($area); unset($area);
// Activate a default section (unless already specified) // Activate a default section (unless already specified)
@@ -410,20 +412,19 @@ class AppController extends Controller {
$this->autoLayout = false; $this->autoLayout = false;
$this->autoRender = false; $this->autoRender = false;
Configure::write('debug', '0'); Configure::write('debug', '0');
$script = $_SERVER['DOCUMENT_ROOT'] . '/pmgr/build.cmd'; $script = preg_replace("%/webroot/index\.php$%",
"/../build.cmd",
$_SERVER['SCRIPT_FILENAME']);
echo "<P>" . date('r') . "\n"; echo "<P>" . date('r') . "\n";
//echo "<P>Script: $script" . "\n";
$db = & $this->Account->getDataSource(); $db = & $this->Account->getDataSource();
$script .= ' "' . $db->config['database'] . '"'; $script .= ' "' . $db->config['database'] . '"';
$script .= ' "' . $db->config['login'] . '"'; $script .= ' "' . $db->config['login'] . '"';
$script .= ' "' . $db->config['password'] . '"'; $script .= ' "' . $db->config['password'] . '"';
$handle = popen($script . ' 2>&1', 'r'); $handle = popen($script . ' 2>&1', 'r');
//echo "<P>Handle: $handle; " . gettype($handle) . "\n"; echo "<P>\n";
echo "<P><PRE>\n";
while (($read = fread($handle, 2096))) { while (($read = fread($handle, 2096))) {
echo $read; echo str_replace("\n", "<BR>\n", htmlspecialchars($read));
} }
echo "</PRE>\n";
pclose($handle); pclose($handle);
} }
@@ -1089,7 +1090,7 @@ class AppController extends Controller {
function gridDataOutputHeader(&$params, &$model) { function gridDataOutputHeader(&$params, &$model) {
if (!$params['debug']) if (!$params['debug'])
header("Content-type: text/xml;charset=utf-8"); header("Content-type: text/xml;charset=utf-8");
} }
function gridDataOutputXMLHeader(&$params, &$model) { function gridDataOutputXMLHeader(&$params, &$model) {
echo "<?xml version='1.0' encoding='utf-8'?>\n"; echo "<?xml version='1.0' encoding='utf-8'?>\n";

View File

@@ -7,7 +7,7 @@ class DATABASE_CONFIG {
'host' => 'localhost', 'host' => 'localhost',
'login' => 'pmgr', 'login' => 'pmgr',
'password' => 'pmgruser', 'password' => 'pmgruser',
'database' => 'property_manager', 'database' => 'pmgr_sand',
'prefix' => 'pmgr_', 'prefix' => 'pmgr_',
); );