Skip to content

Commit

Permalink
Fixes opendocman#10 - update process improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenlawrence committed Aug 8, 2015
1 parent 38566b4 commit 77d4d5d
Show file tree
Hide file tree
Showing 22 changed files with 726 additions and 616 deletions.
2 changes: 1 addition & 1 deletion Plugin_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function getPluginsList()
$curdir = dirname(__FILE__);
if ($handle = opendir($curdir . '/plug-ins')) {
while (false !== ($file = readdir($handle))) {
if (file != 'index.html' && $file != '.htaccess' && $file != "." && $file != ".." && $file != '.svn' && is_file('plug-ins/' . $file . '/' . $file . '_class.php')) {
if ($file != 'index.html' && $file != '.htaccess' && $file != "." && $file != ".." && $file != '.svn' && is_file('plug-ins/' . $file . '/' . $file . '_class.php')) {
array_push($pluginslist, $file);
}
}
Expand Down
21 changes: 21 additions & 0 deletions Settings_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,5 +172,26 @@ public function getUserIdNums()

return $result;
}

public static function get_db_version($prefix = '')
{
global $pdo;
if(empty($prefix)) {
$prefix = !empty($_SESSION['db_prefix']) ? $_SESSION['db_prefix'] : $GLOBALS['CONFIG']['db_prefix'];
}
$query1 = "SHOW TABLES LIKE :table";
$stmt = $pdo->prepare($query1);
$stmt->execute(array(':table' => $prefix . 'odmsys'));

if ($stmt->rowCount() > 0) {
$query2 = "SELECT sys_value from {$prefix}odmsys WHERE sys_name='version'";
$stmt = $pdo->prepare($query2);
$stmt->execute();
$result_array = $stmt->fetch();
}

$db_version = (!empty($result_array['sys_value']) ? $result_array['sys_value'] : 'Unknown');
return $db_version;
}
}
}
8 changes: 6 additions & 2 deletions admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,17 @@
<td>
<table>
<tr>
<th bgcolor ="#83a9f7"><font color="#FFFFFF"><?php echo msg('message_latest_version');
<th bgcolor ="#83a9f7"><font color="#FFFFFF"><?php echo msg('adminpage_about_section_title');
?></font></th>
</tr>
<tr>
<td><b><?php echo $GLOBALS['CONFIG']['current_version'];
<td><b><?php echo msg('adminpage_about_section_app_version') . ": " . $GLOBALS['CONFIG']['current_version'];
?></b></td>
</tr>
<tr>
<td><b><?php echo msg('adminpage_about_section_db_version') . ": " . Settings::get_db_version();
?></b></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
Expand Down
5 changes: 1 addition & 4 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,7 @@ function draw_header($pageTitle, $lastmessage='')
$GLOBALS['smarty']->assign('page_title', $pageTitle);
$GLOBALS['smarty']->assign('lastmessage', htmlspecialchars($lastmessage));
display_smarty_template('header.tpl');

if (is_dir('install')) {
echo '<span style="color: red;">' . msg('install_folder') . '</span>';
}

}

function draw_error($message)
Expand Down
4 changes: 2 additions & 2 deletions includes/language/DataTables/datatables.french.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"sProcessing": "Traitement en cours...",
"sLengthMenu": "Afficher _MENU_ éléments",
"sZeroRecords": "Auncun enregistrement pour cette requête",
"sInfo": "Afficher de _START_ à _END_ éléments sur un total de _TOTAL_ entries",
"sInfo": "Afficher de _START_ à _END_ éléments sur un total de _TOTAL_ entrées",
"sInfoEmpty": "Afficher de 0 à 0 éléments sur un total de 0 ",
"sInfoFiltered": "(Filtré sur _MAX_ éléments au total)",
"sInfoPostFix": "",
Expand All @@ -11,7 +11,7 @@
"oPaginate": {
"sFirst": "Premier",
"sPrevious": "Précédent",
"sNext": SuivantNext",
"sNext": "Suivant",
"sLast": "Dernier"
}
}
13 changes: 12 additions & 1 deletion includes/language/arabic.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
//Login
$lang['anonymous_link'] = 'انقر هنالعرض الملفات العامة';
$lang['forgotpassword'] = 'تغيير كلمة المرور';
$lang['install_folder'] = 'Security Notice: If you already installed/updated then you should remove the \'install\' folder before proceeding';
$lang['signup'] = 'إنشاء حساب جديد';
$lang['welcome'] = 'نظام التوثيق الآلي';
$lang['welcome2'] = 'الدخول للنظام';
Expand Down Expand Up @@ -374,6 +373,10 @@
$lang['editpage_write'] = 'كتابة';
$lang['editpage_admin'] = 'مسئول';

