44 # 1. process parameter(s) and sanity check. 46 # 3. If folder doesn't exist, create it. 47 # is it possible to make this recursive and do subfolders as well? 48 # 4. After all needed folders are created, 49 # things are a bit fuzzy below.... 50 # 5. create upload record. 52 # 7. schedule nomos... 59 require_once(
"FIXMETOBERELATIVE/pathinclude.php");
61 require_once(
"$PHPDIR/webcommon.h.php");
62 require_once(
"$PHPDIR/jobs.h.php");
63 require_once(
"$PHPDIR/db_postgres.h.php");
66 #$_pg_conn = pg_connect(str_replace(";", " ", 67 # file_get_contents("{$SYSCONFDIR}/{$PROJECT}/Db.conf"))); 69 $path =
"{$SYSCONFDIR}/$PROJECT}/Db.conf";
70 $alpha_buckets = array(
'a-c',
82 echo
"ERROR: could not connect to DB\n";
97 $sql =
'select users.root_folder_fk from users';
100 $pfolder4user = db_query1($sql);
103 $f_pk = createfolder($pfolder4user,
'Freshmeat',
104 "Top folder for FM Archives");
107 "select folder_pk, folder_name from folder where folder_name='Freshmeat'";
108 $fm_pk = db_query1($sql_fm);
112 for ($num=0; $num < count($alpha_buckets); $num++){
113 #echo "arraychunks: {$alpha_buckets[$num]}\n"; 115 $folder_pk = createfolder(
116 $fm_pk,
"{$alpha_buckets[$num]}",
"Holds Freshmeat archives");
118 $fold_cont_pk = createfoldercontents($fm_pk, $folder_pk, 1);