Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Commit 60154e6

Browse files
committed
Merge pull request #5 from cbodin/dev
pr for v0.1.4
2 parents 54c9f93 + 1d5a6c7 commit 60154e6

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed

framework/classes/Url.inc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ class Url {
6969
'clean' => Settings::get('clean_urls', true),
7070
);
7171

72+
// Let modules alter the options and path before generating the
73+
// url.
74+
Module::alterAction('preUrlGenerate', $path, $options);
75+
7276
$site_urls = self::get();
7377

7478
if ($options['scheme'] == 'http') {
@@ -114,6 +118,14 @@ class Url {
114118
$url .= '#' . $options['fragment'];
115119
}
116120

121+
$action_info = array(
122+
'path' => $path,
123+
'options' => $options,
124+
);
125+
126+
// Let modules alter the url before output
127+
Module::alterAction('postUrlGenerate', $url, $action_info);
128+
117129
return $url;
118130
}
119131

framework/classes/Variable.inc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,6 @@ class Variable {
183183
private static function checkDb() {
184184
// check if this function was called before
185185
if (!self::$tableInstalled) {
186-
global $config;
187-
188186
// Get the active database key
189187
$active_db = Database::getActive();
190188
$driver = Database::getDriver();
@@ -228,7 +226,7 @@ class Variable {
228226
$table = $sth->fetchColumn();
229227

230228
if (!$table) {
231-
switch ($config['database'][$active_db]['driver']) {
229+
switch ($driver) {
232230
case 'mysql':
233231
$query = '
234232
CREATE TABLE velox_variables (

framework/modules/RedBeanPHP/RedBeanPHP.inc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ foreach (Settings::get('database', array()) as $dbkey => $dbinfo) {
1818
call_user_func_array(array('R', $method), $args);
1919
}
2020

21-
// dont change the database after deployment
22-
if (!Settings::get('development', false)) {
21+
$settings = Settings::get('RedBeanPHP', array());
22+
23+
if (isset($settings) && $settings['freeze']) {
2324
R::freeze(true);
2425
}

framework/themes/velox/css/velox.css

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)