Преглед изворни кода

Convert slug hyphens to underscores for customer logo

Alan Lam пре 7 година
родитељ
комит
1516cfd4ca
1 измењених фајлова са 1 додато и 0 уклоњено
  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);