9 use Symfony\Component\HttpFoundation\Response;
11 define(
"TITLE_AJAX_TAGS", _(
"List Tags"));
17 $this->Name =
"tag_get";
18 $this->Title = TITLE_AJAX_TAGS;
20 $this->OutputType =
'Text';
22 parent::__construct();
34 $uploadtreeRec =
GetSingleRec(
"uploadtree",
"where uploadtree_pk='$item'");
35 $uploadRec =
GetSingleRec(
"upload",
"where upload_pk='$uploadtreeRec[upload_fk]'");
36 if (empty($uploadRec[
'uploadtree_tablename'])) {
37 $uploadtree_tablename =
"uploadtree";
39 $uploadtree_tablename = $uploadRec[
'uploadtree_tablename'];
42 $List =
GetAllTags($item,
true, $uploadtree_tablename);
43 foreach ($List as $L) {
44 $V .= $L[
'tag_name'] .
",";
47 return new Response($V, Response::HTTP_OK,array(
'content-type'=>
'text/plain'));
52 $NewPlugin->Initialize();
This is the Plugin class. All plugins should:
GetSingleRec($Table, $Where="")
Retrieve a single database record.
GetParm($parameterName, $parameterType)
This function will retrieve the variables and check data types.
#define PLUGIN_DB_READ
Plugin requires read permission on DB.