From 40fb2947dcda59f525d649114287c0a04bc79484 Mon Sep 17 00:00:00 2001 From: Messerbill Date: Fri, 12 Jun 2015 00:39:44 +0200 Subject: [PATCH 01/24] changed path of lib/animate changed path of lib/lettering --- lib/animate | 2 +- lib/lettering | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/animate b/lib/animate index 1b177f2..6665446 160000 --- a/lib/animate +++ b/lib/animate @@ -1 +1 @@ -Subproject commit 1b177f228ddd1e43b4422995332956e19ad70afe +Subproject commit 666544655bf5365e4f77aec0fa0f497673f6e69a diff --git a/lib/lettering b/lib/lettering index c5336db..8a7a337 160000 --- a/lib/lettering +++ b/lib/lettering @@ -1 +1 @@ -Subproject commit c5336db4a661246ecc3d0d62d79be4d07493a296 +Subproject commit 8a7a3377e82231ecf09d40732c75e8bee032228e From c822f8de473dd3bf88fde20502ff2f635dbd8e0d Mon Sep 17 00:00:00 2001 From: Messerbill Date: Mon, 15 Jun 2015 15:54:58 +0200 Subject: [PATCH 02/24] added growl to submodule --- .gitmodules | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitmodules b/.gitmodules index 76eac3b..e29da0e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,6 +10,9 @@ [submodule "lib/tinymce"] path = lib/tinymce url = git@mojotrollz.eu:webcraft/lib_tinymce.git +[submodule "lib/bootstrap_growl"] + path = lib/bootstrap_growl + url = git@mojotrollz.eu:webcraft/lib_bootstrap-growl.git [submodule "lib/textillate"] path = lib/textillate url = git@mojotrollz.eu:webcraft/lib_textillate.git From 8c8c396aed00cb92fe5a65d3029fdd8b16c395ed Mon Sep 17 00:00:00 2001 From: rylon Date: Mon, 15 Jun 2015 16:27:42 +0200 Subject: [PATCH 03/24] cron2sqlite creates folders now --- cron/cron_log2sqlite.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cron/cron_log2sqlite.php b/cron/cron_log2sqlite.php index f963ea3..3ebd42f 100644 --- a/cron/cron_log2sqlite.php +++ b/cron/cron_log2sqlite.php @@ -9,6 +9,9 @@ class cron_log2sqlite extends \SYSTEM\CRON\cronjob{ if( $oldest['year'] >= $now_year && $oldest['month'] >= $now_month){ return cronstatus::CRON_STATUS_SUCCESFULLY;} + //create folder if required + if (!file_exists(\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CRON_LOG2SQLITE_PATH))) { + mkdir(\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CRON_LOG2SQLITE_PATH), 0777, true);} $filename = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CRON_LOG2SQLITE_PATH).$oldest['year'].'.'.$oldest['month'].'.db'; //extract whole month to file $con = new \SYSTEM\DB\Connection(new \SYSTEM\DB\DBInfoSQLite($filename)); From c4d0082a69c9ae500a449d16d131f80b757a7a37 Mon Sep 17 00:00:00 2001 From: rylon Date: Mon, 15 Jun 2015 22:26:34 +0200 Subject: [PATCH 04/24] git small fix to work with submodules --- git/GitRepo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/GitRepo.php b/git/GitRepo.php index 738a325..d0f6cfc 100644 --- a/git/GitRepo.php +++ b/git/GitRepo.php @@ -82,7 +82,7 @@ class GitRepo { $repo_path = $new_path; if (is_dir($repo_path)) { // Is this a work tree? - if (file_exists($repo_path."/.git") && is_dir($repo_path."/.git")) { + if (file_exists($repo_path."/.git") || is_dir($repo_path."/.git")) { $this->repo_path = $repo_path; $this->bare = false; // Is this a bare repo? From 8fafd737a4d92ea7a5d1c273e2f883c796678c92 Mon Sep 17 00:00:00 2001 From: rylon Date: Tue, 16 Jun 2015 04:09:00 +0200 Subject: [PATCH 05/24] calculated git versions of project & system, linked them hardcoded --- sai/modules/saimod_sys_git/saimod_sys_git.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sai/modules/saimod_sys_git/saimod_sys_git.php b/sai/modules/saimod_sys_git/saimod_sys_git.php index ba26ef6..ae8ced6 100644 --- a/sai/modules/saimod_sys_git/saimod_sys_git.php +++ b/sai/modules/saimod_sys_git/saimod_sys_git.php @@ -12,12 +12,14 @@ class saimod_sys_git extends \SYSTEM\SAI\SaiModule { $result = array('git_project' => '', 'git_system' => ''); try{ $repo = \SYSTEM\GIT\Git::open(\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH)); + $result['git_project'] = ''.$repo->run('rev-parse --short HEAD').''; } catch (\Exception $ex) { $result['git_project'] = $ex->getMessage(); } try{ $repo = \SYSTEM\GIT\Git::open(\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH).\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL)); + $result['git_system'] = ''.$repo->run('rev-parse --short HEAD').''; } catch (\Exception $ex) { $result['git_system'] = $ex->getMessage(); } From 344a2b7ab9e30bd79a3c5910f8586a2c2e03c030 Mon Sep 17 00:00:00 2001 From: rylon Date: Tue, 16 Jun 2015 04:26:36 +0200 Subject: [PATCH 06/24] saimod git included last it message --- sai/modules/saimod_sys_git/saimod_sys_git.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sai/modules/saimod_sys_git/saimod_sys_git.php b/sai/modules/saimod_sys_git/saimod_sys_git.php index ae8ced6..be1cb56 100644 --- a/sai/modules/saimod_sys_git/saimod_sys_git.php +++ b/sai/modules/saimod_sys_git/saimod_sys_git.php @@ -12,14 +12,18 @@ class saimod_sys_git extends \SYSTEM\SAI\SaiModule { $result = array('git_project' => '', 'git_system' => ''); try{ $repo = \SYSTEM\GIT\Git::open(\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH)); - $result['git_project'] = ''.$repo->run('rev-parse --short HEAD').''; + $result['git_project'] = ''.$repo->run('rev-parse --short HEAD').'
'; + $result['git_project'] .= $repo->run('log -1 --pretty=%B'); + } catch (\Exception $ex) { $result['git_project'] = $ex->getMessage(); } try{ $repo = \SYSTEM\GIT\Git::open(\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH).\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL)); - $result['git_system'] = ''.$repo->run('rev-parse --short HEAD').''; + $result['git_system'] .= '
  • '; + $result['git_system'] = ''.$repo->run('rev-parse --short HEAD').'
    '; + $result['git_system'] .= $repo->run('log -1 --pretty=%B'); } catch (\Exception $ex) { $result['git_system'] = $ex->getMessage(); } From cf69cfa2d9f312c9cac148facf5a97fb4dd0b555 Mon Sep 17 00:00:00 2001 From: rylon Date: Tue, 16 Jun 2015 13:17:32 +0200 Subject: [PATCH 07/24] removed git, included git lib submodule --- .gitmodules | 3 + autoload.inc | 3 +- git/Git.php | 113 ---- git/GitRepo.php | 572 ------------------ git/autoload.inc | 2 - lib/autoload.inc | 3 +- lib/git | 1 + sai/modules/saimod_sys_git/saimod_sys_git.php | 5 +- 8 files changed, 10 insertions(+), 692 deletions(-) delete mode 100644 git/Git.php delete mode 100644 git/GitRepo.php delete mode 100644 git/autoload.inc create mode 160000 lib/git diff --git a/.gitmodules b/.gitmodules index e29da0e..13a18d0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -25,3 +25,6 @@ [submodule "lib/tablesorter"] path = lib/tablesorter url = git@mojotrollz.eu:webcraft/lib_tablesorter.git +[submodule "lib/git"] + path = lib/git + url = git@mojotrollz.eu:webcraft/lib_git.git diff --git a/autoload.inc b/autoload.inc index 9682377..b9327a7 100644 --- a/autoload.inc +++ b/autoload.inc @@ -20,5 +20,4 @@ require_once dirname(__FILE__).'/docu/autoload.inc'; require_once dirname(__FILE__).'/files/autoload.inc'; require_once dirname(__FILE__).'/cron/autoload.inc'; require_once dirname(__FILE__).'/sai/autoload.inc'; -require_once dirname(__FILE__).'/lib/autoload.inc'; -require_once dirname(__FILE__).'/git/autoload.inc'; \ No newline at end of file +require_once dirname(__FILE__).'/lib/autoload.inc'; \ No newline at end of file diff --git a/git/Git.php b/git/Git.php deleted file mode 100644 index 51c8ec5..0000000 --- a/git/Git.php +++ /dev/null @@ -1,113 +0,0 @@ -clone_remote($source, $reference); - } else { - $repo->clone_from($source); - } - } else { - $repo->run('init'); - } - return $repo; - } - } - - /** - * Constructor - * - * Accepts a repository path - * - * @access public - * @param string repository path - * @param bool create if not exists? - * @return void - */ - public function __construct($repo_path = null, $create_new = false, $_init = true) { - if (is_string($repo_path)) { - $this->set_repo_path($repo_path, $create_new, $_init); - } - } - - /** - * Set the repository's path - * - * Accepts the repository path - * - * @access public - * @param string repository path - * @param bool create if not exists? - * @param bool initialize new Git repo if not exists? - * @return void - */ - public function set_repo_path($repo_path, $create_new = false, $_init = true) { - if (is_string($repo_path)) { - if ($new_path = realpath($repo_path)) { - $repo_path = $new_path; - if (is_dir($repo_path)) { - // Is this a work tree? - if (file_exists($repo_path."/.git") || is_dir($repo_path."/.git")) { - $this->repo_path = $repo_path; - $this->bare = false; - // Is this a bare repo? - } else if (is_file($repo_path."/config")) { - $parse_ini = parse_ini_file($repo_path."/config"); - if ($parse_ini['bare']) { - $this->repo_path = $repo_path; - $this->bare = true; - } - } else { - if ($create_new) { - $this->repo_path = $repo_path; - if ($_init) { - $this->run('init'); - } - } else { - throw new \Exception('"'.$repo_path.'" is not a git repository'); - } - } - } else { - throw new \Exception('"'.$repo_path.'" is not a directory'); - } - } else { - if ($create_new) { - if ($parent = realpath(dirname($repo_path))) { - mkdir($repo_path); - $this->repo_path = $repo_path; - if ($_init) $this->run('init'); - } else { - throw new \Exception('cannot create repository in non-existent directory'); - } - } else { - throw new \Exception('"'.$repo_path.'" does not exist'); - } - } - } - } - - /** - * Get the path to the git repo directory (eg. the ".git" directory) - * - * @access public - * @return string - */ - public function git_directory_path() { - return ($this->bare) ? $this->repo_path : $this->repo_path."/.git"; - } - - /** - * Tests if git is installed - * - * @access public - * @return bool - */ - public function test_git() { - $descriptorspec = array( - 1 => array('pipe', 'w'), - 2 => array('pipe', 'w'), - ); - $pipes = array(); - $resource = proc_open(Git::get_bin(), $descriptorspec, $pipes); - - $stdout = stream_get_contents($pipes[1]); - $stderr = stream_get_contents($pipes[2]); - foreach ($pipes as $pipe) { - fclose($pipe); - } - - $status = trim(proc_close($resource)); - return ($status != 127); - } - - /** - * Run a command in the git repository - * - * Accepts a shell command to run - * - * @access protected - * @param string command to run - * @return string - */ - protected function run_command($command) { - $descriptorspec = array( - 1 => array('pipe', 'w'), - 2 => array('pipe', 'w'), - ); - $pipes = array(); - /* Depending on the value of variables_order, $_ENV may be empty. - * In that case, we have to explicitly set the new variables with - * putenv, and call proc_open with env=null to inherit the reset - * of the system. - * - * This is kind of crappy because we cannot easily restore just those - * variables afterwards. - * - * If $_ENV is not empty, then we can just copy it and be done with it. - */ - if(count($_ENV) === 0) { - $env = NULL; - foreach($this->envopts as $k => $v) { - putenv(sprintf("%s=%s",$k,$v)); - } - } else { - $env = array_merge($_ENV, $this->envopts); - } - $cwd = $this->repo_path; - $resource = proc_open($command, $descriptorspec, $pipes, $cwd, $env); - - $stdout = stream_get_contents($pipes[1]); - $stderr = stream_get_contents($pipes[2]); - foreach ($pipes as $pipe) { - fclose($pipe); - } - - $status = trim(proc_close($resource)); - if ($status) throw new \Exception($stderr); - - return $stdout; - } - - /** - * Run a git command in the git repository - * - * Accepts a git command to run - * - * @access public - * @param string command to run - * @return string - */ - public function run($command) { - return $this->run_command(Git::get_bin()." ".$command); - } - - /** - * Runs a 'git status' call - * - * Accept a convert to HTML bool - * - * @access public - * @param bool return string with
    - * @return string - */ - public function status($html = false) { - $msg = $this->run("status"); - if ($html == true) { - $msg = str_replace("\n", "
    ", $msg); - } - return $msg; - } - - /** - * Runs a `git add` call - * - * Accepts a list of files to add - * - * @access public - * @param mixed files to add - * @return string - */ - public function add($files = "*") { - if (is_array($files)) { - $files = '"'.implode('" "', $files).'"'; - } - return $this->run("add $files -v"); - } - - /** - * Runs a `git rm` call - * - * Accepts a list of files to remove - * - * @access public - * @param mixed files to remove - * @param Boolean use the --cached flag? - * @return string - */ - public function rm($files = "*", $cached = false) { - if (is_array($files)) { - $files = '"'.implode('" "', $files).'"'; - } - return $this->run("rm ".($cached ? '--cached ' : '').$files); - } - - - /** - * Runs a `git commit` call - * - * Accepts a commit message string - * - * @access public - * @param string commit message - * @param boolean should all files be committed automatically (-a flag) - * @return string - */ - public function commit($message = "", $commit_all = true) { - $flags = $commit_all ? '-av' : '-v'; - return $this->run("commit ".$flags." -m ".escapeshellarg($message)); - } - - /** - * Runs a `git clone` call to clone the current repository - * into a different directory - * - * Accepts a target directory - * - * @access public - * @param string target directory - * @return string - */ - public function clone_to($target) { - return $this->run("clone --local ".$this->repo_path." $target"); - } - - /** - * Runs a `git clone` call to clone a different repository - * into the current repository - * - * Accepts a source directory - * - * @access public - * @param string source directory - * @return string - */ - public function clone_from($source) { - return $this->run("clone --local $source ".$this->repo_path); - } - - /** - * Runs a `git clone` call to clone a remote repository - * into the current repository - * - * Accepts a source url - * - * @access public - * @param string source url - * @param string reference path - * @return string - */ - public function clone_remote($source, $reference) { - return $this->run("clone $reference $source ".$this->repo_path); - } - - /** - * Runs a `git clean` call - * - * Accepts a remove directories flag - * - * @access public - * @param bool delete directories? - * @param bool force clean? - * @return string - */ - public function clean($dirs = false, $force = false) { - return $this->run("clean".(($force) ? " -f" : "").(($dirs) ? " -d" : "")); - } - - /** - * Runs a `git branch` call - * - * Accepts a name for the branch - * - * @access public - * @param string branch name - * @return string - */ - public function create_branch($branch) { - return $this->run("branch $branch"); - } - - /** - * Runs a `git branch -[d|D]` call - * - * Accepts a name for the branch - * - * @access public - * @param string branch name - * @return string - */ - public function delete_branch($branch, $force = false) { - return $this->run("branch ".(($force) ? '-D' : '-d')." $branch"); - } - - /** - * Runs a `git branch` call - * - * @access public - * @param bool keep asterisk mark on active branch - * @return array - */ - public function list_branches($keep_asterisk = false) { - $branchArray = explode("\n", $this->run("branch")); - foreach($branchArray as $i => &$branch) { - $branch = trim($branch); - if (! $keep_asterisk) { - $branch = str_replace("* ", "", $branch); - } - if ($branch == "") { - unset($branchArray[$i]); - } - } - return $branchArray; - } - - /** - * Lists remote branches (using `git branch -r`). - * - * Also strips out the HEAD reference (e.g. "origin/HEAD -> origin/master"). - * - * @access public - * @return array - */ - public function list_remote_branches() { - $branchArray = explode("\n", $this->run("branch -r")); - foreach($branchArray as $i => &$branch) { - $branch = trim($branch); - if ($branch == "" || strpos($branch, 'HEAD -> ') !== false) { - unset($branchArray[$i]); - } - } - return $branchArray; - } - - /** - * Returns name of active branch - * - * @access public - * @param bool keep asterisk mark on branch name - * @return string - */ - public function active_branch($keep_asterisk = false) { - $branchArray = $this->list_branches(true); - $active_branch = preg_grep("/^\*/", $branchArray); - reset($active_branch); - if ($keep_asterisk) { - return current($active_branch); - } else { - return str_replace("* ", "", current($active_branch)); - } - } - - /** - * Runs a `git checkout` call - * - * Accepts a name for the branch - * - * @access public - * @param string branch name - * @return string - */ - public function checkout($branch) { - return $this->run("checkout $branch"); - } - - - /** - * Runs a `git merge` call - * - * Accepts a name for the branch to be merged - * - * @access public - * @param string $branch - * @return string - */ - public function merge($branch) { - return $this->run("merge $branch --no-ff"); - } - - - /** - * Runs a git fetch on the current branch - * - * @access public - * @return string - */ - public function fetch() { - return $this->run("fetch"); - } - - /** - * Add a new tag on the current position - * - * Accepts the name for the tag and the message - * - * @param string $tag - * @param string $message - * @return string - */ - public function add_tag($tag, $message = null) { - if ($message === null) { - $message = $tag; - } - return $this->run("tag -a $tag -m " . escapeshellarg($message)); - } - - /** - * List all the available repository tags. - * - * Optionally, accept a shell wildcard pattern and return only tags matching it. - * - * @access public - * @param string $pattern Shell wildcard pattern to match tags against. - * @return array Available repository tags. - */ - public function list_tags($pattern = null) { - $tagArray = explode("\n", $this->run("tag -l $pattern")); - foreach ($tagArray as $i => &$tag) { - $tag = trim($tag); - if ($tag == '') { - unset($tagArray[$i]); - } - } - - return $tagArray; - } - - /** - * Push specific branch to a remote - * - * Accepts the name of the remote and local branch - * - * @param string $remote - * @param string $branch - * @return string - */ - public function push($remote, $branch) { - return $this->run("push --tags $remote $branch"); - } - - /** - * Pull specific branch from remote - * - * Accepts the name of the remote and local branch - * - * @param string $remote - * @param string $branch - * @return string - */ - public function pull($remote, $branch) { - return $this->run("pull $remote $branch"); - } - - /** - * List log entries. - * - * @param strgin $format - * @return string - */ - public function log($format = null) { - if ($format === null) - return $this->run('log'); - else - return $this->run('log --pretty=format:"' . $format . '"'); - } - - /** - * Sets the project description. - * - * @param string $new - */ - public function set_description($new) { - $path = $this->git_directory_path(); - file_put_contents($path."/description", $new); - } - - /** - * Gets the project description. - * - * @return string - */ - public function get_description() { - $path = $this->git_directory_path(); - return file_get_contents($path."/description"); - } - - /** - * Sets custom environment options for calling Git - * - * @param string key - * @param string value - */ - public function setenv($key, $value) { - $this->envopts[$key] = $value; - } - -} - -/* End of file */ \ No newline at end of file diff --git a/git/autoload.inc b/git/autoload.inc deleted file mode 100644 index 3f1c2c2..0000000 --- a/git/autoload.inc +++ /dev/null @@ -1,2 +0,0 @@ - '', 'git_system' => ''); try{ - $repo = \SYSTEM\GIT\Git::open(\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH)); + $repo = \GIT\Git::open(\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH)); $result['git_project'] = ''.$repo->run('rev-parse --short HEAD').'
    '; $result['git_project'] .= $repo->run('log -1 --pretty=%B'); @@ -20,7 +21,7 @@ class saimod_sys_git extends \SYSTEM\SAI\SaiModule { } try{ - $repo = \SYSTEM\GIT\Git::open(\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH).\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL)); + $repo = \GIT\Git::open(\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH).\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL)); $result['git_system'] .= '
  • '; $result['git_system'] = ''.$repo->run('rev-parse --short HEAD').'
    '; $result['git_system'] .= $repo->run('log -1 --pretty=%B'); From dacfa39f776cf6a7811cb7cfc91f8c99d21352bb Mon Sep 17 00:00:00 2001 From: rylon Date: Thu, 18 Jun 2015 02:12:17 +0200 Subject: [PATCH 08/24] saimod git texts --- dbd/sql/mysql/data/system_text.sql | 12 +++++++++++- sai/modules/saimod_sys_git/tpl/saimod_sys_git.tpl | 4 ++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/dbd/sql/mysql/data/system_text.sql b/dbd/sql/mysql/data/system_text.sql index 7712622..4f337c9 100644 --- a/dbd/sql/mysql/data/system_text.sql +++ b/dbd/sql/mysql/data/system_text.sql @@ -918,7 +918,7 @@ DELETE FROM `system_text` WHERE id = 'sai_todo_title'; DELETE FROM `system_text_tag` WHERE id = 'sai_todo_title'; - INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_todo_title', 'deDE', 'System To-do', 2, 2, '2015-04-23 01:53:37', '2015-04-23 01:53:37'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_todo_title', 'deDE', 'System ToDo', 2, 2, '2015-04-23 01:53:37', '2015-04-23 01:53:37'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_todo_title', 'enUS', 'System ToDo', 2, 2, '2015-04-17 19:22:57', '2015-04-17 19:22:57'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_todo_title', 'frFR', 'System ToDo', 2, 2, '2015-04-17 19:22:57', '2015-04-17 19:22:57'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_todo_title', 'esES', 'System ToDo', 2, 2, '2015-04-17 19:22:57', '2015-04-17 19:22:57'); @@ -926,6 +926,16 @@ INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_todo_title', 'sai'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_todo_title', 'sai_todo'); + DELETE FROM `system_text` WHERE id = 'sai_git_title'; + DELETE FROM `system_text_tag` WHERE id = 'sai_git_title'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_git_title', 'deDE', 'System Git', 2, 2, '2015-04-23 01:53:37', '2015-04-23 01:53:37'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_git_title', 'enUS', 'System Git', 2, 2, '2015-04-17 19:22:57', '2015-04-17 19:22:57'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_git_title', 'frFR', 'System Git', 2, 2, '2015-04-17 19:22:57', '2015-04-17 19:22:57'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_git_title', 'esES', 'System Git', 2, 2, '2015-04-17 19:22:57', '2015-04-17 19:22:57'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_git_title', 'trTR', 'System Git', 2, 2, '2015-04-17 19:22:57', '2015-04-17 19:22:57'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_git_title', 'sai'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_git_title', 'sai_git'); + -- Table DELETE FROM `system_text` WHERE id = 'table_author'; diff --git a/sai/modules/saimod_sys_git/tpl/saimod_sys_git.tpl b/sai/modules/saimod_sys_git/tpl/saimod_sys_git.tpl index f43157a..6a7b19b 100644 --- a/sai/modules/saimod_sys_git/tpl/saimod_sys_git.tpl +++ b/sai/modules/saimod_sys_git/tpl/saimod_sys_git.tpl @@ -1,5 +1,5 @@

    ${sai_git_title}


    -${sai_git_project_version}: ${git_project} +Current Project Version: ${git_project}
    -${sai_git_system_version}: ${git_system} \ No newline at end of file +Current SYSTEM Version: ${git_system} \ No newline at end of file From 47f0547e6028060e0ac65c782613fd11cac33331 Mon Sep 17 00:00:00 2001 From: rylon Date: Thu, 18 Jun 2015 02:16:47 +0200 Subject: [PATCH 09/24] saimod todo - fixed problem with todo counting --- sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT.php | 9 +++++++-- sai/modules/saimod_sys_todo/saimod_sys_todo.php | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT.php b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT.php index 9d4cb38..db4e15a 100644 --- a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT.php +++ b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT.php @@ -5,7 +5,12 @@ class SYS_SAIMOD_TODO_COUNT extends \SYSTEM\DB\QP { protected static function query(){ return new \SYSTEM\DB\QQuery(get_class(), //pg -'SELECT COUNT(*) as count FROM '.\SYSTEM\DBD\system_todo::NAME_PG.' WHERE '.\SYSTEM\DBD\system_todo::FIELD_STATE.'=?;', +'TODO', //mys -'SELECT COUNT(*) as count FROM '.\SYSTEM\DBD\system_todo::NAME_MYS.' WHERE '.\SYSTEM\DBD\system_todo::FIELD_STATE.'=?;' +'SELECT COUNT(*) as count FROM '.\SYSTEM\DBD\system_todo::NAME_MYS.' as todo'. +' LEFT JOIN '.\SYSTEM\DBD\system_todo_assign::NAME_MYS.' as assign ON todo.'.\SYSTEM\DBD\system_todo::FIELD_ID.'=assign.'.\SYSTEM\DBD\system_todo_assign::FIELD_TODO. +' LEFT JOIN '.\SYSTEM\DBD\system_user::NAME_MYS.' as creator ON todo.'.\SYSTEM\DBD\system_todo::FIELD_USER.'=creator.'.\SYSTEM\DBD\system_user::FIELD_ID. +' LEFT JOIN '.\SYSTEM\DBD\system_user::NAME_MYS.' as assignee ON assign.'.\SYSTEM\DBD\system_todo_assign::FIELD_USER.'=assignee.'.\SYSTEM\DBD\system_user::FIELD_ID. +' WHERE '.\SYSTEM\DBD\system_todo::FIELD_STATE.'=?'. +' AND (todo.'.\SYSTEM\DBD\system_todo::FIELD_MESSAGE.' LIKE ? OR creator.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ? OR assignee.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ?);' );}} diff --git a/sai/modules/saimod_sys_todo/saimod_sys_todo.php b/sai/modules/saimod_sys_todo/saimod_sys_todo.php index 3e1a1a2..7562bd8 100644 --- a/sai/modules/saimod_sys_todo/saimod_sys_todo.php +++ b/sai/modules/saimod_sys_todo/saimod_sys_todo.php @@ -97,7 +97,7 @@ class saimod_sys_todo extends \SYSTEM\SAI\SaiModule { $vars['filter_report'] = 'active'; break; default: - $count = \SYSTEM\DBD\SYS_SAIMOD_TODO_COUNT::Q1(array($state))['count']; + $count = \SYSTEM\DBD\SYS_SAIMOD_TODO_COUNT::Q1(array($state,$search,$search,$search))['count']; $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST::QQ(array($state,$search,$search,$search,$userid)); $vars['filter_all'] = 'active'; break; From ade2dfe5d60c73c02df36067e6df9fa1ebdc8e1b Mon Sep 17 00:00:00 2001 From: rylon Date: Thu, 18 Jun 2015 02:24:38 +0200 Subject: [PATCH 10/24] saimod login register account fix --- dbd/sql/mysql/data/system_page.sql | 1 + sai/modules/saimod_sys_login/js/sai_sys_login_submit.js | 9 ++------- sai/modules/saimod_sys_login/tpl/login.tpl | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/dbd/sql/mysql/data/system_page.sql b/dbd/sql/mysql/data/system_page.sql index 170bd28..ce12354 100644 --- a/dbd/sql/mysql/data/system_page.sql +++ b/dbd/sql/mysql/data/system_page.sql @@ -29,6 +29,7 @@ INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (73, 42, 'error', 'log', 70, 0, 1, '#tab_log', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_log&action=error&error=${error}', '', ''); INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (80, 42, 'login', 'login', -1, 0, 0, '#content', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_login', 'init_saimod_sys_login', '\\SYSTEM\\SAI\\saimod_sys_login'); +INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (81, 42, 'register', 'login', 80, 0, 1, '#content', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_login&action=registerform', 'init_saimod_sys_register', '\\SYSTEM\\SAI\\saimod_sys_login'); INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (90, 42, 'mod', 'mod', -1, 0, 0, '#content', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_mod', 'init_saimod_sys_mod', '\\SYSTEM\\SAI\\saimod_sys_mod'); INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (91, 42, 'system', 'mod', 90, 0, 0, '#tab_mod', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_mod&action=system', 'init_saimod_sys_mod_system', '\\SYSTEM\\SAI\\saimod_sys_mod'); diff --git a/sai/modules/saimod_sys_login/js/sai_sys_login_submit.js b/sai/modules/saimod_sys_login/js/sai_sys_login_submit.js index e63b117..d42e096 100644 --- a/sai/modules/saimod_sys_login/js/sai_sys_login_submit.js +++ b/sai/modules/saimod_sys_login/js/sai_sys_login_submit.js @@ -43,16 +43,11 @@ function init_saimod_sys_login() { } }); - $("#register_link").click(function(){ - $('div#content-wrapper').load('./sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_login&action=registerform',function(){ - init__SYSTEM_SAI_saimod_sys_login_register(); - }); - }); }; -function init__SYSTEM_SAI_saimod_sys_login_register(){ +function init_saimod_sys_register(){ $('#btn_user_registration_cancel').click(function(){ - loadModuleContent('.SYSTEM.SAI.saimod_sys_login'); + system.load('login'); }); diff --git a/sai/modules/saimod_sys_login/tpl/login.tpl b/sai/modules/saimod_sys_login/tpl/login.tpl index 71b62b8..a31a806 100644 --- a/sai/modules/saimod_sys_login/tpl/login.tpl +++ b/sai/modules/saimod_sys_login/tpl/login.tpl @@ -29,5 +29,5 @@ -${basic_text_register}
    +${basic_text_register}
    ${basic_text_password_miss} \ No newline at end of file From 37d5ca468a7115a59272212ac8a031314f546557 Mon Sep 17 00:00:00 2001 From: rylon Date: Thu, 18 Jun 2015 04:10:39 +0200 Subject: [PATCH 11/24] started qq->qq2 conversion --- db/qq/QP.php | 48 ++++++++++--------- db/qq/QQ.php | 46 ++++++++++-------- db/qq/QQuery.php | 16 ------- dbd/qq/SYS_API_TREE.php | 16 +++---- dbd/qq/SYS_CRON_GET.php | 16 +++---- dbd/qq/SYS_CRON_LAST_VISIT.php | 16 +++---- dbd/qq/SYS_PAGE_GROUP.php | 16 +++---- dbd/qq/SYS_SECURITY_CHECK.php | 15 +++--- dbd/qq/SYS_TEXT_GET_TAG.php | 13 ++--- .../saimod_sys_cron/qq/SYS_SAIMOD_CRON.php | 16 +++---- .../qq/SYS_SAIMOD_LOG_ANALYTICS.php | 13 ++--- .../qq/SYS_SAIMOD_LOG_FILTER.php | 16 +++---- .../qq/SYS_SAIMOD_LOG_FILTERS.php | 17 ++++--- .../qq/SYS_SAIMOD_LOG_FILTER_COUNT.php | 17 ++++--- .../qq/SYS_SAIMOD_TODO_ASSIGN.php | 14 ++---- .../qq/SYS_SAIMOD_TODO_ASSIGNEES.php | 13 ++--- .../qq/SYS_SAIMOD_TODO_CLOSE.php | 17 ++++--- .../qq/SYS_SAIMOD_TODO_CLOSE_ALL.php | 17 ++++--- .../qq/SYS_SAIMOD_TODO_COUNT.php | 13 ++--- .../qq/SYS_SAIMOD_TODO_COUNT_FREE.php | 13 ++--- .../qq/SYS_SAIMOD_TODO_COUNT_MINE.php | 13 ++--- .../qq/SYS_SAIMOD_TODO_COUNT_OTHERS.php | 13 ++--- .../qq/SYS_SAIMOD_TODO_COUNT_TYPE.php | 13 ++--- .../qq/SYS_SAIMOD_TODO_DEASSIGN.php | 14 ++---- .../qq/SYS_SAIMOD_TODO_EDIT.php | 17 ++++--- .../qq/SYS_SAIMOD_TODO_EXCEPTION_INSERT.php | 13 ++--- .../qq/SYS_SAIMOD_TODO_LIST.php | 13 ++--- .../qq/SYS_SAIMOD_TODO_LIST_FREE.php | 13 ++--- .../qq/SYS_SAIMOD_TODO_LIST_MINE.php | 13 ++--- .../qq/SYS_SAIMOD_TODO_LIST_OTHERS.php | 13 ++--- .../qq/SYS_SAIMOD_TODO_LIST_TYPE.php | 13 ++--- .../qq/SYS_SAIMOD_TODO_OPEN.php | 17 ++++--- .../qq/SYS_SAIMOD_TODO_PRIORITY.php | 13 ++--- .../SYS_SAIMOD_TODO_STATS_COUNT_DOTO_GEN.php | 16 +++---- .../SYS_SAIMOD_TODO_STATS_COUNT_DOTO_USER.php | 16 +++---- ..._SAIMOD_TODO_STATS_COUNT_TODO_ASSIGNED.php | 13 ++--- .../SYS_SAIMOD_TODO_STATS_COUNT_TODO_GEN.php | 16 +++---- .../SYS_SAIMOD_TODO_STATS_COUNT_TODO_USER.php | 16 +++---- .../qq/SYS_SAIMOD_TODO_STATS_USERS.php | 13 ++--- .../qq/SYS_SAIMOD_TODO_TODO.php | 14 ++---- 40 files changed, 287 insertions(+), 363 deletions(-) delete mode 100644 db/qq/QQuery.php diff --git a/db/qq/QP.php b/db/qq/QP.php index 534b5d7..f152998 100644 --- a/db/qq/QP.php +++ b/db/qq/QP.php @@ -1,35 +1,39 @@ dbinfo); - $is_pg = \SYSTEM\system::isSystemDbInfoPG(); - if($query->dbinfo){ - $is_pg = $query->dbinfo instanceof \SYSTEM\DB\DBInfoPG;} - if($is_pg){ - return $con->prepare($query->name,$query->sql_pg,$params); - } else { - return $con->prepare($query->name,$query->sql_mys,$params_mys ? $params_mys : $params);} +class QP { + public static function QQ($params,$dbinfo = null){ + if(!$dbinfo){ + $dbinfo = \SYSTEM\system::getSystemDBInfo();} + $con = new \SYSTEM\DB\Connection($dbinfo); + + try{ + if($dbinfo instanceof \SYSTEM\DB\DBInfoPG){ + return $con->prepare(static::get_class(),static::pgsql(),$params); + } else if ($dbinfo instanceof \SYSTEM\DB\DBInfoMYS){ + return $con->prepare(static::get_class(),static::mysql(),$params); + } else if ($dbinfo instanceof \SYSTEM\DB\DBInfoAMQP){ + return $con->prepare(static::get_class(),static::amqp(),$params); + } else if ($dbinfo instanceof \SYSTEM\DB\DBInfoSQLite){ + return $con->prepare(static::get_class(),static::sqlite(),$params); + } + } catch (\Exception $e){ + throw new \SYSTEM\LOG\ERROR(static::get_class().' failed causing: '.$e->getMessage(),$e->getCode(),$e);} + throw new \Exception('Could not understand Database Settings. Check ur Database Settings'); } - public static function QA($params,$params_mys = null){ - $res = self::QQ($params,$params_mys); + public static function QA($params,$dbinfo = null){ + $res = self::QQ($params,$dbinfo); $result = array(); while($row = $res->next()){ $result[] = $row;} return $result; } - public static function Q1($params,$params_mys = null){ - return self::QQ($params,$params_mys)->next();} + public static function Q1($params,$dbinfo = null){ + return self::QQ($params,$dbinfo)->next();} - public static function QI($params,$params_mys = null){ - $qq = self::QQ($params,$params_mys); - return $qq->affectedRows() != (0||null);} - //override this - protected static function query(){ - throw new \SYSTEM\LOG\ERROR('query function of your QP Class not overwritten!');} - //return new QQuery();} + public static function QI($params,$dbinfo = null){ + $qq = self::QQ($params,$dbinfo); + return $qq->affectedRows() != (0||null);} } \ No newline at end of file diff --git a/db/qq/QQ.php b/db/qq/QQ.php index ab86314..d8b3de7 100644 --- a/db/qq/QQ.php +++ b/db/qq/QQ.php @@ -2,33 +2,37 @@ namespace SYSTEM\DB; class QQ { - public static function QQ(){ - $query = static::query(); - $con = new \SYSTEM\DB\Connection($query->dbinfo); - $is_pg = \SYSTEM\system::isSystemDbInfoPG(); - if($query->dbinfo){ - $is_pg = $query->dbinfo instanceof \SYSTEM\DB\DBInfoPG;} - if($is_pg){ - return $con->query($query->sql_pg); - } else { - return $con->query($query->sql_mys);} + public static function QQ($dbinfo = null){ + if(!$dbinfo){ + $dbinfo = \SYSTEM\system::getSystemDBInfo();} + $con = new \SYSTEM\DB\Connection($dbinfo); + + try{ + if($dbinfo instanceof \SYSTEM\DB\DBInfoPG){ + return $con->query(static::pgsql()); + } else if ($dbinfo instanceof \SYSTEM\DB\DBInfoMYS){ + return $con->query(static::mysql()); + } else if ($dbinfo instanceof \SYSTEM\DB\DBInfoAMQP){ + return $con->query(static::amqp()); + } else if ($dbinfo instanceof \SYSTEM\DB\DBInfoSQLite){ + return $con->query(static::sqlite()); + } + } catch (\Exception $e){ + throw new \SYSTEM\LOG\ERROR(static::get_class().' failed causing: '.$e->getMessage(),$e->getCode(),$e);} + + throw new \Exception('Could not understand Database Settings. Check ur Database Settings'); } - public static function QA(){ - $res = self::QQ(); + public static function QA($dbinfo = null){ + $res = self::QQ($dbinfo); $result = array(); while($row = $res->next()){ $result[] = $row;} return $result; } - public static function Q1(){ - return self::QQ()->next();} - public static function QI(){ - $qq = self::QQ(); - return $qq;} - //override this - protected static function query(){ - throw new \SYSTEM\LOG\ERROR('query function of your QQ Class not overwritten!');} - //return new QQuery();} + public static function Q1($dbinfo = null){ + return self::QQ($dbinfo)->next();} + public static function QI($dbinfo = null){ + return self::QQ($dbinfo);} } \ No newline at end of file diff --git a/db/qq/QQuery.php b/db/qq/QQuery.php deleted file mode 100644 index 3b7a306..0000000 --- a/db/qq/QQuery.php +++ /dev/null @@ -1,16 +0,0 @@ -name = $name; - $this->sql_pg = $sql_pg; - $this->sql_mys = $sql_mys; - $this->dbinfo = $dbinfo; - } -} diff --git a/dbd/qq/SYS_API_TREE.php b/dbd/qq/SYS_API_TREE.php index e77d418..f0aa452 100644 --- a/dbd/qq/SYS_API_TREE.php +++ b/dbd/qq/SYS_API_TREE.php @@ -1,15 +1,15 @@ Date: Thu, 18 Jun 2015 16:08:01 +0200 Subject: [PATCH 12/24] updated lots of qq to new qq2 format --- db/qq/QP.php | 1 - dbd/qq/SYS_CACHE_CHECK.php | 12 +++++------ dbd/qq/SYS_CACHE_DELETE.php | 12 +++++------ dbd/qq/SYS_CACHE_DELETE_ALL.php | 16 +++++++-------- dbd/qq/SYS_CACHE_PUT.php | 12 +++++------ dbd/qq/SYS_CRON_LIST.php | 16 +++++++-------- dbd/qq/SYS_CRON_UPD.php | 16 +++++++-------- dbd/qq/SYS_LOCALE_SET_LOCALE.php | 16 +++++++-------- dbd/qq/SYS_LOG_DEL.php | 16 +++++++-------- dbd/qq/SYS_LOG_INSERT.php | 16 +++++++-------- dbd/qq/SYS_LOG_MONTH.php | 13 +++++------- dbd/qq/SYS_LOG_OLDEST.php | 16 +++++++-------- dbd/qq/SYS_SECURITY_AVAILABLE.php | 16 +++++++-------- dbd/qq/SYS_SECURITY_CREATE.php | 16 +++++++-------- dbd/qq/SYS_SECURITY_LOGIN_MD5.php | 16 +++++++-------- dbd/qq/SYS_SECURITY_LOGIN_SHA1.php | 16 +++++++-------- dbd/qq/SYS_SECURITY_UPDATE_LASTACTIVE.php | 20 ++++++++----------- dbd/qq/SYS_SECURITY_UPDATE_PW.php | 16 +++++++-------- dbd/qq/SYS_TEXT_DELETE.php | 13 +++++------- dbd/qq/SYS_TEXT_DELETE_TAGS.php | 13 +++++------- dbd/qq/SYS_TEXT_GET_ID.php | 13 +++++------- dbd/qq/SYS_TEXT_GET_ID_COUNT.php | 13 +++++------- dbd/qq/SYS_TEXT_GET_ID_TAGS.php | 13 +++++------- dbd/qq/SYS_TEXT_RENAME.php | 13 +++++------- dbd/qq/SYS_TEXT_RENAME_TAGS.php | 13 +++++------- dbd/qq/SYS_TEXT_SAVE.php | 13 +++++------- dbd/qq/SYS_TEXT_SAVE_TAG.php | 13 +++++------- log/error_handler/error_handler_dbwriter.php | 4 ++-- .../saimod_sys_api/qq/SYS_SAIMOD_API_ADD.php | 16 +++++++-------- .../saimod_sys_api/qq/SYS_SAIMOD_API_DEL.php | 16 +++++++-------- .../saimod_sys_api/qq/SYS_SAIMOD_API_GET.php | 16 +++++++-------- .../qq/SYS_SAIMOD_API_GROUPS.php | 16 +++++++-------- .../qq/SYS_SAIMOD_API_SINGLE_SELECT.php | 16 +++++++-------- .../qq/SYS_SAIMOD_PAGE_ADD.php | 16 +++++++-------- .../qq/SYS_SAIMOD_PAGE_DEL.php | 16 +++++++-------- .../qq/SYS_SAIMOD_PAGE_GET.php | 16 +++++++-------- .../qq/SYS_SAIMOD_PAGE_GROUPS.php | 16 +++++++-------- .../qq/SYS_SAIMOD_PAGE_SINGLE_SELECT.php | 16 +++++++-------- .../qq/SYS_SAIMOD_SECURITY_RIGHTS.php | 16 +++++++-------- .../qq/SYS_SAIMOD_SECURITY_RIGHT_CHECK.php | 16 +++++++-------- .../qq/SYS_SAIMOD_SECURITY_RIGHT_DELETE.php | 17 ++++++++-------- .../qq/SYS_SAIMOD_SECURITY_RIGHT_INSERT.php | 17 ++++++++-------- .../qq/SYS_SAIMOD_SECURITY_USER.php | 16 +++++++-------- .../qq/SYS_SAIMOD_SECURITY_USERS.php | 16 +++++++-------- .../qq/SYS_SAIMOD_SECURITY_USERS_FILTER.php | 13 +++++------- .../qq/SYS_SAIMOD_SECURITY_USER_COUNT.php | 17 ++++++++-------- .../SYS_SAIMOD_SECURITY_USER_COUNT_FILTER.php | 14 +++++-------- .../qq/SYS_SAIMOD_SECURITY_USER_LOG.php | 17 ++++++++-------- .../qq/SYS_SAIMOD_SECURITY_USER_LOG_COUNT.php | 16 +++++++-------- .../qq/SYS_SAIMOD_SECURITY_USER_RIGHTS.php | 16 +++++++-------- .../SYS_SAIMOD_SECURITY_USER_RIGHT_CHECK.php | 17 ++++++++-------- .../SYS_SAIMOD_SECURITY_USER_RIGHT_DELETE.php | 17 ++++++++-------- .../SYS_SAIMOD_SECURITY_USER_RIGHT_INSERT.php | 16 +++++++-------- .../saimod_sys_security.php | 2 +- .../qq/SYS_SAIMOD_TEXT_COUNT.php | 13 +++++------- .../qq/SYS_SAIMOD_TEXT_COUNT_FILTER.php | 13 +++++------- .../qq/SYS_SAIMOD_TEXT_COUNT_NOTAG.php | 13 +++++------- .../qq/SYS_SAIMOD_TEXT_COUNT_NOTAG_FILTER.php | 13 +++++------- .../qq/SYS_SAIMOD_TEXT_COUNT_TAG.php | 13 +++++------- .../qq/SYS_SAIMOD_TEXT_COUNT_TAG_FILTER.php | 13 +++++------- .../qq/SYS_SAIMOD_TEXT_TAGS.php | 16 +++++++-------- .../qq/SYS_SAIMOD_TEXT_TEXT.php | 13 +++++------- .../qq/SYS_SAIMOD_TEXT_TEXT_FILTER.php | 13 +++++------- .../qq/SYS_SAIMOD_TEXT_TEXT_NOTAG.php | 13 +++++------- .../qq/SYS_SAIMOD_TEXT_TEXT_NOTAG_FILTER.php | 13 +++++------- .../qq/SYS_SAIMOD_TEXT_TEXT_TAG.php | 13 +++++------- .../qq/SYS_SAIMOD_TEXT_TEXT_TAG_FILTER.php | 13 +++++------- security/Security.php | 8 ++++---- 68 files changed, 438 insertions(+), 528 deletions(-) diff --git a/db/qq/QP.php b/db/qq/QP.php index f152998..0ddb97f 100644 --- a/db/qq/QP.php +++ b/db/qq/QP.php @@ -6,7 +6,6 @@ class QP { if(!$dbinfo){ $dbinfo = \SYSTEM\system::getSystemDBInfo();} $con = new \SYSTEM\DB\Connection($dbinfo); - try{ if($dbinfo instanceof \SYSTEM\DB\DBInfoPG){ return $con->prepare(static::get_class(),static::pgsql(),$params); diff --git a/dbd/qq/SYS_CACHE_CHECK.php b/dbd/qq/SYS_CACHE_CHECK.php index 43eb27b..fb8de9e 100644 --- a/dbd/qq/SYS_CACHE_CHECK.php +++ b/dbd/qq/SYS_CACHE_CHECK.php @@ -1,12 +1,10 @@ logged){ return false;} //alrdy logged(this prevents proper thrown value for every system exception) - \SYSTEM\DBD\SYS_LOG_INSERT::Q1( array( get_class($E), $E->getMessage(), $E->getCode(), $E->getFile(), $E->getLine(), $E->getTraceAsString(), + \SYSTEM\DBD\SYS_LOG_INSERT::Q1( /*array( get_class($E), $E->getMessage(), $E->getCode(), $E->getFile(), $E->getLine(), $E->getTraceAsString(), getenv('REMOTE_ADDR'),round(microtime(true) - \SYSTEM\time::getStartTime(),5), $_SERVER["SERVER_NAME"],$_SERVER["SERVER_PORT"],$_SERVER['REQUEST_URI'], serialize($_POST), array_key_exists('HTTP_REFERER', $_SERVER) ? $_SERVER['HTTP_REFERER'] : null, array_key_exists('HTTP_USER_AGENT',$_SERVER) ? $_SERVER['HTTP_USER_AGENT'] : null, - ($user = \SYSTEM\SECURITY\Security::getUser()) ? $user->id : null, $thrown ? 1 : 0), + ($user = \SYSTEM\SECURITY\Security::getUser()) ? $user->id : null, $thrown ? 1 : 0),*/ array( get_class($E), $E->getMessage(), $E->getCode(), $E->getFile(), $E->getLine(), $E->getTraceAsString(), getenv('REMOTE_ADDR'),round(microtime(true) - \SYSTEM\time::getStartTime(),5),date('Y-m-d H:i:s', microtime(true)), $_SERVER["SERVER_NAME"],$_SERVER["SERVER_PORT"],$_SERVER['REQUEST_URI'], serialize($_POST), diff --git a/sai/modules/saimod_sys_api/qq/SYS_SAIMOD_API_ADD.php b/sai/modules/saimod_sys_api/qq/SYS_SAIMOD_API_ADD.php index c858c26..6bb27ec 100644 --- a/sai/modules/saimod_sys_api/qq/SYS_SAIMOD_API_ADD.php +++ b/sai/modules/saimod_sys_api/qq/SYS_SAIMOD_API_ADD.php @@ -1,11 +1,11 @@ seek(100*$page); diff --git a/sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_COUNT.php b/sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_COUNT.php index 04f13c5..4be120f 100644 --- a/sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_COUNT.php +++ b/sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_COUNT.php @@ -1,15 +1,12 @@ Date: Thu, 18 Jun 2015 16:18:15 +0200 Subject: [PATCH 13/24] corrected remaining qqs --- .../saimod_sys_cron/qq/SYS_SAIMOD_CRON_ADD.php | 16 ++++++++-------- .../qq/SYS_SAIMOD_CRON_CHANGE.php | 16 ++++++++-------- .../saimod_sys_cron/qq/SYS_SAIMOD_CRON_DEL.php | 16 ++++++++-------- .../qq/SYS_SAIMOD_CRON_SINGLE_SELECT.php | 16 ++++++++-------- .../qq/SYS_SAIMOD_LOG_BASIC_QUERYTIME.php | 17 ++++++++--------- .../qq/SYS_SAIMOD_LOG_BASIC_SUCCESS.php | 17 ++++++++--------- .../qq/SYS_SAIMOD_LOG_BASIC_VISITOR.php | 17 ++++++++--------- .../qq/SYS_SAIMOD_LOG_CLASS_BASIC.php | 17 ++++++++--------- .../qq/SYS_SAIMOD_LOG_CLASS_OTHER.php | 17 ++++++++--------- .../qq/SYS_SAIMOD_LOG_CLASS_SYSTEM.php | 17 ++++++++--------- .../saimod_sys_log/qq/SYS_SAIMOD_LOG_ERROR.php | 17 ++++++++--------- .../qq/SYS_SAIMOD_LOG_TRUNCATE.php | 17 ++++++++--------- .../qq/SYS_SAIMOD_LOG_UNIQUE_BASIC.php | 17 ++++++++--------- .../qq/SYS_SAIMOD_LOG_UNIQUE_EXCEPTION.php | 17 ++++++++--------- .../qq/SYS_SAIMOD_LOG_UNIQUE_REFERER.php | 17 ++++++++--------- .../qq/SYS_SAIMOD_LOG_UNIQUE_REQUEST.php | 17 ++++++++--------- 16 files changed, 128 insertions(+), 140 deletions(-) diff --git a/sai/modules/saimod_sys_cron/qq/SYS_SAIMOD_CRON_ADD.php b/sai/modules/saimod_sys_cron/qq/SYS_SAIMOD_CRON_ADD.php index 6bc9116..fbfb315 100644 --- a/sai/modules/saimod_sys_cron/qq/SYS_SAIMOD_CRON_ADD.php +++ b/sai/modules/saimod_sys_cron/qq/SYS_SAIMOD_CRON_ADD.php @@ -1,12 +1,12 @@ Date: Thu, 18 Jun 2015 22:16:14 +0200 Subject: [PATCH 14/24] fixed saimod todo various problems, system.js typo --- files/sys/system.js | 2 +- sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT.php | 7 +++++-- .../saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT_FREE.php | 8 +++++--- .../saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT_MINE.php | 8 +++++--- sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_EDIT.php | 2 +- sai/modules/saimod_sys_todo/saimod_sys_todo.php | 2 +- sai/modules/saimod_sys_todo/tpl/saimod_sys_todo_todo.tpl | 2 +- .../saimod_sys_todo/tpl/saimod_sys_todo_todo_user.tpl | 2 +- sai/modules/saimod_sys_todo/tpl/todo_list_pagination.tpl | 2 +- 9 files changed, 21 insertions(+), 14 deletions(-) diff --git a/files/sys/system.js b/files/sys/system.js index 1cbd474..eb92be7 100644 --- a/files/sys/system.js +++ b/files/sys/system.js @@ -200,7 +200,7 @@ SYSTEM.prototype.go_state = function(default_state,forced){ SYSTEM.prototype.back = function(){ window.history.back();}; -SYSTEM.prototype.forwad = function(){ +SYSTEM.prototype.forward = function(){ window.history.forward();}; SYSTEM.prototype.reload = function(href){ if('#!'+this.cur_state() === href){ diff --git a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT.php b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT.php index a356bcb..64d6038 100644 --- a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT.php +++ b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT.php @@ -3,11 +3,14 @@ namespace SYSTEM\DBD; class SYS_SAIMOD_TODO_COUNT extends \SYSTEM\DB\QP { public static function get_class(){return \get_class();} public static function mysql(){return -'SELECT COUNT(*) as count FROM '.\SYSTEM\DBD\system_todo::NAME_MYS.' as todo'. +'SELECT COUNT(*) as count FROM('. +'SELECT todo.id FROM '.\SYSTEM\DBD\system_todo::NAME_MYS.' as todo'. ' LEFT JOIN '.\SYSTEM\DBD\system_todo_assign::NAME_MYS.' as assign ON todo.'.\SYSTEM\DBD\system_todo::FIELD_ID.'=assign.'.\SYSTEM\DBD\system_todo_assign::FIELD_TODO. ' LEFT JOIN '.\SYSTEM\DBD\system_user::NAME_MYS.' as creator ON todo.'.\SYSTEM\DBD\system_todo::FIELD_USER.'=creator.'.\SYSTEM\DBD\system_user::FIELD_ID. ' LEFT JOIN '.\SYSTEM\DBD\system_user::NAME_MYS.' as assignee ON assign.'.\SYSTEM\DBD\system_todo_assign::FIELD_USER.'=assignee.'.\SYSTEM\DBD\system_user::FIELD_ID. ' WHERE '.\SYSTEM\DBD\system_todo::FIELD_STATE.'=?'. -' AND (todo.'.\SYSTEM\DBD\system_todo::FIELD_MESSAGE.' LIKE ? OR creator.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ? OR assignee.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ?);'; +' AND (todo.'.\SYSTEM\DBD\system_todo::FIELD_MESSAGE.' LIKE ? OR creator.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ? OR assignee.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ?)'. +' GROUP BY todo.id'. +') as a;'; } } \ No newline at end of file diff --git a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT_FREE.php b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT_FREE.php index d9899e6..84793c2 100644 --- a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT_FREE.php +++ b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT_FREE.php @@ -3,13 +3,15 @@ namespace SYSTEM\DBD; class SYS_SAIMOD_TODO_COUNT_FREE extends \SYSTEM\DB\QP { public static function get_class(){return \get_class();} public static function mysql(){return -'SELECT COUNT(*) as count'. -' FROM '.\SYSTEM\DBD\system_todo::NAME_MYS.' as todo'. +'SELECT COUNT(*) as count FROM('. +'SELECT todo.id FROM '.\SYSTEM\DBD\system_todo::NAME_MYS.' as todo'. ' LEFT JOIN '.\SYSTEM\DBD\system_todo_assign::NAME_MYS.' as assign ON todo.'.\SYSTEM\DBD\system_todo::FIELD_ID.'=assign.'.\SYSTEM\DBD\system_todo_assign::FIELD_TODO. ' LEFT JOIN '.\SYSTEM\DBD\system_user::NAME_MYS.' as creator ON todo.'.\SYSTEM\DBD\system_todo::FIELD_USER.'=creator.'.\SYSTEM\DBD\system_user::FIELD_ID. ' LEFT JOIN '.\SYSTEM\DBD\system_user::NAME_MYS.' as assignee ON assign.'.\SYSTEM\DBD\system_todo_assign::FIELD_USER.'=assignee.'.\SYSTEM\DBD\system_user::FIELD_ID. ' WHERE '.\SYSTEM\DBD\system_todo::FIELD_STATE.'=?'. ' AND assign.'.\SYSTEM\DBD\system_todo_assign::FIELD_USER.' IS NULL'. -' AND (todo.'.\SYSTEM\DBD\system_todo::FIELD_MESSAGE.' LIKE ? OR creator.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ? OR assignee.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ?);'; +' AND (todo.'.\SYSTEM\DBD\system_todo::FIELD_MESSAGE.' LIKE ? OR creator.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ? OR assignee.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ?)'. +' GROUP BY todo.id'. +') as a;'; } } \ No newline at end of file diff --git a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT_MINE.php b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT_MINE.php index 2876a44..05fdb46 100644 --- a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT_MINE.php +++ b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT_MINE.php @@ -3,13 +3,15 @@ namespace SYSTEM\DBD; class SYS_SAIMOD_TODO_COUNT_MINE extends \SYSTEM\DB\QP { public static function get_class(){return \get_class();} public static function mysql(){return -'SELECT COUNT(*) as count'. -' FROM '.\SYSTEM\DBD\system_todo::NAME_MYS.' as todo'. +'SELECT COUNT(*) as count FROM('. +'SELECT todo.id FROM '.\SYSTEM\DBD\system_todo::NAME_MYS.' as todo'. ' LEFT JOIN '.\SYSTEM\DBD\system_todo_assign::NAME_MYS.' as assign ON todo.'.\SYSTEM\DBD\system_todo::FIELD_ID.'=assign.'.\SYSTEM\DBD\system_todo_assign::FIELD_TODO. ' LEFT JOIN '.\SYSTEM\DBD\system_user::NAME_MYS.' as creator ON todo.'.\SYSTEM\DBD\system_todo::FIELD_USER.'=creator.'.\SYSTEM\DBD\system_user::FIELD_ID. ' LEFT JOIN '.\SYSTEM\DBD\system_user::NAME_MYS.' as assignee ON assign.'.\SYSTEM\DBD\system_todo_assign::FIELD_USER.'=assignee.'.\SYSTEM\DBD\system_user::FIELD_ID. ' WHERE '.\SYSTEM\DBD\system_todo::FIELD_STATE.'=?'. ' AND assign.'.\SYSTEM\DBD\system_todo_assign::FIELD_USER.' = ?'. -' AND (todo.'.\SYSTEM\DBD\system_todo::FIELD_MESSAGE.' LIKE ? OR creator.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ? OR assignee.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ?);'; +' AND (todo.'.\SYSTEM\DBD\system_todo::FIELD_MESSAGE.' LIKE ? OR creator.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ? OR assignee.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ?)'. +' GROUP BY todo.id'. +') as a;'; } } \ No newline at end of file diff --git a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_EDIT.php b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_EDIT.php index 7490a8c..28258b2 100644 --- a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_EDIT.php +++ b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_EDIT.php @@ -6,7 +6,7 @@ class SYS_SAIMOD_TODO_EDIT extends \SYSTEM\DB\QP { 'UPDATE '.\SYSTEM\DBD\system_todo::NAME_PG.' SET '.\SYSTEM\DBD\system_todo::FIELD_MESSAGE.'= $1'. ' WHERE "'.\SYSTEM\DBD\system_todo::FIELD_ID.'"= $2;'; } - public static function pqsql(){return + public static function mysql(){return 'UPDATE '.\SYSTEM\DBD\system_todo::NAME_MYS.' SET '.\SYSTEM\DBD\system_todo::FIELD_MESSAGE.'= ?, ' .\SYSTEM\DBD\system_todo::FIELD_MESSAGE_HASH.'= SHA1(?)'. ' WHERE '.\SYSTEM\DBD\system_todo::FIELD_ID.'= ?;'; diff --git a/sai/modules/saimod_sys_todo/saimod_sys_todo.php b/sai/modules/saimod_sys_todo/saimod_sys_todo.php index 7562bd8..0f5b91e 100644 --- a/sai/modules/saimod_sys_todo/saimod_sys_todo.php +++ b/sai/modules/saimod_sys_todo/saimod_sys_todo.php @@ -157,7 +157,7 @@ class saimod_sys_todo extends \SYSTEM\SAI\SaiModule { $vars['userstats'] = ''; $userstats = \SYSTEM\DBD\SYS_SAIMOD_TODO_STATS_USERS::QQ(); while($stat = $userstats->next()){ - $stat['perc'] = round($stat['state_closed'] / ($stat['state_open']+$stat['state_closed']),2)*100; + $stat['perc'] = round(($stat['state_closed'] / ($stat['state_open']+$stat['state_closed']))*100,2); $vars['userstats'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_stats_users_entry.tpl'), $stat); } return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_stats.tpl'), $vars); diff --git a/sai/modules/saimod_sys_todo/tpl/saimod_sys_todo_todo.tpl b/sai/modules/saimod_sys_todo/tpl/saimod_sys_todo_todo.tpl index 0d4d774..3b59aaf 100644 --- a/sai/modules/saimod_sys_todo/tpl/saimod_sys_todo_todo.tpl +++ b/sai/modules/saimod_sys_todo/tpl/saimod_sys_todo_todo.tpl @@ -21,7 +21,7 @@ thrown${thrown} message${message} - + diff --git a/sai/modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user.tpl b/sai/modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user.tpl index 80b057f..dcfbac0 100644 --- a/sai/modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user.tpl +++ b/sai/modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user.tpl @@ -20,7 +20,7 @@ - + diff --git a/sai/modules/saimod_sys_todo/tpl/todo_list_pagination.tpl b/sai/modules/saimod_sys_todo/tpl/todo_list_pagination.tpl index 9ba0130..32fa8a8 100644 --- a/sai/modules/saimod_sys_todo/tpl/todo_list_pagination.tpl +++ b/sai/modules/saimod_sys_todo/tpl/todo_list_pagination.tpl @@ -1 +1 @@ -
  • ${page}
  • \ No newline at end of file +
  • ${page}
  • \ No newline at end of file From 9381bff7d3d4cdfde00b91a910f35c7f400192bd Mon Sep 17 00:00:00 2001 From: rylon Date: Thu, 18 Jun 2015 22:18:02 +0200 Subject: [PATCH 15/24] saimod todo statistics layoutfix --- sai/modules/saimod_sys_todo/tpl/todo_stats.tpl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sai/modules/saimod_sys_todo/tpl/todo_stats.tpl b/sai/modules/saimod_sys_todo/tpl/todo_stats.tpl index 6c1a7e2..177e4c8 100644 --- a/sai/modules/saimod_sys_todo/tpl/todo_stats.tpl +++ b/sai/modules/saimod_sys_todo/tpl/todo_stats.tpl @@ -14,14 +14,12 @@ ${project_all} ${project}% - - - + ${userstats}
    ${table_username} ${table_open} ${table_closed} ${table_all}${table_percentage}${table_done}
    \ No newline at end of file From 16555947aa62364f64c261007459a3a15168a737 Mon Sep 17 00:00:00 2001 From: rylon Date: Thu, 18 Jun 2015 22:36:27 +0200 Subject: [PATCH 16/24] saimod cache cleaned up, no more html in php, qq's --- .../saimod_sys_cache/qq/SYS_SAIMOD_CACHE.php | 11 +++++ .../qq/SYS_SAIMOD_CACHE_COUNT.php | 11 +++++ .../saimod_sys_cache/saimod_sys_cache.php | 41 ++++--------------- .../saimod_sys_cache/tpl/saimod_sys_cache.tpl | 11 +++++ .../tpl/saimod_sys_cache_entry.tpl | 6 +++ 5 files changed, 48 insertions(+), 32 deletions(-) create mode 100644 sai/modules/saimod_sys_cache/qq/SYS_SAIMOD_CACHE.php create mode 100644 sai/modules/saimod_sys_cache/qq/SYS_SAIMOD_CACHE_COUNT.php create mode 100644 sai/modules/saimod_sys_cache/tpl/saimod_sys_cache.tpl create mode 100644 sai/modules/saimod_sys_cache/tpl/saimod_sys_cache_entry.tpl diff --git a/sai/modules/saimod_sys_cache/qq/SYS_SAIMOD_CACHE.php b/sai/modules/saimod_sys_cache/qq/SYS_SAIMOD_CACHE.php new file mode 100644 index 0000000..e2c6a86 --- /dev/null +++ b/sai/modules/saimod_sys_cache/qq/SYS_SAIMOD_CACHE.php @@ -0,0 +1,11 @@ +query('SELECT COUNT(*)as "count" FROM system.cache'); - } else { - $res = $con->query('SELECT COUNT(*) as count FROM system_cache'); - } - - $r = $res->next(); - - $result = '

    System Cache


    '. - 'Entries: '.$r['count'].' showing 100'. - ''. - ''.''.''.''.''.''; - - - if(\SYSTEM\system::isSystemDbInfoPG()){ - $res = $con->query('SELECT *, encode(data,\'base64\') FROM system.cache ORDER BY "ID" ASC LIMIT 100;'); - } else { - $res = $con->query('SELECT * FROM system_cache ORDER BY ID ASC LIMIT 100;'); - } - - while($r = $res->next()){ - $result .= ''.''.''.''.''.'';} - - $result .= '
    '.'ID'.''.'CacheID'.''.'Ident'.''.'Data'.'
    '.$r['ID'].''.$r['CacheID'].''.$r['Ident'].''.''.'
    '; - - return $result; + $vars = array(); + $vars['count'] = \SYSTEM\DBD\SYS_SAIMOD_CACHE_COUNT::Q1()['count']; + $vars['entries'] = ''; + $res = \SYSTEM\DBD\SYS_SAIMOD_CACHE::QQ(); + while($r = $res->next()){ + $r['class'] = self::tablerow_class($r['CacheID']); + $vars['entries'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_cache/tpl/saimod_sys_cache_entry.tpl'), $r);} + return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_cache/tpl/saimod_sys_cache.tpl'), $vars); } private static function tablerow_class($cacheID){ if($cacheID == 1){ return 'info';} - - return 'success'; - } + return 'success';} - //public static function html_li_menu(){return '
  • ${sai_menu_cache}
  • ';} public static function html_li_menu(){return '
  • ';} public static function right_public(){return false;} public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI);} diff --git a/sai/modules/saimod_sys_cache/tpl/saimod_sys_cache.tpl b/sai/modules/saimod_sys_cache/tpl/saimod_sys_cache.tpl new file mode 100644 index 0000000..5044a08 --- /dev/null +++ b/sai/modules/saimod_sys_cache/tpl/saimod_sys_cache.tpl @@ -0,0 +1,11 @@ +

    System Cache


    +Entries: ${count} showing 100 + + + + + + + + ${entries} +
    IDCacheIDIdentData
    \ No newline at end of file diff --git a/sai/modules/saimod_sys_cache/tpl/saimod_sys_cache_entry.tpl b/sai/modules/saimod_sys_cache/tpl/saimod_sys_cache_entry.tpl new file mode 100644 index 0000000..e4bf11e --- /dev/null +++ b/sai/modules/saimod_sys_cache/tpl/saimod_sys_cache_entry.tpl @@ -0,0 +1,6 @@ + + ${ID} + ${CacheID} + ${Ident} + + \ No newline at end of file From 755c93bc8d5026f5c738e49f53e3be71decc299a Mon Sep 17 00:00:00 2001 From: rylon Date: Thu, 18 Jun 2015 22:43:20 +0200 Subject: [PATCH 17/24] fixed several text problems (saimod login) --- dbd/sql/mysql/data/system_text.sql | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dbd/sql/mysql/data/system_text.sql b/dbd/sql/mysql/data/system_text.sql index 4f337c9..88c5924 100644 --- a/dbd/sql/mysql/data/system_text.sql +++ b/dbd/sql/mysql/data/system_text.sql @@ -56,6 +56,7 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_cancel', 'frFR', 'Annuler', 3, 3, '2015-04-18 04:46:32', '2015-04-18 04:46:32'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_cancel', 'jaJA', 'キャンシル', 0, 0, '2015-04-15 18:41:22', '0000-00-00 00:00:00'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_cancel', 'basic'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_cancel', 'sai_login'); DELETE FROM `system_text` WHERE id = 'basic_close'; DELETE FROM `system_text_tag` WHERE id = 'basic_close'; @@ -213,6 +214,7 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_password_long', 'enUS', 'Password too long', 0, 0, '2015-04-18 13:16:18', '0000-00-00 00:00:00'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_password_long', 'frFR', 'Mot de passe trop long!', 3, 3, '2015-04-20 16:28:21', '2015-04-20 16:28:21'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_password_long', 'basic'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_password_long', 'sai_login'); DELETE FROM `system_text` WHERE id = 'basic_password_match'; DELETE FROM `system_text_tag` WHERE id = 'basic_password_match'; @@ -220,6 +222,7 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_password_match', 'enUS', 'Passwords do not match!', 0, 0, '2015-04-18 13:16:33', '0000-00-00 00:00:00'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_password_match', 'frFR', 'Les mots de passe ne lui correspondent pas!', 3, 3, '2015-04-20 16:20:57', '2015-04-20 16:20:57'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_password_match', 'basic'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_password_match', 'sai_login'); DELETE FROM `system_text` WHERE id = 'basic_password_miss'; DELETE FROM `system_text_tag` WHERE id = 'basic_password_miss'; @@ -227,6 +230,7 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_password_miss', 'enUS', 'Password required', 0, 0, '2015-04-18 13:16:46', '0000-00-00 00:00:00'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_password_miss', 'frFR', 'Mot de passe demandé!', 3, 3, '2015-04-20 16:18:30', '2015-04-20 16:18:30'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_password_miss', 'basic'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_password_miss', 'sai_login'); DELETE FROM `system_text` WHERE id = 'basic_password_short'; DELETE FROM `system_text_tag` WHERE id = 'basic_password_short'; @@ -234,6 +238,7 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_password_short', 'enUS', 'Password too short', 0, 0, '2015-04-18 13:16:58', '0000-00-00 00:00:00'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_password_short', 'frFR', 'Mot de passe est trop court!', 3, 3, '2015-04-20 16:24:50', '2015-04-20 16:24:50'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_password_short', 'basic'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_password_short', 'sai_login'); DELETE FROM `system_text` WHERE id = 'basic_placeholder_email'; DELETE FROM `system_text_tag` WHERE id = 'basic_placeholder_email'; @@ -244,6 +249,7 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_placeholder_email', 'jaJA', 'peter@world.org', 0, 0, '2015-04-15 18:41:22', '0000-00-00 00:00:00'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_placeholder_email', 'trTR', 'peter@world.org', 0, 0, '2015-04-15 18:29:17', '0000-00-00 00:00:00'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_email', 'basic'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_email', 'sai_login'); DELETE FROM `system_text` WHERE id = 'basic_placeholder_password'; DELETE FROM `system_text_tag` WHERE id = 'basic_placeholder_password'; @@ -251,6 +257,7 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_placeholder_password', 'enUS', 'secret123', 0, 2, '2015-04-20 01:42:30', '2015-04-20 01:42:30'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_placeholder_password', 'jaJA', '丸秘のパスワード', 0, 0, '2015-04-15 18:41:22', '0000-00-00 00:00:00'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_password', 'basic'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_password', 'sai_login'); DELETE FROM `system_text` WHERE id = 'basic_placeholder_username'; DELETE FROM `system_text_tag` WHERE id = 'basic_placeholder_username'; @@ -261,6 +268,7 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_placeholder_username', 'jaJA', 'peter / peter@world.org', 0, 0, '2015-04-15 18:41:22', '0000-00-00 00:00:00'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_placeholder_username', 'trTR', 'peter@world.org', 0, 0, '2015-04-15 18:29:17', '0000-00-00 00:00:00'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_username', 'basic'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_username', 'sai_login'); DELETE FROM `system_text` WHERE id = 'basic_placeholder_search'; DELETE FROM `system_text_tag` WHERE id = 'basic_placeholder_search'; @@ -669,8 +677,8 @@ DELETE FROM `system_text` WHERE id = 'sai_files_title'; DELETE FROM `system_text_tag` WHERE id = 'sai_files_title'; - INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_files_title', 'deDE', 'System - Dateien', 3, 3, '2015-05-16 13:53:33', '2015-05-16 13:53:33'); - INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_files_title', 'enUS', 'System - ファイル', 2, 1, '2015-04-20 16:18:27', '2015-04-20 16:18:27'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_files_title', 'deDE', 'System Dateien', 3, 3, '2015-05-16 13:53:33', '2015-05-16 13:53:33'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_files_title', 'enUS', 'System ファイル', 2, 1, '2015-04-20 16:18:27', '2015-04-20 16:18:27'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_files_title', 'frFR', 'System Fichiers', 3, 3, '2015-04-20 19:15:58', '2015-04-20 19:15:58'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_files_title', 'sai'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_files_title', 'sai_files'); From 2349080bd142ea5037e5ef4e2afbd35598158437 Mon Sep 17 00:00:00 2001 From: Messerbill Date: Sat, 20 Jun 2015 14:42:19 +0200 Subject: [PATCH 18/24] added time to sai_start --- sai/modules/saistart_sys_sai/css/saistart_sys_sai.css | 5 +++++ sai/modules/saistart_sys_sai/saistart_sys_sai.php | 6 ++++++ sai/modules/saistart_sys_sai/tpl/content_loggedin.tpl | 1 + 3 files changed, 12 insertions(+) diff --git a/sai/modules/saistart_sys_sai/css/saistart_sys_sai.css b/sai/modules/saistart_sys_sai/css/saistart_sys_sai.css index e20bd8d..ac456b3 100644 --- a/sai/modules/saistart_sys_sai/css/saistart_sys_sai.css +++ b/sai/modules/saistart_sys_sai/css/saistart_sys_sai.css @@ -2,6 +2,11 @@ /* width: 1250px;*/ } +#sai_datetime { + font-weight: bold; + text-align: right; +} + #container_top .well{ /* height: 220px;*/ /* min-width: 250px;*/ diff --git a/sai/modules/saistart_sys_sai/saistart_sys_sai.php b/sai/modules/saistart_sys_sai/saistart_sys_sai.php index 4a69f7f..4144b5a 100644 --- a/sai/modules/saistart_sys_sai/saistart_sys_sai.php +++ b/sai/modules/saistart_sys_sai/saistart_sys_sai.php @@ -21,9 +21,15 @@ class saistart_sys_sai extends \SYSTEM\SAI\SaiModule { } protected static function html_content(){ + //create timestamp + $week_number = date("W", time()); + $date = date("l M Y", time()); + if(!\SYSTEM\SECURITY\Security::isLoggedIn() || !\SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI)){ return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saistart_sys_sai/tpl/content.tpl'));} $vars = array(); + $vars['week_number'] = $week_number; + $vars['date'] = $date; $vars['project_name'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_PROJECT); $vars['project_url'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL); $vars['analytics'] = \SYSTEM\SAI\saimod_sys_log::analytics(); diff --git a/sai/modules/saistart_sys_sai/tpl/content_loggedin.tpl b/sai/modules/saistart_sys_sai/tpl/content_loggedin.tpl index 4d821c3..8ae0d9d 100644 --- a/sai/modules/saistart_sys_sai/tpl/content_loggedin.tpl +++ b/sai/modules/saistart_sys_sai/tpl/content_loggedin.tpl @@ -1,6 +1,7 @@

    ${sai_start_welcome}

    ${sai_start_welcome_description}


    +
    Week of the year: ${week_number}, ${date}
    From 63d4ca2ff882f30fdc930ae94373dfbabf3e5c99 Mon Sep 17 00:00:00 2001 From: Messerbill Date: Sat, 20 Jun 2015 14:47:09 +0200 Subject: [PATCH 19/24] =?UTF-8?q?UI:=20ToDo=20Suchfelder=20und=20content?= =?UTF-8?q?=20ein=20st=C3=BCck=20herabsetzen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sai/modules/saimod_sys_todo/tpl/saimod_sys_todo.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sai/modules/saimod_sys_todo/tpl/saimod_sys_todo.tpl b/sai/modules/saimod_sys_todo/tpl/saimod_sys_todo.tpl index 590e29f..21993ae 100644 --- a/sai/modules/saimod_sys_todo/tpl/saimod_sys_todo.tpl +++ b/sai/modules/saimod_sys_todo/tpl/saimod_sys_todo.tpl @@ -10,7 +10,7 @@ -
    +
    \ No newline at end of file From a2224b12cec1f03b51011e5b6b7190ffb5a4be4a Mon Sep 17 00:00:00 2001 From: Messerbill Date: Sat, 20 Jun 2015 15:01:17 +0200 Subject: [PATCH 20/24] fixed: UI bug: Textmodul tablesort --- .../tpl/saimod_sys_text_list.tpl | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/sai/modules/saimod_sys_text/tpl/saimod_sys_text_list.tpl b/sai/modules/saimod_sys_text/tpl/saimod_sys_text_list.tpl index 500f2ee..10f7cc4 100644 --- a/sai/modules/saimod_sys_text/tpl/saimod_sys_text_list.tpl +++ b/sai/modules/saimod_sys_text/tpl/saimod_sys_text_list.tpl @@ -6,17 +6,21 @@
    ${basic_rows}: ${count} ${basic_page}: ${page}
    - - - - - - - - - - - ${entries} +
    ${table_id}${table_lang}${table_text}${table_author}${table_time_create}${table_author_edit}${table_time_edit}
    + + + + + + + + + + + + + ${entries} +
    ${table_id}${table_lang}${table_text}${table_author}${table_time_create}${table_author_edit}${table_time_edit}
    • «
    • From 3744e825517c644684b2d202d0c6b68d6c1cae56 Mon Sep 17 00:00:00 2001 From: Messerbill Date: Sat, 20 Jun 2015 15:20:06 +0200 Subject: [PATCH 21/24] =?UTF-8?q?UI:=20Projektmen=C3=BC=20redesign?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sai/page/css/sai.css | 4 ++++ sai/page/tpl/sai.tpl | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sai/page/css/sai.css b/sai/page/css/sai.css index 0fe8afe..ddcac5d 100644 --- a/sai/page/css/sai.css +++ b/sai/page/css/sai.css @@ -31,6 +31,10 @@ .sai_main_menu { border-radius: 3px 3px 3px 0; } + +.nav-tabs { + border: none; +} /* auto collapsing navbar */ #sys_autocollapse.collapsed .navbar-header { float: none; diff --git a/sai/page/tpl/sai.tpl b/sai/page/tpl/sai.tpl index ec49131..1d4061d 100644 --- a/sai/page/tpl/sai.tpl +++ b/sai/page/tpl/sai.tpl @@ -36,7 +36,8 @@
    -
    From fa8e6e46352ace8ada9aee2beab45001fc0f88ad Mon Sep 17 00:00:00 2001 From: Messerbill Date: Sat, 20 Jun 2015 15:25:57 +0200 Subject: [PATCH 22/24] stylefix saistart --- sai/modules/saistart_sys_sai/css/saistart_sys_sai.css | 1 - sai/modules/saistart_sys_sai/tpl/content_loggedin.tpl | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sai/modules/saistart_sys_sai/css/saistart_sys_sai.css b/sai/modules/saistart_sys_sai/css/saistart_sys_sai.css index ac456b3..4d8ee3c 100644 --- a/sai/modules/saistart_sys_sai/css/saistart_sys_sai.css +++ b/sai/modules/saistart_sys_sai/css/saistart_sys_sai.css @@ -6,7 +6,6 @@ font-weight: bold; text-align: right; } - #container_top .well{ /* height: 220px;*/ /* min-width: 250px;*/ diff --git a/sai/modules/saistart_sys_sai/tpl/content_loggedin.tpl b/sai/modules/saistart_sys_sai/tpl/content_loggedin.tpl index 8ae0d9d..6c535a8 100644 --- a/sai/modules/saistart_sys_sai/tpl/content_loggedin.tpl +++ b/sai/modules/saistart_sys_sai/tpl/content_loggedin.tpl @@ -1,7 +1,7 @@

    ${sai_start_welcome}

    ${sai_start_welcome_description}


    -
    Week of the year: ${week_number}, ${date}
    +
    Week of the year: ${week_number}, ${date}
    From 83b960cb5b42c1446be902f316a842a0bea0809c Mon Sep 17 00:00:00 2001 From: rylon Date: Sat, 20 Jun 2015 16:30:56 +0200 Subject: [PATCH 23/24] saimod start search buttons work --- sai/modules/saimod_sys_log/js/saimod_sys_log.js | 4 ++-- .../tpl/saimod_sys_log_filter.tpl | 4 ++-- .../saimod_sys_todo/js/saimod_sys_todo.js | 4 ++-- sai/modules/saimod_sys_todo/tpl/todo_list.tpl | 4 ++-- .../saistart_sys_sai/js/saistart_sys_sai.js | 17 ++++++++++++++--- 5 files changed, 22 insertions(+), 11 deletions(-) diff --git a/sai/modules/saimod_sys_log/js/saimod_sys_log.js b/sai/modules/saimod_sys_log/js/saimod_sys_log.js index 61d10f9..f71b785 100644 --- a/sai/modules/saimod_sys_log/js/saimod_sys_log.js +++ b/sai/modules/saimod_sys_log/js/saimod_sys_log.js @@ -9,8 +9,8 @@ function init_saimod_sys_log() { }; function register_search(){ - $('#btn_search').click(function(){ - system.load($(this).attr('state')+$('#input_search').val(),true); + $('#btn_search_log').click(function(){ + system.load($(this).attr('state')+$('#input_search_log').val(),true); }); } diff --git a/sai/modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl b/sai/modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl index a39cc82..947a271 100644 --- a/sai/modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl +++ b/sai/modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl @@ -1,8 +1,8 @@
    ${basic_rows}: ${count} ${basic_page}: ${page}
    diff --git a/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js b/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js index 33d6472..4c1939f 100644 --- a/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js +++ b/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js @@ -21,8 +21,8 @@ function init_saimod_sys_todo() { }; function register_search(){ - $('#btn_search').click(function(){ - system.load($(this).attr('state')+$('#input_search').val(),true); + $('#btn_search_todo').click(function(){ + system.load($(this).attr('state')+$('#input_search_todo').val(),true); }); } diff --git a/sai/modules/saimod_sys_todo/tpl/todo_list.tpl b/sai/modules/saimod_sys_todo/tpl/todo_list.tpl index bc01691..32419f4 100644 --- a/sai/modules/saimod_sys_todo/tpl/todo_list.tpl +++ b/sai/modules/saimod_sys_todo/tpl/todo_list.tpl @@ -7,8 +7,8 @@
  • ${basic_generated}
  • ${basic_user}
  • ${basic_report}
  • - - + +
    ${basic_rows}: ${count} ${basic_page}: ${page}
    diff --git a/sai/modules/saistart_sys_sai/js/saistart_sys_sai.js b/sai/modules/saistart_sys_sai/js/saistart_sys_sai.js index 5f64407..40fd629 100644 --- a/sai/modules/saistart_sys_sai/js/saistart_sys_sai.js +++ b/sai/modules/saistart_sys_sai/js/saistart_sys_sai.js @@ -1,5 +1,4 @@ -//function init__SYSTEM_SAI_saistart_sys_sai() { -function init_saistart_sys_sai() { +function init_saistart_sys_sai() { var heights = $(".inner-page").map(function() { return $(this).height(); @@ -40,4 +39,16 @@ function init_saistart_sys_sai() { } }); -}; \ No newline at end of file +}; + +function init_saistart_sys_sai_todo(){ + $('#btn_search_todo').click(function(){ + system.load($(this).attr('state')+$('#input_search_todo').val(),true); + }); +} + +function init_saistart_sys_sai_log(){ + $('#btn_search_log').click(function(){ + system.load($(this).attr('state')+$('#input_search_log').val(),true); + }); +} \ No newline at end of file From 3becacffb5e180908f33d5b38312f5fe90362676 Mon Sep 17 00:00:00 2001 From: rylon Date: Sat, 20 Jun 2015 16:53:30 +0200 Subject: [PATCH 24/24] missing page references for saistart --- dbd/sql/mysql/data/system_page.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbd/sql/mysql/data/system_page.sql b/dbd/sql/mysql/data/system_page.sql index ce12354..a45e84a 100644 --- a/dbd/sql/mysql/data/system_page.sql +++ b/dbd/sql/mysql/data/system_page.sql @@ -1,6 +1,6 @@ INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (0, 42, 'start', 'start', -1, 0, 0, '#content', './sai.php?sai_mod=.SYSTEM.SAI.saistart_sys_sai', 'init_saistart_sys_sai', '\\SYSTEM\\SAI\\saistart_sys_sai'); -INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (1, 42, 'todo', 'start', 0, 1, 0, '#todo_entries', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_todo&action=todolist', '', ''); -INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (2, 42, 'log', 'start', 0, 1, 0, '#log_entries', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_log&action=filter', '', ''); +INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (1, 42, 'todo', 'start', 0, 1, 0, '#todo_entries', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_todo&action=todolist', 'init_saistart_sys_sai_todo', '\\SYSTEM\\SAI\\saistart_sys_sai'); +INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (2, 42, 'log', 'start', 0, 1, 0, '#log_entries', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_log&action=filter', 'init_saistart_sys_sai_log', '\\SYSTEM\\SAI\\saistart_sys_sai'); INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (10, 42, 'api', 'api', -1, 0, 0, '#content', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_api', 'init_saimod_sys_api', '\\SYSTEM\\SAI\\saimod_sys_api'); INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (11, 42, 'all', 'api', 10, 0, 0, '#tab_api', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_api&action=list&group=${group}', 'init_saimod_sys_api_list', '\\SYSTEM\\SAI\\saimod_sys_api');