// File Permissions Page
$lang['filepermissionspage_edit_department_permissions'] = 'Edit Department Permissions';
$lang['filepermissionspage_edit_user_permissions'] = 'Edit User Permissions';

// Delete/Undeleta Admin Page
$lang['undeletepage_file_permanently_deleted'] = 'تم حذف الملف بشكل نهائي';
$lang['undeletepage_file_undeleted'] = 'تم إلغاء حذف الملف';
Expand Down Expand Up @@ -458,6 +461,9 @@
$lang['userpage_yes'] = 'نعم';

// Admin Page
$lang['adminpage_about_section_title'] = 'About';
$lang['adminpage_about_section_app_version'] = 'App Version';
$lang['adminpage_about_section_db_version'] = 'Database Version';
$lang['adminpage_edit_filetypes'] = 'تحرير نوعية الملف';
$lang['adminpage_edit_settings'] = 'تحرير الاعدادات';
$lang['adminpage_reports'] = 'تقارير';
Expand Down Expand Up @@ -485,3 +491,8 @@

//Search Page
$lang['searchpage_all_meta'] = 'بحث في الحقول الرئيسية';

// Footer
$lang['footer_support'] = 'Support';
$lang['footer_feedback'] = 'Feedback';
$lang['footer_bugs'] = 'Bugs';
4 changes: 3 additions & 1 deletion includes/language/bangla.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
//Login
$lang['anonymous_link'] = 'অজ্ঞাতপরিচয় হিসাবে সার্বজনীন ফাইল দেখতে এখানে ক্লিক করুন';
$lang['forgotpassword'] = 'কূটশব্দ ভুলেছেন?';
$lang['install_folder'] = 'নিরাপত্তা বিজ্ঞপ্তিঃ ইতিমধ্যেই যদা সংস্থাপন/কিংবা পরিবর্ধন করে থাকেন তাহলে অগ্রসর হওয়ার পূ্র্বেই অবশ্যই \'install\' ফোল্ডারটি মুছে ফেলুন ';
$lang['signup'] = 'একাউন্টের জন্য যোগ দিন';
$lang['welcome'] = 'OpenDocMan এ সুস্বাগতম';
$lang['welcome2'] = 'সিস্টেমের শক্তিশালী সংরক্ষণাগার, প্রকাশনা এবং রিভিসন নিয়ন্ত্রণ বৈশিষ্ট্য ব্যবহার করার জন্য প্রবেশ করুন।';
Expand Down Expand Up @@ -460,6 +459,9 @@
$lang['userpage_yes'] = 'হ্যাঁ';

// Admin Page
$lang['adminpage_about_section_title'] = 'About';
$lang['adminpage_about_section_app_version'] = 'App Version';
$lang['adminpage_about_section_db_version'] = 'Database Version';
$lang['adminpage_edit_filetypes'] = 'ফাইলের ধরণ সম্পাদনা';
$lang['adminpage_edit_settings'] = 'নিয়ামক সম্পাদনা';
$lang['adminpage_reports'] = 'প্রতিবেদনসমূহ';
Expand Down
4 changes: 3 additions & 1 deletion includes/language/chinese.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
//Login
$lang['anonymous_link'] = '匿名查看公共文件点这里';
$lang['forgotpassword'] = '忘记密码?';
$lang['install_folder'] = '安全注意:如果你已完成安装或升级请移除install目录';
$lang['signup'] = '申请账号';
$lang['welcome'] = '欢迎进入OpenDocMan';
$lang['welcome2'] = '登录进来开始使用本系统强大的文档存储,发布和版本控制功能';
Expand Down Expand Up @@ -461,6 +460,9 @@
$lang['userpage_yes'] = 'Yes';

// Admin Page
$lang['adminpage_about_section_title'] = 'About';
$lang['adminpage_about_section_app_version'] = 'App Version';
$lang['adminpage_about_section_db_version'] = 'Database Version';
$lang['adminpage_edit_filetypes'] = 'Edit file types';
$lang['adminpage_edit_settings'] = 'Edit settings';
$lang['adminpage_reports'] = 'Reports';
Expand Down
4 changes: 3 additions & 1 deletion includes/language/croatian.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
//Login
$lang['anonymous_link'] = 'Kliknite ovdje kako biste anonimno gledali javne datoteke';
$lang['forgotpassword'] = 'Zaboravili ste lozinku?';
$lang['install_folder'] = 'Sigurnosno upozorenje: Ako ste već instalirali/nadogradili program, trebali biste izbrisati \'install\' direktorij prije nego nastavite dalje';
$lang['signup'] = 'Registrirajte račun';
$lang['welcome'] = 'Dobro došli u OpenDocMan.';
$lang['welcome2'] = 'Prijavite se kako biste počeli koristiti moćnu sistemsku pohranu podataka, objavljivanje i kontrolu promjena nad datotekama.';
Expand Down Expand Up @@ -461,6 +460,9 @@
$lang['userpage_yes'] = 'Da';

// Admin Page
$lang['adminpage_about_section_title'] = 'About';
$lang['adminpage_about_section_app_version'] = 'App Version';
$lang['adminpage_about_section_db_version'] = 'Database Version';
$lang['adminpage_edit_settings'] = 'Uredi postavke';
$lang['adminpage_edit_filetypes'] = 'Uredi tipove datoteka';
$lang['adminpage_reports'] = 'Izvještaji';
Expand Down
4 changes: 3 additions & 1 deletion includes/language/czech.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
//Login
$lang['anonymous_link'] = 'Klikněte zde pro prohlížení veřejných souborů';
$lang['forgotpassword'] = 'Zapoměli jste heslo?';
$lang['install_folder'] = 'Varování: Pokud jste instalovali/updatovali OpenDocMan měli by jste odebrat adresář \'install\' před další prací';
$lang['signup'] = 'Vytvořit účet';
$lang['welcome'] = 'Vítejte ve správě dokumentů';
$lang['welcome2'] = 'Přihlaste se pro použití systému.';
Expand Down Expand Up @@ -461,6 +460,9 @@
$lang['userpage_yes'] = 'Ano';

// Admin Page
$lang['adminpage_about_section_title'] = 'About';
$lang['adminpage_about_section_app_version'] = 'App Version';
$lang['adminpage_about_section_db_version'] = 'Database Version';
$lang['adminpage_edit_filetypes'] = 'Upravit typy souborů';
$lang['adminpage_edit_settings'] = 'Upravit nastavení';
$lang['adminpage_reports'] = 'Záznamy';
Expand Down
4 changes: 3 additions & 1 deletion includes/language/danish.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
//Login
$lang['anonymous_link'] = 'Klik her for at se offentlige filer anonymt';
$lang['forgotpassword'] = 'Glemt dit password?';
$lang['install_folder'] = 'Sikkerhedsbesked: Hvis du allerede har installeret/opdateret, så bør du slette folderen \'install\' før du fortsætter';
$lang['signup'] = 'Log ind til en konto';
$lang['welcome'] = 'Velkommen til OpenDocMan';
$lang['welcome2'] = 'Log ind for at begynde med at bruge systemet\'s kraftige lagrings-, publiserings- og revisionskontrolegenskaber.';
Expand Down Expand Up @@ -461,6 +460,9 @@
$lang['userpage_yes'] = 'Ja';

// Admin Page
$lang['adminpage_about_section_title'] = 'About';
$lang['adminpage_about_section_app_version'] = 'App Version';
$lang['adminpage_about_section_db_version'] = 'Database Version';
$lang['adminpage_edit_filetypes'] = 'Editer filtyper';
$lang['adminpage_edit_settings'] = 'Editer indstillinger';
$lang['adminpage_reports'] = 'Rapporter';
Expand Down
4 changes: 3 additions & 1 deletion includes/language/dutch.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
//Login
$lang['anonymous_link'] = 'Klik hier om de bestanden te bekijken waarvoor u niet hoeft in te loggen';
$lang['forgotpassword'] = 'Wachtwoord vergeten?';
$lang['install_folder'] = 'LET OP: Als u al geïnstalleerd/ge-updated hebt, verwijder dan de map \'install\' voordat u verder gaat';
$lang['signup'] = 'Meld u aan voor een account';
$lang['welcome'] = 'Welkom bij OpenDocMan';
$lang['welcome2'] = 'Log in met uw gebruikersnaam om de krachtige opslag-, versiecontrole- en redactiemogelijkheden van OpenDocMan te benutten.';
Expand Down Expand Up @@ -460,6 +459,9 @@
$lang['userpage_yes'] = 'Yes';

// Admin Page
$lang['adminpage_about_section_title'] = 'About';
$lang['adminpage_about_section_app_version'] = 'App Version';
$lang['adminpage_about_section_db_version'] = 'Database Version';
$lang['adminpage_edit_filetypes'] = 'Edit file types';
$lang['adminpage_edit_settings'] = 'Edit settings';
$lang['adminpage_reports'] = 'Reports';
Expand Down
14 changes: 8 additions & 6 deletions includes/language/english.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@
//Login
$lang['anonymous_link'] = 'Click here to view public files anonymously';
$lang['forgotpassword'] = 'Forgot your password?';
$lang['install_folder'] = 'Security Notice: If you already installed/updated then you should remove the \'install\' folder before proceeding';
$lang['signup'] = 'Sign-up for an account';
$lang['welcome'] = 'Welcome to OpenDocMan';
$lang['welcome2'] = 'Log in to begin using the system\'s powerful storage, publishing and revision control features.';
$lang['welcome_anonymous_title'] = 'OpenDocMan Anonymous Page: List All';
$lang['welcome_anonymous_h1'] = 'OpenDocMan Anonymous Page';
$lang['welcome'] = 'Welcome.';
$lang['welcome2'] = 'Log in to begin.';
$lang['welcome_anonymous_title'] = 'Anonymous Page: List All';
$lang['welcome_anonymous_h1'] = 'Anonymous Page';

//GLOBAL TERMS
$lang['action'] = 'Action';
Expand Down Expand Up @@ -460,6 +459,9 @@
$lang['userpage_yes'] = 'Yes';

// Admin Page
$lang['adminpage_about_section_title'] = 'About';
$lang['adminpage_about_section_app_version'] = 'App Version';
$lang['adminpage_about_section_db_version'] = 'Database Version';
$lang['adminpage_edit_filetypes'] = 'Edit file types';
$lang['adminpage_edit_settings'] = 'Edit settings';
$lang['adminpage_reports'] = 'Reports';
Expand Down Expand Up @@ -491,4 +493,4 @@
// Footer
$lang['footer_support'] = 'Support';
$lang['footer_feedback'] = 'Feedback';
$lang['footer_bugs'] = 'Bugs';
$lang['footer_bugs'] = 'Bugs';
Loading

0 comments on commit 77d4d5d

Please sign in to comment.