Skip to content

Commit

Permalink
continued work on 3.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
benkeen committed Apr 22, 2017
1 parent 27711f1 commit 6314be5
Show file tree
Hide file tree
Showing 22 changed files with 224 additions and 169 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ Generally the trunk is pretty stable, but it's not guaranteed. If you're downloa
tag: https://github.com/benkeen/generatedata/releases

## Requirements
- PHP 5.3 or any later version of PHP 5. *Doesn't currently support PHP 7. 3.3.0 is currently in dev that will support it.*
- PHP 5.3 or any later version of PHP 5. *Uses mysqli_* which is disabled in default installations of PHP 7. Version
3.3.0 is currently in dev that moves the DB connection layer to PDO.*
- MySQL 4.1.3 or later

## How to Install / Documentation
Expand Down Expand Up @@ -80,7 +81,7 @@ In addition to the many fine folk who submit bug reports, a big thanks to the fo
## Changelog

3.3.0 - April 2017 *In development*
- moving to use PDO for database connection for PHP7 support.
- moving to use PDO for database connection.

3.2.6 - Apr 17, 2017
- misc bug fixes: https://github.com/benkeen/generatedata/milestone/20?closed=1
Expand Down
34 changes: 32 additions & 2 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ module.exports = function(grunt) {
}
},

sass: {
options: {
sourceMap: true
},
dist: {
files: {
'resources/themes/classic/compiled/styles.css': 'resources/themes/classic/sass/styles.scss'
}
}
},

cssmin: {
target: {
files: {
Expand Down Expand Up @@ -93,11 +104,23 @@ module.exports = function(grunt) {
failOnMatch: true
}
}
}
},

watch: {
scripts: {
files: ['**/*.scss'],
tasks: ['sass'],
options: {
spawn: false
}
}
}
};

grunt.initConfig(config);

grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-md5');
Expand All @@ -106,13 +129,14 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-search');

/**
* The default - and only - Grunt task simply recreates all the bundled resources. It doesn't alter the actual
* The default Grunt task simply recreates all the bundled resources. It doesn't alter the actual
* script at all. To use these bundled resources you need to add a $useMinifiedResources = true; var to your
* settings.php file.
*/
grunt.registerTask('default', [

// uglify the core CSS + JS
'sass',
'uglify',
'cssmin',

Expand All @@ -125,4 +149,10 @@ module.exports = function(grunt) {
// with the latest file mapping
'md5'
]);

/**
* For local dev work. Watches the sass files and regenerates the CSS.
*/
grunt.registerTask('local', ['watch']);

};
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@
"url": "https://github.com/benkeen/generatedata/issues"
},
"devDependencies": {
"grunt-cli": "~0.1.9",
"grunt": "~0.4.1",
"grunt-cli": "~0.1.9",
"grunt-contrib-cssmin": "~0.6.1",
"grunt-contrib-requirejs": "~0.4.1",
"grunt-contrib-uglify": "~0.2.4",
"grunt-contrib-watch": "^1.0.0",
"grunt-md5": "~0.1.11",
"grunt-template": "~0.2.0",
"grunt-contrib-cssmin": "~0.6.1",
"grunt-search": "~0.1.2"
"grunt-sass": "^2.0.0",
"grunt-search": "~0.1.2",
"grunt-template": "~0.2.0"
}
}
3 changes: 1 addition & 2 deletions plugins/dataTypes/City/City.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,9 @@ public function generate($generator, $generationContextData) {
* $citiesByCountryRegion private var.
*/
private function initCityList() {
$prefix = Core::getDbTablePrefix();
$response = Core::$db->query("
SELECT *
FROM {$prefix}cities
FROM {PREFIX}cities
");

if (!$response["success"]) {
Expand Down
6 changes: 2 additions & 4 deletions plugins/dataTypes/Country/Country.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,9 @@ public function getCountries($countrySlugs) {
$whereClause .= "AND $slugClause";
}

$prefix = Core::getDbTablePrefix();
$response = Core::$db->query("
SELECT *
FROM {$prefix}countries
FROM {PREFIX}countries
$whereClause
");

Expand All @@ -185,10 +184,9 @@ public function getCountries($countrySlugs) {
}

function getRegions($countryID) {
$prefix = Core::getDbTablePrefix();
$response = Core::$db->query("
SELECT *
FROM {$prefix}regions
FROM {PREFIX}regions
WHERE country_id = $countryID
");

Expand Down
19 changes: 8 additions & 11 deletions plugins/dataTypes/Names/Names.class.php

Large diffs are not rendered by default.

21 changes: 8 additions & 13 deletions plugins/dataTypes/NamesRegional/NamesRegional.class.php

Large diffs are not rendered by default.

Loading

0 comments on commit 6314be5

Please sign in to comment.