Forráskód Böngészése

Convert slug hyphens to underscores for customer logo

Alan Lam 7 éve
szülő
commit
1516cfd4ca
1 módosított fájl, 1 hozzáadás és 0 törlés
  1. 1 0
      controllers/reports.php

+ 1 - 0
controllers/reports.php

@@ -11,6 +11,7 @@ $customer = Customer::getForAdmin();
 if(!$customer) throw new Exception("You do not have permission to access this page.");
 
 $customer_slug = Util::slug($customer->name);
+$customer_slug = str_replace("-", "_", $customer_slug);
 $logo_file_path = ROOT_DIR . "/public/img/customer_logos/{$customer_slug}_logo.png";
 $has_logo = file_exists($logo_file_path);