Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
352e7ba
commit 8cdb5dd
Showing
13 changed files
with
56 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,13 @@ | ||
<?php | ||
|
||
class AppModel extends Model | ||
{ | ||
/* | ||
* unique | ||
* used for validation | ||
*/ | ||
function unique($data) { | ||
function unique($data) | ||
{ | ||
return $this->isUnique(array(key($data)=>current($data))); | ||
} | ||
|
||
function afterFind($result){ | ||
foreach($result as &$rs){ | ||
if(isSet($rs[$this->name]['created'])){ | ||
$rs[$this->name]['created'] = date('m/d/Y H:i:s', strtotime($rs[$this->name]['created'])); | ||
} | ||
if(isSet($rs[$this->name]['modified'])){ | ||
$rs[$this->name]['modified'] = date('m/d/Y H:i:s', strtotime($rs[$this->name]['modified'])); | ||
} | ||
} | ||
return $result; | ||
} | ||
|
||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<ul id="menu"> | ||
<li><?php echo $html->link("Home", "/"); ?></li> | ||
<?php foreach ($this->requestAction("/pages/menu") as $page): ?> | ||
<?php echo $this->element("../layouts/_submenu", array("page" => $page)); ?> | ||
<?php endforeach ?> | ||
<li><?php echo $html->link("Test", "/pages/test"); ?></li> | ||
<li><?php echo $html->link("About us", "/pages/about-us"); ?></li> | ||
</ul> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.