From 664166dab36882c02bc096ceb8dc57b6db4f5e8a Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@osticket.com>
Date: Sat, 30 Mar 2013 20:03:53 -0400
Subject: [PATCH] Load API directory including htaccess file. Aggressively
 package ALL files in include directory - excluding live config file or swap
 files.

---
 setup/cli/package.php | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/setup/cli/package.php b/setup/cli/package.php
index 489297882..67d20a32b 100755
--- a/setup/cli/package.php
+++ b/setup/cli/package.php
@@ -89,6 +89,9 @@ package("*.php", 'upload/');
 foreach (array('assets','css','images','js') as $dir)
     package("$dir/*", "upload/$dir", -1, "*less");
 
+# Load API
+package('api/{,.}*', 'upload/api');
+
 # Load the knowledgebase
 package("kb/*.php", "upload/kb");
 
@@ -102,9 +105,7 @@ mkdir("$stage_path/scripts/");
 package("setup/scripts/*", "scripts/", -1, "*stage");
 
 # Load the heart of the system
-package("include/*.php", "upload/include", -1, '*ost-config.php');
-# And the sql patches
-package("include/upgrader/*.sql", "upload/include/upgrader", -1);
+package("include/{,.}*", "upload/include", -1, array('*ost-config.php', '*.sw[a-z]'));
 
 # Include the installer
 package("setup/*.{php,txt}", "upload/setup", -1, array("*scripts","*test","*stage"));
-- 
GitLab