From 6c391ad8bada86e81eb7e7efaf8a1a8a9b8eab2a Mon Sep 17 00:00:00 2001 From: Steven Mondji-Lerider Date: Fri, 19 Apr 2013 12:24:00 +0000 Subject: [PATCH] mockup of generic a action class --- .gitattributes | 1 + bureau/class/m_action.php | 98 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 bureau/class/m_action.php diff --git a/.gitattributes b/.gitattributes index 956af643..b6f1d6c5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -350,6 +350,7 @@ bureau/class/db_mysql.php -text bureau/class/functions.php -text bureau/class/lang_env.php -text bureau/class/local.php -text +bureau/class/m_action.php -text bureau/class/m_admin.php -text bureau/class/m_authip.php -text bureau/class/m_bro.php -text diff --git a/bureau/class/m_action.php b/bureau/class/m_action.php new file mode 100644 index 00000000..ee568586 --- /dev/null +++ b/bureau/class/m_action.php @@ -0,0 +1,98 @@ +set('create_file', array('file'=>$file, 'user'=>$user)); + } + /* + * function to set the cration of a file + */ + function create_dir($dir,$user="root") { + return $this->set('create_dir', array('dir'=>$dir,'user'=$user)); + } + /* + * function to delete file / folder + */ + function del($dir) { + return $this->set('delete', array('dir'=>$dir,'user'=$user)); + } + /* + * function returning the first not locked line of the action table + */ + function move($src,$dest) { + return $this->set('move', array('src'=>$src, 'dst'=>$dst,'user'=$user)); + } + /* + * function archiving a directory ( upon account deletion ) + */ + function archive($dir) { + return $this->set('archive', array('dir'=>$dir,'user'=$user)); + } + /* + *function inserting the action in the sql table + */ + function set($type,$parameters) { + global $db; + } + /* + * function returning the first not locked line of the action table + */ + function get_action() { + global $db; + return true; + } + /* + * function locking an entry while it is being executed by the action script + */ + function begin($id) { + global $db; + return true; + } + /* + * function locking an entry while it is being executed by the action script + */ + function finish($id) { + global $db; + return true; + } + /* + * function locking an entry while it is being executed by the action script + */ + function cancel($id) { + global $db; + return true; + } + +} /* Class action */ + +?>