コード例 #1
0
ファイル: login.php プロジェクト: rajeshb001/itpl_loaded7
 public static function verifyProductsAreDownloaded($products)
 {
     $productsArr = explode('|', $products);
     $cnt = 0;
     foreach ($productsArr as $key => $product) {
         $parts = explode(':', $product);
         $type = $parts[0];
         $item = $parts[1];
         if ($type == 'template') {
             if (!file_exists(DIR_FS_ADMIN . 'includes/templates/' . $item . '.php')) {
                 // get the template phar and apply it
             }
         } else {
             // addon
             if (!file_exists(DIR_FS_CATALOG . 'addons/' . $item . '/controller.php')) {
                 // download the addon phar
                 lC_Store_Admin::getAddonPhar($item);
                 // apply the phar package
                 if (file_exists(DIR_FS_WORK . 'addons/' . $item . '.phar')) {
                     lC_Updates_Admin::applyPackage(DIR_FS_WORK . 'addons/' . $item . '.phar');
                 }
             }
         }
         $cnt++;
     }
 }