Commit d9ad9cbf authored by Henning Leutz's avatar Henning Leutz 🥋

Revert "Revert "Merge branch 'dev' of https://dev.quiqqer.com/quiqqer/quiqqer into dev""

This reverts commit b5866929
parent 24ff4223
......@@ -4,6 +4,7 @@
* Create a new project
*
* @param string $params - JSON Array
*
* @return string - Name of the project
*/
QUI::$Ajax->registerFunction(
......@@ -16,6 +17,25 @@ QUI::$Ajax->registerFunction(
$params['lang']
);
if (isset($params['template']) && !empty($params['template'])) {
$Config = QUI::getProjectManager()->getConfig();
$installedTemplates = QUI::getPackageManager()->getInstalled([
'type' => 'quiqqer-template'
]);
$template = $params['template'];
$template = \QUI\Utils\Security\Orthos::removeHTML($template);
$template = \QUI\Utils\Security\Orthos::clearPath($template);
$Config->set($Project->getName(), 'template', $template);
$Config->save();
}
if (isset($params['demodata']) && $params['demodata']) {
\QUI\Utils\Project::applyDemoDataToProject($Project, $template);
}
return $Project->getName();
},
['params'],
......
......@@ -58,6 +58,16 @@
</select>
</td>
</tr>
<tr class="even">
<td>
<label for="">
{t}quiqqer/system demodata.project.label.template{/t}
</label>
</td>
<td>
<input type="checkbox" name="demodata" />
</td>
</tr>
</tbody>
</table>
......
......@@ -3,11 +3,8 @@
*
* @module DownloadManager
* @author www.pcsg.de (Henning Leutz)
*
* @require classes/request/Downloads
*/
define(['classes/request/Downloads'], function (DownloadManager) {
define('DownloadManager', ['classes/request/Downloads'], function (DownloadManager) {
"use strict";
return new DownloadManager();
......
......@@ -3,9 +3,8 @@
*
* @module UploadManager
* @author www.pcsg.de (Henning Leutz)
* @require controls/upload/Manager
*/
define(['controls/upload/Manager'], function (UploadManager) {
define('UploadManager', ['controls/upload/Manager'], function (UploadManager) {
"use strict";
return new UploadManager();
......
......@@ -155,9 +155,10 @@ define('classes/projects/Manager', [
* @param {String} project
* @param {String} lang
* @param {String} template
* @param demodata
* @param {Function} [onfinish]
*/
createNewProject: function (project, lang, template, onfinish) {
createNewProject: function (project, lang, template, demodata, onfinish) {
var self = this;
this.$getList = null;
......@@ -173,7 +174,8 @@ define('classes/projects/Manager', [
params: JSON.encode({
project : project,
lang : lang,
template: template
template: template,
demodata: demodata
})
});
},
......
......@@ -29,30 +29,30 @@ define('controls/lang/Popup', [
*/
return new Class({
Extends : QUIConfirm,
Type : 'controls/lang/Popup',
Extends: QUIConfirm,
Type : 'controls/lang/Popup',
Binds : [
Binds: [
'submit',
'$onCreate',
'$onSubmit'
],
options : {
title : Locale.get('quiqqer/system', 'lang.popup.title'),
maxHeight : 600,
maxWidth : 500,
autoclose : false
options: {
title : Locale.get('quiqqer/system', 'lang.popup.title'),
maxHeight: 600,
maxWidth : 500,
autoclose: false
},
initialize : function (options) {
initialize: function (options) {
this.$Active = null;
this.parent(options);
this.addEvents({
onCreate : this.$onCreate,
onResize : this.$onResize
onCreate: this.$onCreate,
onResize: this.$onResize
});
},
......@@ -60,7 +60,7 @@ define('controls/lang/Popup', [
* Submit the window, close the window if a language is selected
* and trigger the onSubmit event
*/
submit : function () {
submit: function () {
if (!this.$Grid) {
return;
}
......@@ -74,7 +74,7 @@ define('controls/lang/Popup', [
var result = [];
for (var i = 0, len = selected.length; i < len; i++) {
result.push(selected[ i ].lang);
result.push(selected[i].lang);
}
this.fireEvent('submit', [result, this]);
......@@ -84,58 +84,54 @@ define('controls/lang/Popup', [
/**
* event : onCreate
*/
$onCreate : function () {
$onCreate: function () {
var Content = this.getContent(),
langs = this.getLanguages();
this.getElm().set('data-qui', this.getType());
var GridContainer = new Element('div', {
styles : {
width : '100%'
styles: {
width: '100%'
}
}).inject(Content);
this.$Grid = new Grid(GridContainer, {
columnModel : [{
header : '',
dataIndex : 'image',
dataType : 'image',
width : 50
}, {
header : '',
dataIndex : 'lang',
dataType : 'string',
width : 50
columnModel: [{
header : Locale.get('quiqqer/system', 'language.code'),
dataIndex: 'lang',
dataType : 'string',
width : 100
}, {
header : Locale.get('quiqqer/system', 'language'),
dataIndex : 'text',
dataType : 'string',
width : 250
header : Locale.get('quiqqer/system', 'language'),
dataIndex: 'text',
dataType : 'string',
width : 250
}]
});
this.$Grid.addEvents({
dblClick : this.submit
dblClick: this.submit
});
var data = [];
for (var i = 0, len = langs.length; i < len; i++) {
data.push({
image : URL_BIN_DIR + '16x16/flags/' + langs[ i ] + '.png',
text : Locale.get('quiqqer/system', 'lang.' + langs[ i ]),
lang : langs[ i ]
text: Locale.get('quiqqer/quiqqer', 'language.' + langs[i]),
lang: langs[i]
});
}
this.$Grid.setData({
data : data
data: data
});
},
/**
* event : resize window
*/
$onResize : function () {
$onResize: function () {
var Content = this.getContent();
if (Content.getElement('.submit-body')) {
......@@ -152,36 +148,70 @@ define('controls/lang/Popup', [
*
* @return {Array}
*/
getLanguages : function () {
return [
'ad', 'bi', 'cn', 'gr', 'jo', 'lv', 'mz', 'pr', 'sm',
'tz', 'ae', 'bj', 'co', 'es', 'gs', 'jp', 'ly', 'na',
'ps', 'sn', 'ua', 'af', 'bm', 'cr', 'et', 'gt', 'ke',
'ma', 'nc', 'pt', 'so', 'ug', 'ag', 'bn', 'cs', 'gu',
'kg', 'mc', 'ne', 'pw', 'sr', 'uk', 'ai', 'bo', 'cu',
'gw', 'kh', 'md', 'nf', 'py', 'st', 'um', 'al', 'br',
'cv', 'fi', 'gy', 'ki', 'me', 'ng', 'qa', 'sv', 'us',
'am', 'bs', 'cx', 'fj', 'hk', 'km', 'mg', 'ni', 're',
'sy', 'uy', 'an', 'bt', 'cy', 'fk', 'hm', 'kn', 'mh',
'nl', 'ro', 'sz', 'uz', 'ao', 'bv', 'cz', 'fm', 'hn',
'kp', 'mk', 'no', 'rs', 'tc', 'va', 'ar', 'bw', 'fo',
'hr', 'kr', 'ml', 'np', 'ru', 'td', 'vc', 'as', 'by',
'de', 'fr', 'ht', 'kw', 'mm', 'nr', 'rw', 'tf', 've',
'at', 'bz', 'dj', 'ga', 'hu', 'ky', 'mn', 'nu', 'sa',
'tg', 'vg', 'au', 'ca', 'dk', 'gb', 'id', 'kz', 'mo',
'nz', 'sb', 'th', 'vi', 'aw', 'dm', 'gd', 'ie', 'la',
'mp', 'om', 'tj', 'vn', 'ax', 'cc', 'do', 'ge', 'il',
'mq', 'pa', 'sc', 'tk', 'vu', 'az', 'cd', 'dz', 'gf',
'in', 'lb', 'mr', 'pe', 'sd', 'tl', 'ba', 'cf', 'ec',
'gh', 'lc', 'ms', 'pf', 'se', 'tm', 'wf', 'bb', 'cg',
'ee', 'gi', 'io', 'li', 'mt', 'pg', 'sg', 'tn', 'ws',
'bd', 'ch', 'eg', 'gl', 'iq', 'lk', 'mu', 'ph', 'sh',
'to', 'ye', 'be', 'ci', 'eh', 'gm', 'ir', 'lr', 'mv',
'pk', 'si', 'tr', 'yt', 'bf', 'ck', 'gn', 'is', 'ls',
'mw', 'pl', 'sj', 'tt', 'za', 'bg', 'cl', 'en', 'gp',
'it', 'lt', 'mx', 'pm', 'sk', 'tv', 'zm', 'bh', 'cm',
'er', 'gq', 'jm', 'lu', 'my', 'pn', 'sl', 'tw', 'zw'
].sort();
getLanguages: function () {
var languages = [
'aa', 'ab', 'ace', 'ach', 'ada', 'ady', 'ae', 'aeb', 'af', 'afh', 'agq', 'ain',
'ak', 'akk', 'akz', 'ale', 'aln', 'alt', 'am', 'an', 'ang', 'anp', 'ar', 'ar-001',
'arc', 'arn', 'aro', 'arp', 'arq', 'arw', 'ary', 'arz', 'as', 'asa', 'ase', 'ast',
'av', 'avk', 'awa', 'ay', 'az', 'az-alt-short', 'ba', 'bal', 'ban', 'bar', 'bas',
'bax', 'bbc', 'bbj', 'be', 'bej', 'bem', 'bew', 'bez', 'bfd', 'bfq', 'bg', 'bgn',
'bho', 'bi', 'bik', 'bin', 'bjn', 'bkm', 'bla', 'bm', 'bn', 'bo', 'bpy', 'bqi',
'br', 'bra', 'brh', 'brx', 'bs', 'bss', 'bua', 'bug', 'bum', 'byn', 'byv', 'ca',
'cad', 'car', 'cay', 'cch', 'ce', 'ceb', 'cgg', 'ch', 'chb', 'chg', 'chk', 'chm',
'chn', 'cho', 'chp', 'chr', 'chy', 'ckb', 'co', 'cop', 'cps', 'cr', 'crh', 'cs',
'csb', 'cu', 'cv', 'cy', 'da', 'dak', 'dar', 'dav', 'de', 'de-AT', 'de-CH', 'del',
'den', 'dgr', 'din', 'dje', 'doi', 'dsb', 'dtp', 'dua', 'dum', 'dv', 'dyo', 'dyu',
'dz', 'dzg', 'ebu', 'ee', 'efi', 'egl', 'egy', 'eka', 'el', 'elx', 'en', 'en-AU',
'en-CA', 'en-GB', 'en-GB-alt-short', 'en-US', 'en-US-alt-short', 'enm', 'eo', 'es',
'es-419', 'es-ES', 'es-MX', 'esu', 'et', 'eu', 'ewo', 'ext', 'fa', 'fa-AF', 'fan',
'fat', 'ff', 'fi', 'fil', 'fit', 'fj', 'fo', 'fon', 'fr', 'fr-CA', 'fr-CH', 'frc',
'frm', 'fro', 'frp', 'frr', 'frs', 'fur', 'fy', 'ga', 'gaa', 'gag', 'gan', 'gay',
'gba', 'gbz', 'gd', 'gez', 'gil', 'gl', 'glk', 'gmh', 'gn', 'goh', 'gom', 'gon',
'gor', 'got', 'grb', 'grc', 'gsw', 'gu', 'guc', 'gur', 'guz', 'gv', 'gwi', 'ha',
'hai', 'hak', 'haw', 'he', 'hi', 'hif', 'hil', 'hit', 'hmn', 'ho', 'hr', 'hsb',
'hsn', 'ht', 'hu', 'hup', 'hy', 'hz', 'ia', 'iba', 'ibb', 'id', 'ie', 'ig', 'ii',
'ik', 'ilo', 'inh', 'io', 'is', 'it', 'iu', 'izh', 'ja', 'jam', 'jbo', 'jgo', 'jmc',
'jpr', 'jrb', 'jut', 'jv', 'ka', 'kaa', 'kab', 'kac', 'kaj', 'kam', 'kaw', 'kbd',
'kbl', 'kcg', 'kde', 'kea', 'ken', 'kfo', 'kg', 'kgp', 'kha', 'kho', 'khq', 'khw',
'ki', 'kiu', 'kj', 'kk', 'kkj', 'kl', 'kln', 'km', 'kmb', 'kn', 'ko', 'koi', 'kok',
'kos', 'kpe', 'kr', 'krc', 'kri', 'krj', 'krl', 'kru', 'ks', 'ksb', 'ksf', 'ksh',
'ku', 'kum', 'kut', 'kv', 'kw', 'ky', 'ky-alt-variant', 'la', 'lad', 'lag', 'lah',
'lam', 'lb', 'lez', 'lfn', 'lg', 'li', 'lij', 'liv', 'lkt', 'lmo', 'ln', 'lo', 'lol',
'loz', 'lrc', 'lt', 'ltg', 'lu', 'lua', 'lui', 'lun', 'luo', 'lus', 'luy', 'lv',
'lzh', 'lzz', 'mad', 'maf', 'mag', 'mai', 'mak', 'man', 'mas', 'mde', 'mdf', 'mdh',
'mdr', 'men', 'mer', 'mfe', 'mg', 'mga', 'mgh', 'mgo', 'mh', 'mi', 'mic', 'min',
'mis', 'mk', 'ml', 'mn', 'mnc', 'mni', 'moh', 'mos', 'mr', 'mrj', 'ms', 'mt', 'mua',
'mul', 'mus', 'mwl', 'mwr', 'mwv', 'my', 'my-alt-variant', 'mye', 'myv', 'mzn',
'na', 'nan', 'nap', 'naq', 'nb', 'nd', 'nds', 'nds-NL', 'ne', 'new', 'ng', 'nia',
'niu', 'njo', 'nl', 'nl-BE', 'nmg', 'nn', 'nnh', 'no', 'nog', 'non', 'nov', 'nqo',
'nr', 'nso', 'nus', 'nv', 'nwc', 'ny', 'nym', 'nyn', 'nyo', 'nzi', 'oc', 'oj', 'om',
'or', 'os', 'osa', 'ota', 'pa', 'pag', 'pal', 'pam', 'pap', 'pau', 'pcd', 'pdc',
'pdt', 'peo', 'pfl', 'phn', 'pi', 'pl', 'pms', 'pnt', 'pon', 'prg', 'pro', 'ps',
'ps-alt-variant', 'pt', 'pt-BR', 'pt-PT', 'qu', 'quc', 'qug', 'raj', 'rap', 'rar',
'rgn', 'rif', 'rm', 'rn', 'ro', 'ro-MD', 'rof', 'rom', 'root', 'rtm', 'ru', 'rue',
'rug', 'rup', 'rw', 'rwk', 'sa', 'sad', 'sah', 'sam', 'saq', 'sas', 'sat', 'saz',
'sba', 'sbp', 'sc', 'scn', 'sco', 'sd', 'sdc', 'sdh', 'se', 'see', 'seh', 'sei',
'sel', 'ses', 'sg', 'sga', 'sgs', 'sh', 'shi', 'shn', 'shu', 'si', 'sid', 'sk',
'sl', 'sli', 'sly', 'sm', 'sma', 'smj', 'smn', 'sms', 'sn', 'snk', 'so', 'sog',
'sq', 'sr', 'srn', 'srr', 'ss', 'ssy', 'st', 'stq', 'su', 'suk', 'sus', 'sux',
'sv', 'sw', 'sw-CD', 'swb', 'syc', 'syr', 'szl', 'ta', 'tcy', 'te', 'tem', 'teo',
'ter', 'tet', 'tg', 'th', 'ti', 'tig', 'tiv', 'tk', 'tkl', 'tkr', 'tl', 'tlh',
'tli', 'tly', 'tmh', 'tn', 'to', 'tog', 'tpi', 'tr', 'tru', 'trv', 'ts', 'tsd',
'tsi', 'tt', 'ttt', 'tum', 'tvl', 'tw', 'twq', 'ty', 'tyv', 'tzm', 'udm', 'ug',
'ug-alt-variant', 'uga', 'uk', 'umb', 'und', 'ur', 'uz', 'vai', 've', 'vec', 'vep',
'vi', 'vls', 'vmf', 'vo', 'vot', 'vro', 'vun', 'wa', 'wae', 'wal', 'war', 'was',
'wbp', 'wo', 'wuu', 'xal', 'xh', 'xmf', 'xog', 'yao', 'yap', 'yav', 'ybb', 'yi',
'yo', 'yrl', 'yue', 'za', 'zap', 'zbl', 'zea', 'zen', 'zgh', 'zh', 'zh-Hans',
'zh-Hant', 'zu', 'zun', 'zxx', 'zza'
];
languages = languages.filter(function (language) {
return language.length === 2;
});
languages = languages.sort();
return languages;
}
});
......
......@@ -270,6 +270,7 @@ define('controls/projects/Manager', [
Form.elements.project.value,
Form.elements.lang.value,
Form.elements.template.value,
Form.elements.demodata.value,
function (result) {
self.Loader.hide();
......
......@@ -64,4 +64,26 @@
line-height: 36px !important;
margin: 0 !important;
width: 40px !important;
}
.quiqqer-project-panel .qui-panel-icon {
display: none;
}
.quiqqer-project-panel h2.qui-panel-title {
padding-left: 10px;
}
.quiqqer-project-panel-button-home {
width: 40px;
}
.quiqqer-project-panel-button-home .image-container {
float: left;
text-align: center;
width: 100%;
}
.quiqqer-project-panel-button-home .image-container span {
float: none;
}
\ No newline at end of file
......@@ -68,7 +68,7 @@ define('controls/projects/project/Panel', [
name : 'projects-panel',
project: false,
lang : false,
icon : 'fa fa-home'
icon : false
});
this.parent(options);
......@@ -79,18 +79,18 @@ define('controls/projects/project/Panel', [
title: Locale.get('quiqqer/system', 'projects.project.panel.title')
});
this.$Map = null;
this.$Map = null;
this.$projectmaps = {};
this.$Filter = null;
this.$Button = null;
this.$Filter = null;
this.$Button = null;
this.$ProjectList = null;
this.$ProjectList = null;
this.$ProjectContainer = null;
this.$ProjectSearch = null;
this.$ProjectContent = null;
this.$ProjectSearch = null;
this.$ProjectContent = null;
this.$LanguageSelect = null;
this.$MediaButton = null;
this.$MediaButton = null;
this.$__fx_run = false;
......@@ -150,6 +150,8 @@ define('controls/projects/project/Panel', [
var self = this,
Content = this.getContent();
this.getElm().addClass('quiqqer-project-panel');
Content.set(
'html',
......@@ -163,9 +165,9 @@ define('controls/projects/project/Panel', [
Content.setStyle('opacity', 0);
this.$ProjectContainer = Content.getElement('.project-container');
this.$ProjectList = Content.getElement('.project-list');
this.$ProjectSearch = Content.getElement('.project-search');
this.$ProjectContent = Content.getElement('.project-content');
this.$ProjectList = Content.getElement('.project-list');
this.$ProjectSearch = Content.getElement('.project-search');
this.$ProjectContent = Content.getElement('.project-content');
this.$ProjectContainer.setStyles({
height: 'calc(100% - 40px)'
......@@ -305,7 +307,7 @@ define('controls/projects/project/Panel', [
// title button
this.$Button = new QUIButton({
name : 'projects',
image : 'fa fa-arrow-circle-left',
icon : 'fa fa-home',
title : Locale.get('quiqqer/system', 'projects.project.panel.projectSelect'),
events: {
onClick: function (Btn, event) {
......@@ -332,6 +334,7 @@ define('controls/projects/project/Panel', [
}
self.createList();
self.open();
}
}
}).inject(this.getHeader(), 'top');
......@@ -339,6 +342,7 @@ define('controls/projects/project/Panel', [
this.$Button.getElm().removeClass('qui-button');
this.$Button.getElm().addClass('button');
this.$Button.getElm().addClass('btn-blue');
this.$Button.getElm().addClass('quiqqer-project-panel-button-home');
},
/**
......@@ -366,24 +370,26 @@ define('controls/projects/project/Panel', [
self.openProject();
self.Loader.hide();
return;
} else if (Object.getLength(result)) {
for (key in result) {
if (!result.hasOwnProperty(key)) {
continue;
}
} else {
if (Object.getLength(result)) {
for (key in result) {
if (!result.hasOwnProperty(key)) {
continue;
}
if (result[key].standard !== "1") {
continue;
}
if (result[key].standard !== "1") {
continue;
self.setAttribute('project', key);
self.setAttribute('lang', result[key].default_lang);
break;
}
self.setAttribute('project', key);
self.setAttribute('lang', result[key].default_lang);
break;
self.openProject();
self.Loader.hide();
return;
}
self.openProject();
self.Loader.hide();
return;
}
// no projects exists
......@@ -676,7 +682,7 @@ define('controls/projects/project/Panel', [
onChildClick : this.$openSitePanel,
onChildContextMenu: function (Item, MapItem, event) {
var title = MapItem.getAttribute('text') + ' - ' +
MapItem.getAttribute('value');
MapItem.getAttribute('value');
MapItem.getContextMenu().setTitle(title).setPosition(
event.page.x,
......
/**
* @module controls/users/Login
*
* @event onLoad
* @event onAuthBegin
* @event onAuthNext
* @event onSuccess
* @event onAuthNext
* @event onUserLoginError [error, this]
* @event onLoad [self]
* @event onAuthBegin [self]
* @event onAuthNext [self]
* @event onSuccess [self]
* @event onUserLoginError [error, self]
*
* @event onQuiqqerUserAuthLoginLoad [self]
* @event onQuiqqerUserAuthLoginUserLoginError [error, self]
* @event onQuiqqerUserAuthLoginAuthBegin [self]
* @event onQuiqqerUserAuthLoginSuccess [self]
* @event onQuiqqerUserAuthNext [self]
*/
define('controls/users/Login', [
......@@ -91,6 +96,7 @@ define('controls/users/Login', [
QUIAjax.get('ajax_users_loginControl', function (result) {
self.$buildAuthenticator(result).then(function () {
self.fireEvent('load', [self]);
QUI.fireEvent('quiqqerUserAuthLoginLoad', [self]);
});
}, {
isAdminLogin : typeof QUIQQER_IS_ADMIN_LOGIN !== 'undefined' ? 1 : 0,
......@@ -111,6 +117,7 @@ define('controls/users/Login', [
this.$refreshForm();
this.fireEvent('load', [this]);
QUI.fireEvent('quiqqerUserAuthLoginLoad', [this]);
},
/**
......@@ -142,6 +149,7 @@ define('controls/users/Login', [
this.auth(Target).catch(function (err) {
self.fireEvent('userLoginError', [err, self]);
QUI.fireEvent('quiqqerUserAuthLoginUserLoginError', [err, self]);
});
}.bind(this)
}
......@@ -225,6 +233,7 @@ define('controls/users/Login', [
}
this.fireEvent('authBegin', [this]);
QUI.fireEvent('quiqqerUserAuthLoginAuthBegin', [this]);
return new Promise(function (resolve, reject) {
QUIAjax.post('ajax_users_login', function (result) {
......@@ -233,6 +242,7 @@ define('controls/users/Login', [
window.QUIQQER_USER = result.user;
self.fireEvent('success', [self]);
QUI.fireEvent('quiqqerUserAuthLoginSuccess', [self]);
resolve(self);
if (typeof self.getAttribute('onSuccess') === 'function') {
......@@ -277,7 +287,8 @@ define('controls/users/Login', [
),
onError : function (e) {
self.Loader.hide();
self.fireEvent('authNext', [this]);
self.fireEvent('authNext', [self]);
QUI.fireEvent('quiqqerUserAuthNext', [self]);
reject(e);
}
......
......@@ -4,10 +4,7 @@
* @author www.pcsg.de (Henning Leutz)
* @module controls/users/LogoutWindow
*
* @require qui/QUI
* @require qui/controls/windows/Confirm
* @require controls/users/Login
* @require Locale
* @event onQuiqqerUserAuthLogout
*/
define('controls/users/LogoutWindow', [
......@@ -64,6 +61,8 @@ define('controls/users/LogoutWindow', [
this.Loader.show();
Ajax.post('ajax_users_logout', function () {
QUI.fireEvent('quiqqerUserAuthLogout');
if (window.location.hash !== '') {
window.location.reload();
return;
......
......@@ -64,6 +64,7 @@
"quiqqer\/fontawesome": "*",
"quiqqer\/backendsearch": "1.*|dev-master|dev-dev",
"quiqqer\/requirements": "2.*",
"quiqqer\/demodata":"^1.0|dev-master|dev-dev",
"npm-asset\/intl": "1.*",
"npm-asset\/nouislider": "*",
"npm-asset\/mustache": "2.*",
......
......@@ -71,19 +71,15 @@ HEAD;
$geoIPSettings = <<<GEO
### SET GEOIP Variables ###
#fastcgi_param GEOIP_COUNTRY_CODE \$geoip_country_code;
#fastcgi_param GEOIP_COUNTRY_CODE3 \$geoip_country_code3;
#fastcgi_param GEOIP_COUNTRY_NAME \$geoip_country_name;
#fastcgi_param GEOIP_CITY_COUNTRY_CODE \$geoip_city_country_code;
#fastcgi_param GEOIP_CITY_COUNTRY_CODE3 \$geoip_city_country_code3;
#fastcgi_param GEOIP_CITY_COUNTRY_NAME \$geoip_city_country_name;
#fastcgi_param GEOIP_REGION \$geoip_region;
#fastcgi_param GEOIP_CITY \$geoip_city;
#fastcgi_param GEOIP_POSTAL_CODE \$geoip_postal_code;
#fastcgi_param GEOIP_CITY_CONTINENT_CODE \$geoip_city_continent_code;
#fastcgi_param GEOIP_LATITUDE \$geoip_latitude;
#fastcgi_param GEOIP_LONGITUDE \$geoip_longitude;
#fastcgi_param GEOIP_COUNTRY_CODE \$geoip2_data_country_code;
#fastcgi_param GEOIP_COUNTRY_NAME \$geoip2_data_country_name;
#fastcgi_param GEOIP_CITY_COUNTRY_CODE \$geoip2_data_city_country_code;
#fastcgi_param GEOIP_CITY_COUNTRY_NAME \$geoip2_data_city_country_name;
#fastcgi_param GEOIP_CITY \$geoip2_data_city_name;
#fastcgi_param GEOIP_POSTAL_CODE \$geoip2_data_postal_code;
#fastcgi_param GEOIP_CITY_CONTINENT_CODE \$geoip2_data_continent_code;
#fastcgi_param GEOIP_LATITUDE \$geoip2_data_location_longitude;
#fastcgi_param GEOIP_LONGITUDE \$geoip2_data_postal_code;
GEO;
file_put_contents($this->subConfDir."php.include", $geoIPSettings, FILE_APPEND);
......
......@@ -7,6 +7,7 @@
namespace QUI\Utils;
use QUI;
use QUI\Demodata\Parser\DemoDataParser;
/**
* Class Project
......@@ -52,7 +53,6 @@ class Project
$First->save();
}
// Search
$searchType = 'quiqqer/sitetypes:types/search';
......@@ -62,17 +62,17 @@ class Project
} catch (QUI\Exception $Exception) {
}
$search = $Project->getSitesIds(array(
'where' => array(
$search = $Project->getSitesIds([
'where' => [
'active' => -1,
'type' => $searchType
),
],
'limit' => 1
));
]);
if (empty($search)) {
try {
$searchId = $First->createChild(array(
$searchId = $First->createChild([