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

Commit 216eaa0

Browse files
committed
Merge pull request #2 from cbodin/dev
Dev
2 parents 9e90d12 + 3278cea commit 216eaa0

File tree

7 files changed

+1720
-28
lines changed

7 files changed

+1720
-28
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ This is still in an early development phase. Features and API can change overnig
1414
## External libraries
1515
Some built in modules requires some libraries to be installed via composer:
1616

17-
- The RedBeanPHP module requires the [RedBeanPHP library](https://github.com/gabordemooij/redbean).
1817
- The VeloxFacebook module requires the [Facebook PHP SDK](https://github.com/facebook/facebook-php-sdk).
1918
- The Message::debug() method will output the code using [Krumo](https://github.com/oodle/krumo) if it's installed.
2019
- The Sass module requires the [scssphp library](https://github.com/leafo/scssphp/).

composer.example.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"require": {
3+
"leafo/scssphp": "dev-master",
4+
"facebook/php-sdk": "@stable",
5+
"oodle/krumo": "dev-master"
6+
}
7+
}

framework/modules/ImageStyle/classes/ImageStyle.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class ImageStyle {
5959
}
6060

6161
// Include effects class.
62-
Module::loadInclude('ImageStyle', 'ImageStyleEffects.inc');
62+
Module::loadInclude('ImageStyle', 'classes/ImageStyleEffects.inc');
6363

6464
$create_function = 'imagecreatefrom' . $type;
6565
$save_function = 'image' . $type;
Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,24 @@
11
<?php
2-
if (!class_exists('RedBean_Facade')) {
3-
Message::set(
4-
'Missing RedBeanPHP library. Install it using Composer.',
5-
Message::ERROR
6-
);
7-
}
8-
else {
9-
class R extends RedBean_Facade {}
10-
11-
/**
12-
* Configure RedBeanPHP.
13-
*
14-
* Configures all databases to RedBeanPHP.
15-
*/
16-
foreach (Settings::get('database', array()) as $dbkey => $dbinfo) {
17-
$method = 'addDatabase';
2+
Module::loadInclude('RedBeanPHP', 'lib/RedBeanPHP4_0_0/rb.phar');
183

19-
// Setup RedBeanPHP with the default db
20-
if ($dbkey == 'default') {
21-
$method = 'setup';
22-
}
4+
/**
5+
* Configure RedBeanPHP.
6+
*
7+
* Configures all databases to RedBeanPHP.
8+
*/
9+
foreach (Settings::get('database', array()) as $dbkey => $dbinfo) {
10+
$method = 'addDatabase';
2311

24-
$args = Database::getConnectionArgs($dbinfo);
25-
call_user_func_array(array('R', $method), $args);
12+
// Setup RedBeanPHP with the default db
13+
if ($dbkey == 'default') {
14+
$method = 'setup';
2615
}
2716

28-
// dont change the database after deployment
29-
if (!Settings::get('development', false)) {
30-
R::freeze(true);
31-
}
17+
$args = Database::getConnectionArgs($dbinfo);
18+
call_user_func_array(array('R', $method), $args);
19+
}
20+
21+
// dont change the database after deployment
22+
if (!Settings::get('development', false)) {
23+
R::freeze(true);
3224
}

0 commit comments

Comments
 (0)