Skip to content

Commit

Permalink
Some minor changes in the link design: #133
Browse files Browse the repository at this point in the history
  • Loading branch information
khalidsaadat committed Apr 1, 2022
1 parent f8102aa commit ef74a4e
Show file tree
Hide file tree
Showing 3 changed files with 420 additions and 3 deletions.
8 changes: 6 additions & 2 deletions app/controllers/BabyRegistryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ private function crypto_rand_secure($min, $max) {
return $min + $rnd;
}

private function getToken($length=12){
private function get_token($length=12){
$token = "";
$codeAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$codeAlphabet.= "0123456789";
Expand All @@ -33,7 +33,7 @@ public function generate() {
// check the baby registry token; if the baby reg id exists, return the existing token; otherwise, create a new one and return that
$baby_reg_token = $this->model('BabyRegistryToken')->findByBabyRegistryId($baby_reg_id);
if($baby_reg_token == false) {
$new_token = $this->getToken(37);
$new_token = $this->get_token(37);

// make a new baby reg token
$baby_reg_token = $this->model('BabyRegistryToken');
Expand Down Expand Up @@ -67,6 +67,10 @@ public function add() {
$this->view('BASE_STRUCTURES/empty_view');
}

public function add_products($token) {

}



}
2 changes: 1 addition & 1 deletion app/controllers/ShopController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class ShopController extends Controller{
private function redirect_to($destination) {
if (headers_sent($filename, $line)) {
trigger_error("Headers already sent in {$filename} on line {$line}", E_USER_ERROR);
}
}
header("Location: {$destination}");
exit;
}
Expand Down
Loading

0 comments on commit ef74a4e

Please sign in to comment.