Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function createDefault() {
- /** Пересоздание файла конфигурации. */
- $this->clear();
- /** Установка значений конфигурации. */
- $this->set('image.manager.driver', 'gd');
- $this->set('php.memory_limit', '120M');
- $this->set('php.max_execution_time', '10');
- $this->set('premoderation.on', 0);
- $this->set('premoderation.threads.on', 0);
- $this->set('premoderation.links.on', 0);
- $this->set('premoderation.links.regexp', 0);
- $this->set('premoderation.words.on', 0);
- $this->set('premoderation.words.rule', '');
- $this->set('premoderation.images.on', 0);
- $this->set('premoderation.images.allow.iqdb', 0);
- $this->set('premoderation.images.iqdb.tags.wrong', '');
- $this->set('premoderation.images.allow.saucenao', 0);
- $this->set('premoderation.ip.interval.on', 0);
- $this->set('premoderation.ip.interval.minutes', 1);
- $this->set('premoderation.ip.interval.count', 5);
- $this->set('premoderation.ip.interval.more_minutes', 10);
- $this->set('premoderation.ip.interval.more_count', 50);
- $this->set('premoderation.ip.interval_threads.on', 0);
- $this->set('premoderation.ip.interval_threads.minutes', 1);
- $this->set('premoderation.ip.interval_threads.count', 5);
- $this->set('premoderation.ip.interval_threads.more_minutes', 10);
- $this->set('premoderation.ip.interval_threads.more_count', 50);
- $this->set('function.csrf', true);
- $this->set('setup.complete', false);
- $this->set('function.database.drop', true);
- $this->set('function.database.execute', true);
- $this->set('function.upload.drop', true);
- $this->set('function.cache.clear', true);
- $this->set('function.setup.password.create', true);
- $this->set('function.logs.delete', true);
- $this->set('upload.mime_content_type.check', true);
- $this->set('upload.rar.check', false);
- $this->set('upload.zip.check', false);
- $this->set('upload.sevenzip.check', false);
- $this->set('function.upload.dir.calculate', true);
- $this->set('upload.dir.calculate.type', 'database');
- $this->set('upload.dir.size.max', '20GB');
- $this->set('captcha.gregwar', false);
- $this->set('verified_posts_for_upload', 0);
- $this->set('captcha.interval.hour', 0);
- $this->set('captcha.interval.minutes', 10);
- $this->set('captcha.interval_on', true);
- $this->set('section.image.preview.width', 350);
- $this->set('section.image.preview.height', 350);
- $this->set('section.image.preview.size.min', '100KB');
- $this->set('section.files.max', 100);
- $this->set('section.file.size.max', '10MB');
- $this->set('section.files.size.max', '10MB');
- $this->set('section.name.default', 'Анонимус');
- $this->set('section.sage', 1);
- $this->set('section.message.lenght.min', 0);
- $this->set('section.message.lenght.max', 65535);
- $this->set('section.only_images', 1);
- $this->save();
- return true;
- }
- public function createDefaultIfNotExist() {
- /** Установка значений конфигурации. */
- $this->setIfNotExist('image.manager.driver', 'gd');
- $this->setIfNotExist('php.memory_limit', '120M');
- $this->setIfNotExist('php.max_execution_time', '10');
- $this->setIfNotExist('premoderation.on', 0);
- $this->setIfNotExist('premoderation.threads.on', 0);
- $this->setIfNotExist('premoderation.links.on', 0);
- $this->setIfNotExist('premoderation.links.regexp', 0);
- $this->setIfNotExist('premoderation.words.on', 0);
- $this->setIfNotExist('premoderation.words.rule', '');
- $this->setIfNotExist('premoderation.images.on', 0);
- $this->setIfNotExist('premoderation.images.allow.iqdb', 0);
- $this->setIfNotExist('premoderation.images.iqdb.tags.wrong', '');
- $this->setIfNotExist('premoderation.images.allow.saucenao', 0);
- $this->setIfNotExist('premoderation.ip.interval.on', 0);
- $this->setIfNotExist('premoderation.ip.interval.minutes', 1);
- $this->setIfNotExist('premoderation.ip.interval.count', 5);
- $this->setIfNotExist('premoderation.ip.interval.more_minutes', 10);
- $this->setIfNotExist('premoderation.ip.interval.more_count', 50);
- $this->setIfNotExist('premoderation.ip.interval_threads.on', 0);
- $this->setIfNotExist('premoderation.ip.interval_threads.minutes', 1);
- $this->setIfNotExist('premoderation.ip.interval_threads.count', 5);
- $this->setIfNotExist('premoderation.ip.interval_threads.more_minutes', 10);
- $this->setIfNotExist('premoderation.ip.interval_threads.more_count', 50);
- $this->setIfNotExist('function.csrf', true);
- $this->setIfNotExist('setIfNotExistup.complete', false); /** Лол! */
- $this->setIfNotExist('function.database.drop', true);
- $this->setIfNotExist('function.database.execute', true);
- $this->setIfNotExist('function.upload.drop', true);
- $this->setIfNotExist('function.cache.clear', true);
- $this->setIfNotExist('function.setIfNotExistup.password.create', true);
- $this->setIfNotExist('function.logs.delete', true);
- $this->setIfNotExist('upload.mime_content_type.check', true);
- $this->setIfNotExist('upload.rar.check', false);
- $this->setIfNotExist('upload.zip.check', false);
- $this->setIfNotExist('upload.sevenzip.check', false);
- $this->setIfNotExist('function.upload.dir.calculate', true);
- $this->setIfNotExist('upload.dir.calculate.type', 'database');
- $this->setIfNotExist('upload.dir.size.max', '20GB');
- $this->setIfNotExist('captcha.gregwar', false);
- $this->setIfNotExist('verified_posts_for_upload', 0);
- $this->setIfNotExist('captcha.interval.hour', 0);
- $this->setIfNotExist('captcha.interval.minutes', 10);
- $this->setIfNotExist('captcha.interval_on', true);
- $this->setIfNotExist('section.image.preview.width', 350);
- $this->setIfNotExist('section.image.preview.height', 350);
- $this->setIfNotExist('section.image.preview.size.min', '100KB');
- $this->setIfNotExist('section.files.max', 100);
- $this->setIfNotExist('section.file.size.max', '10MB');
- $this->setIfNotExist('section.files.size.max', '10MB');
- $this->setIfNotExist('section.name.default', 'Анонимус');
- $this->setIfNotExist('section.sage', 1);
- $this->setIfNotExist('section.message.lenght.min', 0);
- $this->setIfNotExist('section.message.lenght.max', 65535);
- $this->setIfNotExist('section.only_images', 1);
- $this->save();
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement