Skip to content
Browse files

fixes

  • Loading branch information...
1 parent a4c08f2 commit 4e8d54ab24c321e4ac7a8a1f8bbb61bb9c65abae Hmayak Tigranyan committed Oct 4, 2013
View
3 .gitignore
@@ -1,4 +1,5 @@
/nbproject
-/media
+/media/*
+/media/filemanager/*
/conf/sysconf.php
/www/images/uploads
View
8 conf/conf_meta.php
@@ -1,10 +1,10 @@
<?php
# set the changeable $conf
$alt_conf=array(/*"base_uuid","acl_base","root_name",
-"root_email","root_tel","db_host","db_port",*/ "theme"=>_t("Theme"),
-/*"db_name","db_user","db_pass","debug" ,*/"session_writer"=>_t("Session writer"),
-"session_name"=>_t("Session name"),"session_timeout"=>_t("Session timeout"),/*"dbal_lib_name","db_engine","storage_engine",
-"enable_cache","cache_dir","locale",*/ "locale_lib"=>_t("Locale lib"),/*
+"root_email","root_tel","db_host","db_port",*/ /*"theme"=>_t("Theme"),*/
+/*"db_name","db_user","db_pass","debug" ,"session_writer"=>_t("Session writer"),
+"session_name"=>_t("Session name"),*/"session_timeout"=>_t("Session timeout"),/*"dbal_lib_name","db_engine","storage_engine",
+"enable_cache","cache_dir","locale","locale_lib"=>_t("Locale lib"),
"fb_locale","custom_form","related_search", "media_dir",
"media_mode" */
"use_recaptcha"=>_t("Use reCAPTCHA "),"recaptcha_public_key"=>_t("reCAPTCHA Public Key"),
View
40 inc/lib_util.inc
@@ -611,42 +611,42 @@ function getDefaultMenuItems() {
if ($module == "events") {
- $id = (isset($_GET['eid'])) ? $_GET['eid'] : $_SESSION['eid'];
+ $eid = (isset($_GET['eid'])) ? $_GET['eid'] : $_SESSION['eid'];
} elseif ($module == "person") {
- $id = (isset($_GET['pid'])) ? $_GET['pid'] : $_SESSION['pid'];
+ $pid = (isset($_GET['pid'])) ? $_GET['pid'] : $_SESSION['pid'];
} elseif ($module == "docu") {
- $id = (isset($_GET['doc_id'])) ? $_GET['doc_id'] : $_SESSION['doc_id'];
+ $doc_id = (isset($_GET['doc_id'])) ? $_GET['doc_id'] : $_SESSION['doc_id'];
}
$defaultMenuItems = array(
"eventsbrowse" => array("level" => 0, "title" => _t('EVENTS'), "aclmod" => "events", "url" => get_url('events', 'browse', null, null, null, true), "module" => "events", "action" => "browse",
"checkactive"=>"checkMenuActiveModule"),
"get_event" => array("level" => 1, "title" => _t('EVENT_DESCRIPTION'), "aclmod" => "events", "parent" => "eventsbrowse",
- "url" => get_url('events', 'get_event', null, array('eid' => $id), null, true), "module" => "events", "action" => "get_event",
+ "url" => get_url('events', 'get_event', null, array('eid' => $eid), null, true), "module" => "events", "action" => "get_event",
"aliases" => array("new_event", "edit_event", "delete_event")),
"vp_list" => array("level" => 1, "title" => _t('VICTIMS_AND_PERPETRATORS'), "aclmod" => "events", "parent" => "eventsbrowse",
- "url" => get_url('events', 'vp_list', null, array('eid' => $id), null, true), "module" => "events", "action" => "vp_list",
+ "url" => get_url('events', 'vp_list', null, array('eid' => $eid), null, true), "module" => "events", "action" => "vp_list",
"aliases" => array("add_act", "add_ad", "add_involvement", "add_perpetrator", "add_victim",
"delete_act", "delete_ad", "edit_act",
"edit_ad", "edit_involvement", "edit_perpetrator", "edit_victim")),
"src_list" => array("level" => 1, "title" => _t('SOURCES'), "aclmod" => "events", "parent" => "eventsbrowse",
- "url" => get_url('events', 'src_list', null, array('eid' => $id), null, true), "module" => "events", "action" => "src_list",
+ "url" => get_url('events', 'src_list', null, array('eid' => $eid), null, true), "module" => "events", "action" => "src_list",
"aliases" => array("add_information", "add_source", "delete_information", "edit_information", "edit_source",)),
"intv_list" => array("level" => 1, "title" => _t('INTERVENTIONS'), "aclmod" => "events", "parent" => "eventsbrowse",
- "url" => get_url('events', 'intv_list', null, array('eid' => $id), null, true), "module" => "events", "action" => "intv_list",
+ "url" => get_url('events', 'intv_list', null, array('eid' => $eid), null, true), "module" => "events", "action" => "intv_list",
"aliases" => array("add_intv", "add_intv_party", "delete_intervention", "edit_intv", "edit_intv_party",
)),
"coe_list" => array("level" => 1, "title" => _t('CHAIN_OF_EVENTS'), "aclmod" => "events", "parent" => "eventsbrowse",
- "url" => get_url('events', 'coe_list', null, array('eid' => $id), null, true), "module" => "events", "action" => "coe_list",
+ "url" => get_url('events', 'coe_list', null, array('eid' => $eid), null, true), "module" => "events", "action" => "coe_list",
"aliases" => array("add_coe", "delete_coe", "edit_coe")),
"event_doc_list" => array("level" => 1, "title" => _t('DOCUMENTS'), "aclmod" => "events", "parent" => "eventsbrowse",
- "url" => get_url('events', 'doc_list', null, array('eid' => $id), null, true), "module" => "events", "action" => "doc_list",
+ "url" => get_url('events', 'doc_list', null, array('eid' => $eid), null, true), "module" => "events", "action" => "doc_list",
"aliases" => array()),
"event_audit" => array("level" => 1, "title" => _t('AUDIT_LOG'), "aclmod" => "events", "parent" => "eventsbrowse",
- "url" => get_url('events', 'audit', null, array('eid' => $id), null, true), "module" => "events", "action" => "audit",
+ "url" => get_url('events', 'audit', null, array('eid' => $eid), null, true), "module" => "events", "action" => "audit",
"aliases" => array()),
"event_permissions" => array("level" => 1, "title" => _t('PERMISSIONS'), "aclmod" => "events", "parent" => "eventsbrowse",
- "url" => get_url('events', 'permissions', null, array('eid' => $id), null, true), "module" => "events", "action" => "permissions",
+ "url" => get_url('events', 'permissions', null, array('eid' => $eid), null, true), "module" => "events", "action" => "permissions",
"aliases" => array(), "check" => create_function("", 'global $event;
if ($event->confidentiality == "y") {
@@ -668,26 +668,26 @@ return false;')),
}
return false;')),
"person" => array("level" => 1, "title" => _t('PERSON_RECORDS_S_'), "aclmod" => "person", "parent" => "personsbrowse",
- "url" => get_url('person', 'person', null, array('pid' => $id), null, true), "module" => "person", "action" => "person",
+ "url" => get_url('person', 'person', null, array('pid' => $pid), null, true), "module" => "person", "action" => "person",
"aliases" => array("new_person", "delete_person", "edit_person")),
"person_address_list" => array("level" => 1, "title" => _t('PERSON_ADDRESS_ES_'), "aclmod" => "person", "parent" => "personsbrowse",
- "url" => get_url('person', 'address_list', null, array('pid' => $id), null, true), "module" => "person", "action" => "address_list",
+ "url" => get_url('person', 'address_list', null, array('pid' => $pid), null, true), "module" => "person", "action" => "address_list",
"aliases" => array("delete_address",
"new_address",
"edit_address",)),
"person_biography_list" => array("level" => 1, "title" => _t('BIOGRAPHIC_DETAIL_S_'), "aclmod" => "person", "parent" => "personsbrowse",
- "url" => get_url('person', 'biography_list', null, array('pid' => $id), null, true), "module" => "person", "action" => "biography_list",
+ "url" => get_url('person', 'biography_list', null, array('pid' => $pid), null, true), "module" => "person", "action" => "biography_list",
"aliases" => array("delete_biographic",
"edit_biography",
"new_biography")),
"person_role_list" => array("level" => 1, "title" => _t('ROLE_LIST'), "aclmod" => "person", "parent" => "personsbrowse",
- "url" => get_url('person', 'role_list', null, array('pid' => $id), null, true), "module" => "person", "action" => "role_list",
+ "url" => get_url('person', 'role_list', null, array('pid' => $pid), null, true), "module" => "person", "action" => "role_list",
"aliases" => array()),
"person_audit_log" => array("level" => 1, "title" => _t('AUDIT_LOG'), "aclmod" => "person", "parent" => "personsbrowse",
- "url" => get_url('person', 'audit_log', null, array('pid' => $id), null, true), "module" => "person", "action" => "audit_log",
+ "url" => get_url('person', 'audit_log', null, array('pid' => $pid), null, true), "module" => "person", "action" => "audit_log",
"aliases" => array()),
"person_permissions" => array("level" => 1, "title" => _t('PERMISSIONS'), "aclmod" => "person", "parent" => "personsbrowse",
- "url" => get_url('person', 'permissions', null, array('pid' => $id), null, true), "module" => "person", "action" => "permissions",
+ "url" => get_url('person', 'permissions', null, array('pid' => $pid), null, true), "module" => "person", "action" => "permissions",
"aliases" => array(), "check" => create_function("", 'global $person;
if ($person->confidentiality == "y") {
@@ -697,15 +697,15 @@ return false;')),
"documentsbrowse" => array("level" => 0, "title" => _t('DOCUMENTS'), "aclmod" => "docu", "url" => get_url('docu', 'browse', null, null, null, true),
"module" => "docu", "action" => "browse","checkactive"=>"checkMenuActiveModule"),
"view_document" => array("level" => 1, "title" => _t('DOCUMENT_DETAILS'), "aclmod" => "docu", "parent" => "documentsbrowse",
- "url" => get_url('docu', 'view_document', null, array('doc_id' => $id), null, true), "module" => "docu", "action" => "view_document",
+ "url" => get_url('docu', 'view_document', null, array('doc_id' => $doc_id), null, true), "module" => "docu", "action" => "view_document",
"aliases" => array("new_document",
"delete_document",
"edit_document",)),
"document_link" => array("level" => 1, "title" => _t('LINKS'), "aclmod" => "docu", "parent" => "documentsbrowse",
- "url" => get_url('docu', 'link', null, array('doc_id' => $id), null, true), "module" => "docu", "action" => "link",
+ "url" => get_url('docu', 'link', null, array('doc_id' => $doc_id), null, true), "module" => "docu", "action" => "link",
"aliases" => array()),
"document_audit" => array("level" => 1, "title" => _t('AUDIT_LOG'), "aclmod" => "docu", "parent" => "documentsbrowse",
- "url" => get_url('docu', 'audit', null, array('doc_id' => $id), null, true), "module" => "docu", "action" => "audit",
+ "url" => get_url('docu', 'audit', null, array('doc_id' => $doc_id), null, true), "module" => "docu", "action" => "audit",
"aliases" => array()),
"biographybrowse" => array("level" => 0, "title" => _t('BIOGRAPHIC_DETAILS'), "aclmod" => "person", "url" => get_url('person', 'browse_biography', null, null, null, true),
"module" => "person", "action" => "browse_biography",'check'=>create_function('$menu','
View
6 inst/install.inc
@@ -19,12 +19,12 @@ if (!is_writable(APPROOT . 'media')) {
$media = '<span class="red">not writable</span>';
$file_check = true;
}
-/*
-if (!is_writable(WWWWROOT . "images" . DS . "uploads")) {
+
+if (!is_writable(APPROOT . 'media' . DS . "filemanager")) {
$continue = false;
$imagesuploads = '<span class="red">not writable</span>';
$file_check = true;
-}*/
+}
//check for password match
View
2 inst/install.tpl.php
@@ -67,7 +67,7 @@
<ul>
<li><?php echo APPROOT?>conf/ &nbsp; <?php echo $conf_dir; ?></li>
<li><?php echo APPROOT?>media/ &nbsp; <?php echo $media; ?></li>
- <li><?php echo WWWWROOT?>images/uploads/ &nbsp; <?php echo $imagesuploads; ?></li>
+ <li><?php echo APPROOT?>media/filemanager/ &nbsp; <?php echo $imagesuploads; ?></li>
</ul>
<br />
View
2 media/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
View
5 mod/admin/tpls/act_System_configuration.php
@@ -8,7 +8,10 @@
<script type="text/javascript" src="res/jquery/tinymce/4.0b3/jquery.tinymce.min.js"></script>
<script type="text/javascript" src="res/jquery/tinymce/4.0b3/tinymce.min.js"></script>
-
+ <center>
+ <br />
+ <button type="submit" class="btn btn-primary" name='submit' ><i class="icon-ok icon-white"></i> <?php echo _t('SAVE') ?></button>
+ </center>
<table class='table table-bordered table-striped table-hover'>
<thead>
<tr>
View
3 mod/admin/tpls/act_menu.php
@@ -7,6 +7,7 @@
<div class="sidebar-nav">
<div class="well" style="padding: 8px 5px;">
+ <label><?php echo _t('Click to add an item to a menu')?></label>
<?php
$menuItems = $defaulMenuItemsOrdered;
$count = count($menuItems);
@@ -21,7 +22,7 @@
$level = $element1['level'];
?>
- <label data-id="<?php echo $menu['slug']; ?>" class="menu-item-title checkbox" <?php if($level)echo "style='margin-left:".($level*15)."px'";?>>
+ <label data-id="<?php echo $menu['slug']; ?>" class="menu-item-title" <?php if($level)echo "style='margin-left:".($level*15)."px'";?>>
<a href="#" class="addmenulink has-spinner" data-slug="<?php echo $menu['slug'] ?>" data-title="<?php echo $menu['title'] ?>">
<span class="spinner"><i class="icon-spinner icon-spin"></i></span> <?php echo $menu['title']; ?></a>
</label>
View
18 mod/admin/tpls/sec_mod_sidebar.php
@@ -21,7 +21,9 @@
<li class="<?php if ($action == "mt_customization") echo "active" ?>"><a href="<?php get_url('admin', 'mt_customization') ?>"><?php echo _t('MICRO_THESAURI') ?></a></li>
<li class="subnav <?php if ($action == "new_mt") echo "active" ?>"><a href="<?php get_url('admin', 'new_mt') ?>"><?php echo _t('Add new Micro-thesauri') ?></a></li>
<li class="subnav <?php if ($action == "mt_translate") echo "active" ?>"><a href="<?php get_url('admin', 'mt_translate') ?>"><?php echo _t('Translate Micro-thesauri') ?></a></li>
-
+ <li class="<?php if ($action == "menu") echo "active" ?>">
+ <a href="<?php get_url('admin', 'menu') ?>"><?php echo _t('Menu') ?></a>
+ </li>
<li>
<a href="<?php get_url('admin', 'user_management') ?>"><?php echo _t('USER_MANAGEMENT') ?></a>
</li>
@@ -32,12 +34,10 @@
<!--
<li><a href="<?php get_url('admin', 'acl_mode') ?>"><?php echo _t('ACL_MODE') ?></a></li>
-->
- <li class="<?php if ($action == "menu") echo "active" ?>">
- <a href="<?php get_url('admin', 'menu') ?>"><?php echo _t('Menu') ?></a>
- </li>
+
<li class="<?php if ($action == "set_locale") echo "active" ?>">
- <a href="<?php get_url('admin', 'set_locale') ?>"><?php echo _t('LOCALIZATION') ?></a>
+ <a href="<?php get_url('admin', 'set_locale') ?>"><?php echo _t('Language') ?></a>
</li><!--
<ul>
<li><a href="<?php get_url('admin', 'set_locale') ?>"><?php echo _t('SET_LANGUAGE') ?></a></li>
@@ -60,10 +60,10 @@
<li class="<?php if ($action == "change_print") echo "active" ?>">
<a href="<?php get_url('admin', 'change_print') ?>"><?php echo _t('Print configuration') ?></a>
</li>
-<?php
-global $conf;
-if (isset($conf['extension'])) {
- ?>
+ <?php
+ global $conf;
+ if (isset($conf['extension'])) {
+ ?>
<li class="<?php if ($action == "Extensions") echo "active" ?>"><a href="<?php get_url('admin', 'Extensions') ?>"><?php echo _t('EXTENSIONS') ?></a></li>
<?php } ?>
</ul>
View
14 schema/mysql-dbcreate-system.sql
@@ -1,4 +1,14 @@
-DROP TABLE IF EXISTS user_code, user_profile, user;
+DROP TABLE IF EXISTS string_translations,user_code, user_profile, user;
+
+CREATE TABLE IF NOT EXISTS `string_translations` (
+ `language` varchar(50) NOT NULL,
+ `context` varchar(50) NOT NULL,
+ `name` varchar(160) NOT NULL,
+ `value` text NOT NULL,
+ `status` tinyint(4) NOT NULL,
+ PRIMARY KEY `context_name_language` (`context`,`name`,`language`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
+
create table IF NOT EXISTS user (
username varchar(255) not null,
@@ -10,9 +20,11 @@ create table IF NOT EXISTS user (
created datetime ,
last_login datetime,
status VARCHAR(10) default 'active',
+ `config` text,
primary key (username)
) ENGINE = InnoDB;
+
INSERT INTO user(username , password , salt ) VALUES('admin','6e5b5188b9a84d7d02cd94eabae281a0d2089d43','730b64da46ed81bf1a');
CREATE TABLE IF NOT EXISTS user_profile(
View
1 schema/upgrade-2.1-2.2.sql
@@ -1,3 +1,4 @@
+ALTER TABLE `user` ADD `config` text;
CREATE TABLE IF NOT EXISTS `string_translations` (
`language` varchar(50) NOT NULL,

0 comments on commit 4e8d54a

Please sign in to comment.
Something went wrong with that request. Please try again.