Advertisement
Guest User

Untitled

a guest
Jan 9th, 2021
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.86 KB | None | 0 0
  1.     public function createDefault() {
  2.         /** Пересоздание файла конфигурации. */
  3.         $this->clear();
  4.         /** Установка значений конфигурации. */
  5.         $this->set('image.manager.driver', 'gd');
  6.         $this->set('php.memory_limit', '120M');
  7.         $this->set('php.max_execution_time', '10');
  8.         $this->set('premoderation.on', 0);
  9.         $this->set('premoderation.threads.on', 0);
  10.         $this->set('premoderation.links.on', 0);
  11.         $this->set('premoderation.links.regexp', 0);
  12.         $this->set('premoderation.words.on', 0);
  13.         $this->set('premoderation.words.rule', '');
  14.         $this->set('premoderation.images.on', 0);
  15.         $this->set('premoderation.images.allow.iqdb', 0);
  16.         $this->set('premoderation.images.iqdb.tags.wrong', '');
  17.         $this->set('premoderation.images.allow.saucenao', 0);
  18.         $this->set('premoderation.ip.interval.on', 0);
  19.         $this->set('premoderation.ip.interval.minutes', 1);
  20.         $this->set('premoderation.ip.interval.count', 5);
  21.         $this->set('premoderation.ip.interval.more_minutes', 10);
  22.         $this->set('premoderation.ip.interval.more_count', 50);
  23.         $this->set('premoderation.ip.interval_threads.on', 0);
  24.         $this->set('premoderation.ip.interval_threads.minutes', 1);
  25.         $this->set('premoderation.ip.interval_threads.count', 5);
  26.         $this->set('premoderation.ip.interval_threads.more_minutes', 10);
  27.         $this->set('premoderation.ip.interval_threads.more_count', 50);
  28.         $this->set('function.csrf', true);
  29.         $this->set('setup.complete', false);
  30.         $this->set('function.database.drop', true);
  31.         $this->set('function.database.execute', true);
  32.         $this->set('function.upload.drop', true);
  33.         $this->set('function.cache.clear', true);
  34.         $this->set('function.setup.password.create', true);
  35.         $this->set('function.logs.delete', true);
  36.         $this->set('upload.mime_content_type.check', true);
  37.         $this->set('upload.rar.check', false);
  38.         $this->set('upload.zip.check', false);
  39.         $this->set('upload.sevenzip.check', false);
  40.         $this->set('function.upload.dir.calculate', true);
  41.         $this->set('upload.dir.calculate.type', 'database');
  42.         $this->set('upload.dir.size.max', '20GB');
  43.         $this->set('captcha.gregwar', false);
  44.         $this->set('verified_posts_for_upload', 0);
  45.         $this->set('captcha.interval.hour', 0);
  46.         $this->set('captcha.interval.minutes', 10);
  47.         $this->set('captcha.interval_on', true);
  48.         $this->set('section.image.preview.width', 350);
  49.         $this->set('section.image.preview.height', 350);
  50.         $this->set('section.image.preview.size.min', '100KB');
  51.         $this->set('section.files.max', 100);
  52.         $this->set('section.file.size.max', '10MB');
  53.         $this->set('section.files.size.max', '10MB');
  54.         $this->set('section.name.default', 'Анонимус');
  55.         $this->set('section.sage', 1);
  56.         $this->set('section.message.lenght.min', 0);
  57.         $this->set('section.message.lenght.max', 65535);
  58.         $this->set('section.only_images', 1);
  59.         $this->save();
  60.         return true;
  61.     }
  62.    
  63.     public function createDefaultIfNotExist() {
  64.         /** Установка значений конфигурации. */
  65.         $this->setIfNotExist('image.manager.driver', 'gd');
  66.         $this->setIfNotExist('php.memory_limit', '120M');
  67.         $this->setIfNotExist('php.max_execution_time', '10');
  68.         $this->setIfNotExist('premoderation.on', 0);
  69.         $this->setIfNotExist('premoderation.threads.on', 0);
  70.         $this->setIfNotExist('premoderation.links.on', 0);
  71.         $this->setIfNotExist('premoderation.links.regexp', 0);
  72.         $this->setIfNotExist('premoderation.words.on', 0);
  73.         $this->setIfNotExist('premoderation.words.rule', '');
  74.         $this->setIfNotExist('premoderation.images.on', 0);
  75.         $this->setIfNotExist('premoderation.images.allow.iqdb', 0);
  76.         $this->setIfNotExist('premoderation.images.iqdb.tags.wrong', '');
  77.         $this->setIfNotExist('premoderation.images.allow.saucenao', 0);
  78.         $this->setIfNotExist('premoderation.ip.interval.on', 0);
  79.         $this->setIfNotExist('premoderation.ip.interval.minutes', 1);
  80.         $this->setIfNotExist('premoderation.ip.interval.count', 5);
  81.         $this->setIfNotExist('premoderation.ip.interval.more_minutes', 10);
  82.         $this->setIfNotExist('premoderation.ip.interval.more_count', 50);
  83.         $this->setIfNotExist('premoderation.ip.interval_threads.on', 0);
  84.         $this->setIfNotExist('premoderation.ip.interval_threads.minutes', 1);
  85.         $this->setIfNotExist('premoderation.ip.interval_threads.count', 5);
  86.         $this->setIfNotExist('premoderation.ip.interval_threads.more_minutes', 10);
  87.         $this->setIfNotExist('premoderation.ip.interval_threads.more_count', 50);
  88.         $this->setIfNotExist('function.csrf', true);
  89.         $this->setIfNotExist('setIfNotExistup.complete', false); /** Лол! */
  90.         $this->setIfNotExist('function.database.drop', true);
  91.         $this->setIfNotExist('function.database.execute', true);
  92.         $this->setIfNotExist('function.upload.drop', true);
  93.         $this->setIfNotExist('function.cache.clear', true);
  94.         $this->setIfNotExist('function.setIfNotExistup.password.create', true);
  95.         $this->setIfNotExist('function.logs.delete', true);
  96.         $this->setIfNotExist('upload.mime_content_type.check', true);
  97.         $this->setIfNotExist('upload.rar.check', false);
  98.         $this->setIfNotExist('upload.zip.check', false);
  99.         $this->setIfNotExist('upload.sevenzip.check', false);
  100.         $this->setIfNotExist('function.upload.dir.calculate', true);
  101.         $this->setIfNotExist('upload.dir.calculate.type', 'database');
  102.         $this->setIfNotExist('upload.dir.size.max', '20GB');
  103.         $this->setIfNotExist('captcha.gregwar', false);
  104.         $this->setIfNotExist('verified_posts_for_upload', 0);
  105.         $this->setIfNotExist('captcha.interval.hour', 0);
  106.         $this->setIfNotExist('captcha.interval.minutes', 10);
  107.         $this->setIfNotExist('captcha.interval_on', true);
  108.         $this->setIfNotExist('section.image.preview.width', 350);
  109.         $this->setIfNotExist('section.image.preview.height', 350);
  110.         $this->setIfNotExist('section.image.preview.size.min', '100KB');
  111.         $this->setIfNotExist('section.files.max', 100);
  112.         $this->setIfNotExist('section.file.size.max', '10MB');
  113.         $this->setIfNotExist('section.files.size.max', '10MB');
  114.         $this->setIfNotExist('section.name.default', 'Анонимус');
  115.         $this->setIfNotExist('section.sage', 1);
  116.         $this->setIfNotExist('section.message.lenght.min', 0);
  117.         $this->setIfNotExist('section.message.lenght.max', 65535);
  118.         $this->setIfNotExist('section.only_images', 1);
  119.         $this->save();
  120.         return true;
  121.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement