diff --git a/create.php b/create.php index eb09d2a..28f8b00 100644 --- a/create.php +++ b/create.php @@ -29,8 +29,7 @@ if (empty($_POST)) { createCloud($token, $text, $size, $duration) && $cpt < 10) { $token = bin2hex(random_bytes($length)); $cpt++; + // TODO what to do if no cloud created? } $viewUrl = 'result.php?id=' . $token; $viewName = 'https://' . $_SERVER['HTTP_HOST'] . '/' . $viewUrl; diff --git a/db.php b/db.php index 52ea468..12f72f7 100644 --- a/db.php +++ b/db.php @@ -12,6 +12,7 @@ class DataBase 'month' => '+1 month' ); const DEFAULT_SIZE = 3; + const CLOUD_CODE_LENGTH = 6; private $db; private $cloud;