You are here

function smileys_import_packs in Smileys 5

Same name and namespace in other branches
  1. 6 smileys_import.module \smileys_import_packs()

Custom callback; Scan for available packs.

3 calls to smileys_import_packs()
smileys_export_page in ./smileys_import.module
Menu callback; Present a page for .pak file for a Smiley pack.
smileys_import_add in ./smileys_import.module
Menu callback; Add a Smiley pack.
smileys_import_page in ./smileys_import.module
Menu callback; Present the page for operations on Smiley packs.

File

./smileys_import.module, line 128

Code

function smileys_import_packs($a = NULL) {
  $packs = file_scan_directory(drupal_get_path('module', 'smileys') . '/packs', '\\.pak$');
  ksort($packs);
  $pack_names = array();
  if ($a) {
    $packd = NULL;
    foreach ($packs as $pack) {
      if ($pack->name == $a) {
        $packd = $pack;
      }
    }
    return $packd;
  }
  return $packs;
}