From f795cf44d246b04c6235778e71015fc36f15084d Mon Sep 17 00:00:00 2001 From: Quitta Date: Thu, 5 Sep 2013 02:31:29 +0200 Subject: [PATCH] Creating tickets, browsing the profile, replying on tickets and forwarding them is possible! --- .../ryzommanage/autoload/webusers.php | 33 ++- .../ryzommanage/func/create_ticket.php | 52 +++++ .../ryzommanage/func/reply_on_ticket.php | 54 +++++ .../ryzommanage/inc/createticket.php | 46 +++++ .../ryzommanage/inc/show_ticket.php | 84 ++++++++ .../ryzommanage/inc/show_user.php | 44 ++++ .../ryzommanage/ryzommanage.module | 75 ++++++- .../ryzommanage/templates/createticket.tpl | 38 ++++ .../ryzommanage/templates/dashboard.tpl | 8 +- .../ryzommanage/templates/show_ticket.tpl | 188 ++++++++++++++++++ .../ryzommanage/templates/show_user.tpl | 149 +++++--------- .../drupal_module/ryzommanage/todo.txt | 3 +- 12 files changed, 651 insertions(+), 123 deletions(-) create mode 100644 code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/func/create_ticket.php create mode 100644 code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/func/reply_on_ticket.php create mode 100644 code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/inc/createticket.php create mode 100644 code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/inc/show_ticket.php create mode 100644 code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/inc/show_user.php create mode 100644 code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/templates/createticket.tpl create mode 100644 code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/templates/show_ticket.tpl diff --git a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/autoload/webusers.php b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/autoload/webusers.php index 158eb3b29..2beb75c1b 100644 --- a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/autoload/webusers.php +++ b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/autoload/webusers.php @@ -17,15 +17,15 @@ class WebUsers extends Users{ } public function set($values){ - $this->uId = $values['UId']; - $this->login = $values['Login']; - $this->email = $values['Email']; - $this->firstname = $values['FirstName']; - $this->lastname = $values['LastName']; - $this->gender = $values['Gender']; - $this->country = $values['Country']; - $this->receiveMail = $values['ReceiveMail']; - $this->language = $values['Language']; + $this->uId = $values['uid']; + $this->login = $values['name']; + $this->email = $values['mail']; + //$this->firstname = $values['FirstName']; + //$this->lastname = $values['LastName']; + //$this->gender = $values['Gender']; + //$this->country = $values['Country']; + //$this->receiveMail = $values['ReceiveMail']; + //$this->language = $values['Language']; } /** @@ -72,8 +72,8 @@ class WebUsers extends Users{ //returns te id for a given username public static function getId($username){ - $row = db_query("SELECT * FROM {users} WHERE name = :name", array(':name' => $username))->fetchField(); - return $row['UId']; + $row = db_query("SELECT * FROM {users} WHERE name = :name", array(':name' => $username))->fetchAssoc(); + return $row['uid']; } //returns te id for a given username @@ -93,20 +93,17 @@ class WebUsers extends Users{ } public function getUsername(){ - $dbw = new DBLayer("web"); + if(! isset($this->login) || $this->login == ""){ - $statement = $dbw->execute("SELECT * FROM ams_user WHERE UId=:id", array('id' => $this->uId)); - $row = $statement->fetch(); - $this->set($row); + $row = db_query("SELECT * FROM {users} WHERE uid = :id", array(':id' => $this->uId))->fetchAssoc(); + $this->set($row); } return $this->login; } public function getEmail(){ - $dbw = new DBLayer("web"); if(! isset($this->email) || $this->email == ""){ - $statement = $dbw->execute("SELECT * FROM ams_user WHERE UId=:id", array('id' => $this->uId)); - $row = $statement->fetch(); + $row = db_query("SELECT * FROM {users} WHERE uid = :id", array(':id' => $this->uId))->fetchAssoc(); $this->set($row); } return $this->email; diff --git a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/func/create_ticket.php b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/func/create_ticket.php new file mode 100644 index 000000000..764bd6931 --- /dev/null +++ b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/func/create_ticket.php @@ -0,0 +1,52 @@ +getTUserId(); + }else{ + $author= Ticket_User::constr_ExternId($_POST['target_id'])->getTUserId(); + } + $ticket_id = Ticket::create_Ticket($title, $content, $category, $author, unserialize($_SESSION['ticket_user'])->getTUserId(),0, $_POST); + header("Location: index.php?page=show_ticket&id=".$ticket_id); + exit; + + }catch (PDOException $e) { + //ERROR: LIB DB is not online! + print_r($e); + exit; + header("Location: index.php"); + exit; + } + + }else{ + //ERROR: permission denied! + $_SESSION['error_code'] = "403"; + header("Location: index.php?page=error"); + exit; + } + + }else{ + //ERROR: The form was not filled in correclty + header("Location: index.php?page=create_ticket"); + exit; + } + }else{ + //ERROR: user is not logged in + header("Location: index.php"); + exit; + } + +} + diff --git a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/func/reply_on_ticket.php b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/func/reply_on_ticket.php new file mode 100644 index 000000000..36fa3abeb --- /dev/null +++ b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/func/reply_on_ticket.php @@ -0,0 +1,54 @@ +load_With_TId($ticket_id); + + if(($target_ticket->getAuthor() == unserialize($_SESSION['ticket_user'])->getTUserId()) || Ticket_User::isMod(unserialize($_SESSION['ticket_user'])) ){ + + try{ + $author = unserialize($_SESSION['ticket_user'])->getTUserId(); + if(isset($_POST['Content'])){ + $content = $_POST['Content']; + }else{ + $content=""; + } + $hidden = 0; + if(isset($_POST['hidden']) && Ticket_User::isMod(unserialize($_SESSION['ticket_user']))){ + $hidden = 1; + } + Ticket::createReply($content, $author, $ticket_id, $hidden); + + if(isset($_POST['ChangeStatus']) && isset($_POST['ChangePriority']) && Ticket_User::isMod(unserialize($_SESSION['ticket_user']))){ + $newStatus = filter_var($_POST['ChangeStatus'], FILTER_SANITIZE_NUMBER_INT); + $newPriority = filter_var($_POST['ChangePriority'], FILTER_SANITIZE_NUMBER_INT); + Ticket::updateTicketStatusAndPriority($ticket_id,$newStatus, $newPriority, $author); + } + header("Location: ams?page=show_ticket&id=".$ticket_id); + exit; + + }catch (PDOException $e) { + //ERROR: LIB DB is not online! + print_r($e); + //header("Location: index.php"); + exit; + } + + }else{ + //ERROR: No access! + $_SESSION['error_code'] = "403"; + header("Location: index.php?page=error"); + exit; + } + }else{ + //ERROR: not logged in! + header("Location: index.php"); + exit; + } + +} \ No newline at end of file diff --git a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/inc/createticket.php b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/inc/createticket.php new file mode 100644 index 000000000..49e2263cf --- /dev/null +++ b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/inc/createticket.php @@ -0,0 +1,46 @@ +getTUserId(); + $result['ticket_id'] = filter_var($_GET['id'], FILTER_SANITIZE_NUMBER_INT); + $target_ticket = new Ticket(); + $target_ticket->load_With_TId($result['ticket_id']); + + if(Ticket_User::isMod(unserialize($_SESSION['ticket_user'] ))){ + if(isset($_POST['action'])){ + switch($_POST['action']){ + case "forward": + $ticket_id = filter_var($_POST['ticket_id'], FILTER_SANITIZE_NUMBER_INT); + $group_id = filter_var($_POST['group'], FILTER_SANITIZE_NUMBER_INT); + $result['ACTION_RESULT'] = Ticket::forwardTicket($result['user_id'], $ticket_id, $group_id); + break; + case "assignTicket": + $ticket_id = filter_var($_POST['ticket_id'], FILTER_SANITIZE_NUMBER_INT); + $result['ACTION_RESULT'] = Ticket::assignTicket($result['user_id'] , $ticket_id); + break; + case "unAssignTicket": + $ticket_id = filter_var($_POST['ticket_id'], FILTER_SANITIZE_NUMBER_INT); + $result['ACTION_RESULT'] = Ticket::unAssignTicket($result['user_id'], $ticket_id); + break; + + } + } + } + + if(($target_ticket->getAuthor() == unserialize($_SESSION['ticket_user'])->getTUserId()) || Ticket_User::isMod(unserialize($_SESSION['ticket_user']) )){ + + $show_as_admin = false; + if(Ticket_User::isMod(unserialize($_SESSION['ticket_user']))){ + $show_as_admin = true; + } + + $entire_ticket = Ticket::getEntireTicket( $result['ticket_id'],$show_as_admin); + Ticket_Log::createLogEntry($result['ticket_id'],unserialize($_SESSION['ticket_user'])->getTUserId(), 3); + $result['ticket_tId'] = $entire_ticket['ticket_obj']->getTId(); + $result['ticket_forwardedGroupName'] = $entire_ticket['ticket_obj']->getForwardedGroupName(); + $result['ticket_forwardedGroupId'] = $entire_ticket['ticket_obj']->getForwardedGroupId(); + $result['ticket_title'] = $entire_ticket['ticket_obj']->getTitle(); + $result['ticket_timestamp'] = $entire_ticket['ticket_obj']->getTimestamp(); + $result['ticket_status'] = $entire_ticket['ticket_obj']->getStatus(); + $result['ticket_author'] = $entire_ticket['ticket_obj']->getAuthor(); + $result['ticket_prioritytext'] = $entire_ticket['ticket_obj']->getPriorityText(); + $result['ticket_priorities'] = Ticket::getPriorityArray(); + $result['ticket_priority'] = $entire_ticket['ticket_obj']->getPriority(); + $result['ticket_statustext'] = $entire_ticket['ticket_obj']->getStatusText(); + $result['ticket_lastupdate'] = Gui_Elements::time_elapsed_string(Ticket::getLatestReply($result['ticket_id'])->getTimestamp()); + $result['ticket_category'] = $entire_ticket['ticket_obj']->getCategoryName(); + $webUser = new WebUsers(Assigned::getUserAssignedToTicket($result['ticket_tId'])); + $result['ticket_assignedToText'] = $webUser->getUsername(); + $result['ticket_assignedTo'] = Assigned::getUserAssignedToTicket($result['ticket_tId']); + $result['ticket_replies'] = Gui_Elements::make_table($entire_ticket['reply_array'], Array("getTReplyId","getContent()->getContent","getTimestamp","getAuthor()->getExternId","getAuthor()->getPermission","getHidden"), Array("tReplyId","replyContent","timestamp","authorExtern","permission","hidden")); + $i = 0; + foreach( $result['ticket_replies'] as $reply){ + $webReplyUser = new WebUsers($reply['authorExtern']); + $result['ticket_replies'][$i]['author'] = $webReplyUser->getUsername(); + $i++; + } + if(Ticket_User::isMod(unserialize($_SESSION['ticket_user']))){ + $result['isMod'] = "TRUE"; + $result['statusList'] = Ticket::getStatusArray(); + $result['sGroups'] = Gui_Elements::make_table_with_key_is_id(Support_Group::getAllSupportGroups(), Array("getName"), "getSGroupId" ); + } + $result['hasInfo'] = $target_ticket->hasInfo(); + return $result; + + }else{ + //ERROR: No access! + $_SESSION['error_code'] = "403"; + header("Location: index.php?page=error"); + exit; + } + }else{ + //ERROR: not logged in! + header("Location: index.php"); + exit; + } +} \ No newline at end of file diff --git a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/inc/show_user.php b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/inc/show_user.php new file mode 100644 index 000000000..3a4b2acee --- /dev/null +++ b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/inc/show_user.php @@ -0,0 +1,44 @@ +getUsername(); + $result['mail'] = $webUser->getEmail(); + //$info = $webUser->getInfo(); + //$result['firstName'] = $info['FirstName']; + //$result['lastName'] = $info['LastName']; + //$result['country'] = $info['Country']; + //$result['gender'] = $info['Gender']; + + $ticket_user = Ticket_User::constr_ExternId($result['target_id']); + $result['userPermission'] = $ticket_user->getPermission(); + if(Ticket_User::isAdmin(unserialize($_SESSION['ticket_user']))){ + $result['isAdmin'] = "TRUE"; + } + $ticketlist = Ticket::getTicketsOf($ticket_user->getTUserId()); + + $result['ticketlist'] = Gui_Elements::make_table($ticketlist, Array("getTId","getTimestamp","getTitle","getStatus","getStatusText","getStatusText","getCategoryName"), Array("tId","timestamp","title","status","statustext","statusText","category")); + return $result; + + }else{ + //ERROR: No access! + $_SESSION['error_code'] = "403"; + header("Location: index.php?page=error"); + exit; + } + }else{ + //ERROR: not logged in! + header("Location: index.php"); + exit; + } +} \ No newline at end of file diff --git a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ryzommanage.module b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ryzommanage.module index e935828fd..dbba16531 100644 --- a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ryzommanage.module +++ b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ryzommanage.module @@ -248,6 +248,8 @@ function ryzommanage_block_view($delta = '') } + + function _ams_handler() { @@ -547,7 +549,20 @@ function top_bar() $userId = $user->uid; if (user_is_logged_in()) { // Logged in user - return "
Notepad | Mail | Wiki | Profile | Craft Recipe-Book | Occupations | News/Events | Account | Logout
"; + //check permission, if user + if(ticket_user::isMod(unserialize($_SESSION['ticket_user']))){ + return "
Profile | + Create Ticket | + Settings | Users | + Queues | + Support Groups | Logout
"; + + }else{ + return "
Profile | + Create Ticket | + Settings | Logout
"; + } + } else { return drupal_get_form('login_form'); // Not logged in @@ -1001,4 +1016,60 @@ function ryzommanage_help($path, $arg) { return '

' . t("A module that handles account registration and a ticketing service regarding ryzomcore.") . '

'; break; } -} \ No newline at end of file +} + +function ryzommanage_enable() { + // Check if our field is not already created. + if (!field_info_field('firstname')) { + $field = array( + 'field_name' => 'firstname', + 'type' => 'text', + ); + field_create_field($field); + + // Create the instance on the bundle. + $instance = array( + 'field_name' => 'firstname', + 'entity_type' => 'user', + 'label' => 'First Name', + 'bundle' => 'user', + // If you don't set the "required" property then the field wont be required by default. + 'required' => FALSE, + 'settings' => array( + // Here you inform either or not you want this field showing up on the registration form. + + ), + 'widget' => array( + 'type' => 'textfield', + 'weight' => '1', + ), + ); + field_create_instance($instance); + } + + if (!field_info_field('secondname')) { + $field = array( + 'field_name' => 'secondname', + 'type' => 'text', + ); + field_create_field($field); + + // Create the instance on the bundle. + $instance = array( + 'field_name' => 'secondname', + 'entity_type' => 'user', + 'label' => 'Second Name', + 'bundle' => 'user', + // If you don't set the "required" property then the field wont be required by default. + 'required' => FALSE, + 'settings' => array( + // Here you inform either or not you want this field showing up on the registration form. + ), + 'widget' => array( + 'type' => 'textfield', + 'weight' => '1', + ), + ); + field_create_instance($instance); + } +} \ No newline at end of file diff --git a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/templates/createticket.tpl b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/templates/createticket.tpl new file mode 100644 index 000000000..c1ca81e07 --- /dev/null +++ b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/templates/createticket.tpl @@ -0,0 +1,38 @@ +{block name=content} + +

Create a new Ticket

+
+ + + + + + + + + + + + + +
+ + +
+ + +
+ + +
+ + + +
+
+{/block} + diff --git a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/templates/dashboard.tpl b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/templates/dashboard.tpl index ea53b1665..83def588a 100644 --- a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/templates/dashboard.tpl +++ b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/templates/dashboard.tpl @@ -5,27 +5,27 @@ + href="ams?page=show_queue&get=create&userid={$user_id}&groupid=1&what=waiting_for_support&how=assigned&who=user">
Tickets Waiting for Direct Action: {$nrAssignedWaiting}
- +
Tickets Todo: {$nrToDo}
- +
Newest Ticket: {$newestTicketTitle}
- +
Total amount of Tickets: {$nrTotalTickets}
diff --git a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/templates/show_ticket.tpl b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/templates/show_ticket.tpl new file mode 100644 index 000000000..be00cfa92 --- /dev/null +++ b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/templates/show_ticket.tpl @@ -0,0 +1,188 @@ +{block name=content} +

Title: {$ticket_title} [ID#{$ticket_tId}]

+ + + + {if isset($isMod) and $isMod eq "TRUE"} + + + {/if} + {if isset($isMod) and $isMod eq "TRUE"}{/if} + + + {if $hasInfo}{/if} + + +
+ Ticket Assigning: + {if $ticket_assignedTo eq 0} +
+ + + +
+ {else if $ticket_assignedTo eq $user_id} +
+ + + +
+ {/if} +
+ Forward to Group: +
+ + + + +
+
Show Ticket LogSend Other TicketShow ticket Info
+ + + + {if isset($ACTION_RESULT) and $ACTION_RESULT eq "SUCCESS_ASSIGNED"} + +

{$success_assigned}

+
+ {else if isset($ACTION_RESULT) and $ACTION_RESULT eq "SUCCESS_UNASSIGNED"} + +

{$success_unassigned}

+
+ {else if isset($ACTION_RESULT) and $ACTION_RESULT eq "TICKET_NOT_EXISTING"} + +

{$ticket_not_existing}

+
+ {else if isset($ACTION_RESULT) and $ACTION_RESULT eq "ALREADY_ASSIGNED"} + +

{$ticket_already_assigned}

+
+ {else if isset($ACTION_RESULT) and $ACTION_RESULT eq "NOT_ASSIGNED"} + +

{$ticket_not_assigned}

+
+ {/if} + + {if isset($ACTION_RESULT) and $ACTION_RESULT eq "INVALID_SGROUP"} + +

{$invalid_sgroup}

+
+ {else if isset($ACTION_RESULT) and $ACTION_RESULT eq "TICKET_NOT_EXISTING"} + +

{$ticket_not_existing}

+
+ {else if isset($ACTION_RESULT) and $ACTION_RESULT eq "SUCCESS_FORWARDED"} + +

{$success_forwarded}

+
+ {/if} + +
+ + + + + + + + + + + + + + + + +
Original Submitted: {$ticket_timestamp}Last Updated: {$ticket_lastupdate}Status: {if $ticket_status neq 3}Open{/if} {$ticket_statustext}
Category: {$ticket_category}Priority: {$ticket_prioritytext}Support Group: + + {if $ticket_forwardedGroupName eq "0"} + {$public_sgroup} + {else} + {$ticket_forwardedGroupName} + {/if} + +
Assigned To: {if $ticket_assignedTo neq ""} {$ticket_assignedToText} {else} {$not_assigned} {/if}
+ + + + + {foreach from=$ticket_replies item=reply} + + + + {/foreach} + + {if $ticket_status eq 3} + + + + {/if} + + + + + + + + + + + +
+

+ {$reply.timestamp} + {if $reply.permission eq '1'} + {if isset($isMod) and $isMod eq "TRUE"} {$reply.author}{else} {$reply.author} {/if} + {else if $reply.permission gt '1'} + {if isset($isMod) and $isMod eq "TRUE"} {$reply.author}{else} {$reply.author} {/if} + {/if} +

+

{if $reply.hidden eq 1}{/if}{$reply.replyContent}{if $reply.hidden eq 1}{/if}

+
+

Ticket is closed.

+
+ + {if $ticket_status neq 3} + {$t_reply}: + + + {if isset($isMod) and $isMod eq "TRUE"} + + Hide reply for user. + {/if} + {/if} +
+ {if isset($isMod) and $isMod eq "TRUE"} +
+ + +
+
+ + +
+ {/if} +
+ + + + +
+ + + +{/block} + diff --git a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/templates/show_user.tpl b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/templates/show_user.tpl index 91bdc683f..3c441cb51 100644 --- a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/templates/show_user.tpl +++ b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/templates/show_user.tpl @@ -1,17 +1,8 @@ {block name=content} -
-
-
+

Profile of {$target_name}

-
- - -
-
-
-
- Info - + +
@@ -21,96 +12,60 @@ - {if $firstName neq ""} - - - - - {/if} - {if $lastName neq ""} - - - - - {/if} - {if $country neq ""} - - - - - {/if} - {if $gender neq 0} - - - {if $gender eq 1} - - {else if $gender eq 2} - - {/if} - - {/if} +
Email:
Role: - {if $userPermission eq 1}User{/if} - {if $userPermission eq 2}Moderator{/if} - {if $userPermission eq 3}Admin{/if} + {if $userPermission eq 1}User{/if} + {if $userPermission eq 2}Moderator{/if} + {if $userPermission eq 3}Admin{/if}
Firstname:{$firstName}
LastName:{$lastName}
Country:{$country}
Gender:
-
-
-
+ -
-
+

Actions

-
- - -
-
-
-
-
- -
-
-
+ Tickets - +
@@ -124,7 +79,7 @@ {foreach from=$ticketlist item=ticket} - + @@ -134,9 +89,7 @@
ID
{$ticket.tId}{$ticket.title}{$ticket.title} {$ticket.timestamp} {$ticket.category}
-
-
-
-
+ + {/block} diff --git a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/todo.txt b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/todo.txt index 539cf76cd..241f7c3f2 100644 --- a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/todo.txt +++ b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/todo.txt @@ -1,2 +1,3 @@ -Remove full path in autoload functions --Make Permission www dependend, so it can be implemented in drupal with hook_permission(); \ No newline at end of file +-Make Permission www dependend, so it can be implemented in drupal with hook_permission(); +-in helpers make_folders mkdir($value); should be drupal_mkdir(); \ No newline at end of file