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
<?php | |
function updateSettingsFile($config_vars) | |
{ | |
global $boarddir, $cachedir, $context; | |
// Updating the db_last_error, then don't mess around with Settings.php | |
if (count($config_vars) === 1 && isset($config_vars['db_last_error'])) | |
{ | |
updateDbLastError($config_vars['db_last_error']); |
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
<tpl:container> | |
<tpl:template name="site:rounded"><tpl:if test="!isset({$header}) && !isset({$right})"> | |
<div class="content no_header{tpl:if test="isset({$class})"} {$class}{/tpl:if}{tpl:if test="isset({$color})"} {$color}{/tpl:if}"{tpl:if test="isset({$id})"} id="{$id}"{/tpl:if}{tpl:if test="isset({$style})"} style="{$style}"{/tpl:if}><tpl:else /> | |
<div class="content with_header{tpl:if test="isset({$class})"} {$class}{/tpl:if}{tpl:if test="isset({$color})"} {$color}{/tpl:if}"{tpl:if test="isset({$id})"} id="{$id}"{/tpl:if}{tpl:if test="isset({$style})"} style="{$style}"{/tpl:if}> | |
<div class="header"> | |
<div><tpl:if test="isset({$right})"> | |
<span class="floatright">{$right}</span></tpl:if> | |
<span><tpl:if test="isset({$header}) && !empty({$header})">{$header}<tpl:else /> </tpl:if></span> | |
</div> | |
</div></tpl:if> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
{% block head %} | |
<link rel="stylesheet" href="style.css" /> | |
<title>{% block title %}{% endblock %} - My Webpage</title> | |
{% endblock %} | |
</head> | |
<body> | |
<div id="content">{% block content %}{% endblock %}</div> |
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
[alias] | |
cm = commit -s | |
co = commit -s | |
ca = commit --amend -s | |
cas = commit --amend -s | |
commits = commit -s |
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
<?php | |
namespace smCore\storage; | |
use smCore\storage\Storage, smCore\cache\Cache; | |
/** | |
* Database services concerning members. This class' methods allow us to retrieve, add and update | |
* information in/from the database about members. | |
* Every method deals with the necessary query/queries alone, as much as possible, thus allowing a single | |
* point where potential other Storage classes may override the query, for performance or other needs. |
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
<?php | |
// in a file | |
function database() | |
{ | |
return Storage::database(); | |
} | |
... |
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
<?php | |
class PDOConnection extends \PDO | |
{ | |
// ... stuff | |
function fetch_all_as_whatever($query, $params) | |
{ | |
// prepare, clean, whatnot | |
// retrieve a statement |
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
<?php | |
namespace JawHare; | |
class UserTest extends \PHPUnit_Framework_TestCase | |
{ | |
static protected $user; | |
protected $user_data = array( | |
'username' => 'PHPUnitTest', | |
'fullname' => 'PHP Unit Testing', |
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
// If it hasn't been modified since the last time this attachement was retrieved, there's no need to display it again. | |
if (!empty($_SERVER['HTTP_IF_MODIFIED_SINCE'])) | |
{ | |
list($modified_since) = explode(';', $_SERVER['HTTP_IF_MODIFIED_SINCE']); | |
if (strtotime($modified_since) >= filemtime($filename)) | |
{ | |
ob_end_clean(); | |
// Answer the question - no, it hasn't been modified ;). | |
header('HTTP/1.1 304 Not Modified'); |
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
abstract class Controller | |
{ | |
abstract function dispatch(); | |
} | |
class BreezeSomething extends Controller | |
{ | |
function dispatch() | |
{ | |
// ... | |
} |
OlderNewer