Skip to content

Commit

Permalink
Fixed theme style, unittest, and postgresql query bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
xeoncross committed Jun 6, 2011
1 parent ba65ac7 commit 32d0b42
Show file tree
Hide file tree
Showing 8 changed files with 79 additions and 152 deletions.
72 changes: 0 additions & 72 deletions cli.php

This file was deleted.

7 changes: 4 additions & 3 deletions system/db.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class DB
public static $last_query = NULL;



/**
* Set the database type and save the config for later.
*
Expand Down Expand Up @@ -148,7 +147,7 @@ public function query($sql, array $params = NULL)
self::$last_query = $sql;

// Connect if needed
if(!$this->pdo) $this->connect();
if( ! $this->pdo) $this->connect();

if($params)
{
Expand Down Expand Up @@ -198,11 +197,13 @@ public function insert($table, array $data)
if($this->type == 'pgsql')
{
// Insert record and return the whole row (the "id" field may not exist)
if($statment = $this->query($sql.' RETURNING *', array_values($data)))
if($statement = $this->query($sql.' RETURNING *', array_values($data)))
{
// The first column *should* be the ID
return $statement->fetchColumn(0);
}

return;
}

// Insert data and return the new row's ID
Expand Down
16 changes: 7 additions & 9 deletions system/lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Langauge
*
* Autoloads the correct language file based on cookie, useragent, and available
* module languages . The entire language system is based on country codes in ISO
* 3166-1 alpha-2 .
* module languages. The entire language system is based on country codes in ISO
* 3166-1 alpha-2.
*
* @package MicroMVC
* @author David Pennington
Expand All @@ -14,20 +14,18 @@
*/
class Lang
{

protected static $lang;


/**
* Load a language file for the given module
*
* @param string $lang the language ISO
* @param string $m the module name
*/
static function load($language, $m = 'system')
static function load($language, $module = 'system')
{
require(SP . "$m/lang/$language" . EXT);
self::$lang[$m] = $lang;
require(SP . "$module/lang/$language" . EXT);
self::$lang[$module] = $lang;
}


Expand Down Expand Up @@ -55,13 +53,13 @@ static function accepted()
* @param string $module the module name
* @return string
*/
static function get($k, $module = 'system')
static function get($key, $module = 'system')
{
if(empty(self::$lang[$module]))
{
self::load(self::choose($module), $module);
}
return self::$lang[$module][$k];
return self::$lang[$module][$key];
}


Expand Down
12 changes: 6 additions & 6 deletions theme/view/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ a:hover { color: #000; }
header { border-bottom: 1px solid #ddd; }
header h1 { color: #ddd; margin: 0;line-height: 100px; }

nav ul{ list-style: none;margin: 0;padding: 0;}
nav ul{ list-style: none;margin: 0;padding: 0;}
nav ul li { float: right;margin: 0 2em 0 0;line-height: 100px; }

#sidebar h3 { margin-bottom: 5px; }
Expand Down Expand Up @@ -66,21 +66,21 @@ form.formstyle .form_error
}
.message
{
background: #F8FAFC url(images/message.png) 20px center no-repeat;
background: #F8FAFC url(../images/message.png) 20px center no-repeat;
border-color: #B5D4FE;
}
.warning
{
background: #fff6bf url(images/warning.png) 20px center no-repeat;
background: #fff6bf url(../images/warning.png) 20px center no-repeat;
border-color: #ffd324;
}
.error
{
background: #fde6e9 url(images/error.png) 20px center no-repeat;
background: #fde6e9 url(../images/error.png) 20px center no-repeat;
border-color: #fb939f;
}
.success
{
background: #EBFCE1 url(images/success.png) 20px center no-repeat;
background: #EBFCE1 url(../images/success.png) 20px center no-repeat;
border-color: #B9DAA6;
}
}
Binary file removed theme/view/images/bullet_arrow_down.png
Binary file not shown.
Binary file removed theme/view/images/bullet_arrow_up.png
Binary file not shown.
Loading

0 comments on commit 32d0b42

Please sign in to comment.