diff --git a/create.php b/create.php index f01a97cb..6a91ba00 100644 --- a/create.php +++ b/create.php @@ -1,15 +1,17 @@ getPublisherHTML(); +$publisher_html = ($config["use_ayah"] ? "Game" . $ayah->getPublisherHTML() . "" : ""); $password = base64_encode(openssl_random_pseudo_bytes(9)); $body = <<Subtitle (must be < 200 chars) Username (must contain only alphanumeric, periods and underscores) Password (write this down) -Game{$publisher_html} +{$publisher_html} @@ -38,7 +40,9 @@ $title = $_POST['title']; $subtitle = $_POST['subtitle']; $username = $_POST['username']; $password = $_POST['password']; -$score = $ayah->scoreResult(); +if ($config["use_ayah"]) { + $score = $ayah->scoreResult(); +} if (!preg_match('/^[a-z0-9]{1,10}$/', $uri)) error('Invalid URI'); @@ -48,7 +52,7 @@ if (!(strlen($subtitle) < 200)) error('Invalid subtitle'); if (!preg_match('/^[a-zA-Z0-9._]{1,30}$/', $username)) error('Invalid username'); -if (!$score) +if ($config["use_ayah"] && !$score) error('You failed the game'); foreach (listBoards() as $i => $board) { if ($board['uri'] == $uri) diff --git a/inc/config.php b/inc/config.php index e5216470..855a0be1 100644 --- a/inc/config.php +++ b/inc/config.php @@ -1616,3 +1616,7 @@ ''. ''. ''; + + // Set to true to use ayah. Requires to set inc/lib/ayah/ayah_config.php! + // Ayah is highly reccommended (it's also used only for creating boards) + $config["use_ayah"] = false; \ No newline at end of file