Skip to content

Commit

Permalink
Fixes opendocman#215 - writeable to writable
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenlawrence committed Aug 29, 2015
1 parent 546bf3b commit d893f0f
Show file tree
Hide file tree
Showing 22 changed files with 44 additions and 44 deletions.
10 changes: 5 additions & 5 deletions UserPermission_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ public function getAllowedFileIds($limit)
{
$viewable_array = $this->getViewableFileIds($limit);
$readable_array = $this->getReadableFileIds($limit);
$writeable_array = $this->getWriteableFileIds($limit);
$writable_array = $this->getWritableFileIds($limit);
$adminable_array = $this->getAdminableFileIds($limit);
$result_array = array_values(array_unique(array_merge($viewable_array, $readable_array, $writeable_array, $adminable_array)));
$result_array = array_values(array_unique(array_merge($viewable_array, $readable_array, $writable_array, $adminable_array)));
return $result_array;
}

Expand Down Expand Up @@ -157,7 +157,7 @@ public function getReadableFileOBJs($limit = true)
* @param bool $limit
* @return array
*/
public function getWriteableFileIds($limit = true)
public function getWritableFileIds($limit = true)
{
$user_perms_file_array = $this->user_perms_obj->getCurrentWriteRight($limit);
$dept_perms_file_array = $this->dept_perms_obj->getCurrentWriteRight($limit);
Expand All @@ -171,9 +171,9 @@ public function getWriteableFileIds($limit = true)
* @param bool $limit
* @return array
*/
public function getWriteableFileOBJs($limit = true)
public function getWritableFileOBJs($limit = true)
{
return $this->convertToFileDataOBJ($this->getWriteableFileIds($limit));
return $this->convertToFileDataOBJ($this->getWritableFileIds($limit));
}

/**
Expand Down
6 changes: 3 additions & 3 deletions add.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,14 @@ function is invoked. After the data is loaded for the chosen department, if the
exit;
}

// Check to make sure the dir is available and writeable
// Check to make sure the dir is available and writable
if (!is_dir($GLOBALS['CONFIG']['dataDir'])) {
$last_message=$GLOBALS['CONFIG']['dataDir'] . ' missing!';
header('Location:error.php?ec=23&last_message=' .$last_message);
exit;
} else {
if (!is_writeable($GLOBALS['CONFIG']['dataDir'])) {
$last_message=msg('message_folder_perms_error'). ': ' . $GLOBALS['CONFIG']['dataDir'] . ' ' . msg('message_not_writeable');
if (!is_writable($GLOBALS['CONFIG']['dataDir'])) {
$last_message=msg('message_folder_perms_error'). ': ' . $GLOBALS['CONFIG']['dataDir'] . ' ' . msg('message_not_writable');
header('Location:error.php?ec=23&last_message=' .$last_message);
exit;
}
Expand Down
2 changes: 1 addition & 1 deletion delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}
// all ok, proceed!
if (!is_dir($GLOBALS['CONFIG']['archiveDir'])) {
// Make sure directory is writeable
// Make sure directory is writable
if (!mkdir($GLOBALS['CONFIG']['archiveDir'], 0775)) {
$last_message='Could not create ' . $GLOBALS['CONFIG']['archiveDir'];
header('Location:error.php?ec=23&last_message=' .$last_message);
Expand Down
20 changes: 10 additions & 10 deletions includes/language/arabic.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@
$lang['label_username'] = 'إسم المستخدم';
$lang['label_action'] = 'اجراء';
$lang['label_date'] = 'تاريخ';
$lang['label_type_pr_sec'] = 'النوع'; //CHM
$lang['label_primary_type'] = 'أولي'; //CHM
$lang['label_sub_select_list'] = 'قائمة جزئية'; //CHM
$lang['label_type_pr_sec'] = 'النوع';
$lang['label_primary_type'] = 'أولي';
$lang['label_sub_select_list'] = 'قائمة جزئية';

// Messages
$lang['message_account_created_add_user'] = 'حسابك تم انشائة.';
Expand Down Expand Up @@ -281,23 +281,23 @@
$lang['message_folder_perms_error'] = 'أذونات المجلد خطأ:';
$lang['message_for_further_assistance'] = 'لمزيد من المساعدة';
$lang['message_found_documents'] = 'الوثائق موجود(ة).';
$lang['message_if_you_are_unable_to_view1'] = 'إذا لم تكن قادرا على القيام بذلك لسبب ما، انقر '; //Abduh says :this value must be changed
$lang['message_if_you_are_unable_to_view1'] = 'إذا لم تكن قادرا على القيام بذلك لسبب ما، انقر ';
$lang['message_if_you_are_unable_to_view2'] = 'تتزيل الملف';
$lang['message_if_you_are_unable_to_view3'] = '<br> لبدء تحميله إلى محطة العمل المحلية للحصول على عرض محلي.';//Abduh says :this value must be changed
$lang['message_if_you_are_unable_to_view3'] = '<br> لبدء تحميله إلى محطة العمل المحلية للحصول على عرض محلي.';
$lang['message_initial_import'] = 'استيراد اولي';
$lang['message_last_message'] = 'اخر رسالة';
$lang['message_latest_version'] = 'احدث اصدار';
$lang['message_max_number_of_results'] = 'There are more results than allowed, please use the <a href="search.php">Search</a> page to narrow your results.';
$lang['message_need_one_department'] = 'انت تحتاج على الاقل على ادارة واحدة'; //Abduh says :this value must be changed
$lang['message_need_one_department'] = 'انت تحتاج على الاقل على ادارة واحدة';
$lang['message_no_author_comments_available'] = 'لايوجد تعليقات متاحة';
$lang['message_no_description_available'] = 'لايوجد وصف متاح';
$lang['message_no_documents_checked_out'] = 'لايوجد اي وثيقة للتفحص حاليا';
$lang['message_no_files_found'] = 'لا توجد ملفات';
$lang['message_no_information_available'] = 'لاتوجد معلومات متاحة ';
$lang['message_non_unique_account'] = 'حساب غير وحيد'; //Abduh says :this value must be changed
$lang['message_non_unique_key'] = 'مفتاح غير وحيد في قاعدة البيانات'; //Abduh says :this value must be changed
$lang['message_nothing_to_do'] = 'لا توجد علاقة'; //Abduh says :this value must be changed
$lang['message_not_writeable'] = 'غير قابل للكتابة!'; //Abduh says :this value must be changed
$lang['message_non_unique_account'] = 'حساب غير وحيد';
$lang['message_non_unique_key'] = 'مفتاح غير وحيد في قاعدة البيانات';
$lang['message_nothing_to_do'] = 'لا توجد علاقة';
$lang['message_not_writable'] = 'غير قابل للكتابة!';
$lang['message_once_the_document_has_completed'] = 'بمجرد الانتهاء من تحميل الوثيقة، ربما';
$lang['message_original_version'] = 'نسخة اصلية لوزارة الصناعة والتجارة';
$lang['message_please_email'] = 'من فضلك البريد الالكتروني';
Expand Down
2 changes: 1 addition & 1 deletion includes/language/bangla.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
$lang['message_non_unique_account'] = 'অনন্য নয় একাউন্ট';
$lang['message_non_unique_key'] = 'ডাটাবেজে অনন্য নয় কী।';
$lang['message_nothing_to_do'] = 'কিছুই করার নেই ';
$lang['message_not_writeable'] = 'লিখনোপযোগী নয়!';
$lang['message_not_writable'] = 'লিখনোপযোগী নয়!';
$lang['message_once_the_document_has_completed'] = 'নথি ডাউনলোড সুসম্পন্ন হলে, আপনি যা যা করতে পারেন ';
$lang['message_original_version'] = 'আদি ভার্সন';
$lang['message_please_email'] = 'দয়া করে ই-মেইল করুন';
Expand Down
2 changes: 1 addition & 1 deletion includes/language/chinese.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
$lang['message_non_unique_account'] = '非唯一账号';
$lang['message_non_unique_key'] = '非唯一键';
$lang['message_nothing_to_do'] = '没有';
$lang['message_not_writeable'] = '不可写!';
$lang['message_not_writable'] = '不可写!';
$lang['message_once_the_document_has_completed'] = '当文档下载完毕,你可以';
$lang['message_original_version'] = '原始版本';
$lang['message_please_email'] = '请电邮';
Expand Down
2 changes: 1 addition & 1 deletion includes/language/croatian.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
$lang['message_non_unique_account'] = 'Račun nije jedinstven';
$lang['message_non_unique_key'] = 'Ključ u bazi nije jedinstven.';
$lang['message_nothing_to_do'] = 'Ništa za raditi';
$lang['message_not_writeable'] = 'Nije moguće zapisati!';
$lang['message_not_writable'] = 'Nije moguće zapisati!';
$lang['message_once_the_document_has_completed'] = 'Kada se završi preuzimanje dokumenta, možete';
$lang['message_original_version'] = 'Originalna verzija';
$lang['message_please_email'] = 'Molimo pošaljite e-poštu';
Expand Down
2 changes: 1 addition & 1 deletion includes/language/czech.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
$lang['message_non_unique_account'] = 'Účet není unikátní';
$lang['message_non_unique_key'] = 'Klíč v databázi není unikátní.';
$lang['message_nothing_to_do'] = 'Nelze nic udělat';
$lang['message_not_writeable'] = 'Nelze zapisovat!';
$lang['message_not_writable'] = 'Nelze zapisovat!';
$lang['message_once_the_document_has_completed'] = 'Jakmile je dokument stažen, múžete';
$lang['message_original_version'] = 'Původní verze';
$lang['message_please_email'] = 'Prosím odešlete emailem';
Expand Down
2 changes: 1 addition & 1 deletion includes/language/danish.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@
$lang['message_non_unique_account'] = 'Ikke-unik konto';
$lang['message_non_unique_key'] = 'Ikke-unik nøgle i database.';
$lang['message_nothing_to_do'] = 'Ikke noget at gøre';
$lang['message_not_writeable'] = 'Ikke skrivbar!';
$lang['message_not_writable'] = 'Ikke skrivbar!';
$lang['message_once_the_document_has_completed'] = 'Når dokumentet er downloadet kan du';
$lang['message_original_version'] = 'Original version';
$lang['message_please_email'] = 'Email venligst';
Expand Down
2 changes: 1 addition & 1 deletion includes/language/dutch.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
$lang['message_non_unique_account'] = 'Doublure in accounts';
$lang['message_non_unique_key'] = 'Doublure in database sleutel.';
$lang['message_nothing_to_do'] = 'Niets te doen';
$lang['message_not_writeable'] = 'Geen schrijfpermissie!';
$lang['message_not_writable'] = 'Geen schrijfpermissie!';
$lang['message_once_the_document_has_completed'] = 'Als het bestand eenmaal op uw PC staat, kunt u';
$lang['message_original_version'] = 'Oorspronkelijke versie';
$lang['message_please_email'] = 'Stuur een email';
Expand Down
6 changes: 3 additions & 3 deletions includes/language/english.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@
$lang['message_click_to_checkout_document'] = 'Click to check out the selected document and begin downloading it to your local workstation';
$lang['message_config_value_problem'] = 'There is a problem with one of your configuration values. Please check.';
$lang['message_current'] = 'Current';
$lang['message_datadir_problem'] = 'There is a problem with your dataDir. Check to make sure it exists and is writeable';
$lang['message_datadir_problem'] = 'There is a problem with your dataDir. Check to make sure it exists and is writable';
$lang['message_datadir_problem_exists'] = 'There is a problem with your dataDir setting. It does not appear to exist.';
$lang['message_datadir_problem_writable'] = 'There is a problem with your dataDir setting. It does not appear to be writeable to the web server.';
$lang['message_datadir_problem_writable'] = 'There is a problem with your dataDir setting. It does not appear to be writable to the web server.';
$lang['message_department_successfully_added'] = 'Department successfully added';
$lang['message_department_successfully_updated'] = 'Department successfully updated';
$lang['message_directory_creation_failed'] = 'Directory Creation Failed';
Expand Down Expand Up @@ -296,7 +296,7 @@
$lang['message_non_unique_account'] = 'Non-Unique account';
$lang['message_non_unique_key'] = 'Non-Unique key in database.';
$lang['message_nothing_to_do'] = 'Nothing to do';
$lang['message_not_writeable'] = 'Not Writeable!';
$lang['message_not_writable'] = 'Not Writable!';
$lang['message_once_the_document_has_completed'] = 'Once the document has completed downloading, you may';
$lang['message_original_version'] = 'Original version';
$lang['message_please_email'] = 'Please email';
Expand Down
2 changes: 1 addition & 1 deletion includes/language/french.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
$lang['message_non_unique_account'] = 'Compte Non-Unique';
$lang['message_non_unique_key'] = 'Clé Non-Unique dans la base de données.';
$lang['message_nothing_to_do'] = 'Rien de particulier à faire';
$lang['message_not_writeable'] = 'Ecriture Impossible!';
$lang['message_not_writable'] = 'Ecriture Impossible!';
$lang['message_once_the_document_has_completed'] = 'Une fois l\'importation du document terminée, vous pouvez';
$lang['message_original_version'] = 'Version originale';
$lang['message_please_email'] = 'Merci de contacter par email';
Expand Down
2 changes: 1 addition & 1 deletion includes/language/german.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
$lang['message_non_unique_account'] = 'Dieser Kontoname besteht bereits';
$lang['message_non_unique_key'] = 'Datenbankschlüssel nicht eindeutig.';
$lang['message_nothing_to_do'] = 'Keine Aufgaben';
$lang['message_not_writeable'] = 'Nicht schreibbar!';
$lang['message_not_writable'] = 'Nicht schreibbar!';
$lang['message_once_the_document_has_completed'] = 'Gleich nach dem Downloadabschluss geht es weiter';
$lang['message_original_version'] = 'Ursprüngliche Version (Original)';
$lang['message_please_email'] = 'Senden sie E-Mail an';
Expand Down
2 changes: 1 addition & 1 deletion includes/language/italian.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
$lang['message_non_unique_account'] = 'Account gi&agrave; presente';
$lang['message_non_unique_key'] = 'Chiave non univoca nella base dati';
$lang['message_nothing_to_do'] = 'Niente da fare';
$lang['message_not_writeable'] = 'Non &egrave; scrivibile!';
$lang['message_not_writable'] = 'Non &egrave; scrivibile!';
$lang['message_once_the_document_has_completed'] = 'Una volta terminato di salvare il documento, clicca';
$lang['message_original_version'] = 'Versione originale';
$lang['message_please_email'] = 'Si prega di inviare una email';
Expand Down
2 changes: 1 addition & 1 deletion includes/language/portuguese.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
$lang['message_non_unique_account'] = 'Conta não-exclusiva';
$lang['message_non_unique_key'] = 'Chave não-exclusiva no banco de dados.';
$lang['message_nothing_to_do'] = 'Nada a fazer';
$lang['message_not_writeable'] = 'Não pode ser gravado!';
$lang['message_not_writable'] = 'Não pode ser gravado!';
$lang['message_once_the_document_has_completed'] = 'Uma vez que o documento tenha sido concluído, você pode baixar';
$lang['message_original_version'] = 'Versão original';
$lang['message_please_email'] = 'Envie um email';
Expand Down
2 changes: 1 addition & 1 deletion includes/language/romanian.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
$lang['message_non_unique_account'] = 'Contul nu este unic';
$lang['message_non_unique_key'] = 'Lipsa cheie unica in baza de date.';
$lang['message_nothing_to_do'] = 'Nimic de facut';
$lang['message_not_writeable'] = 'Nu poate fi scris!';
$lang['message_not_writable'] = 'Nu poate fi scris!';
$lang['message_once_the_document_has_completed'] = 'Dupa descarcarea completa a documentului, poti';
$lang['message_original_version'] = 'Versiunea originala';
$lang['message_please_email'] = 'Va rugam transmiteti email';
Expand Down
2 changes: 1 addition & 1 deletion includes/language/spanish.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
$lang['message_no_information_available'] = 'No Hay informacion Disponible';
$lang['message_non_unique_account'] = 'Ya existe el usuario';
$lang['message_non_unique_key'] = 'Ya existe este ID.';
$lang['message_not_writeable'] = 'No se puede Escribir!';
$lang['message_not_writable'] = 'No se puede Escribir!';
$lang['message_nothing_to_do'] = 'Nada por hacer';
$lang['message_once_the_document_has_completed'] = 'Una vez el Documento ha sido totalmente Descargado en Su Computadora, Usted Puede';
$lang['message_original_version'] = 'Versi&oacute;n Original';
Expand Down
2 changes: 1 addition & 1 deletion includes/language/swedish.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@
$lang['message_non_unique_account'] = 'Icke-Unikt konto';
$lang['message_non_unique_key'] = 'Icke-Unik nyckel i databasen.';
$lang['message_nothing_to_do'] = 'Inget att göra';
$lang['message_not_writeable'] = 'Ej Skrivbar!';
$lang['message_not_writable'] = 'Ej Skrivbar!';
$lang['message_once_the_document_has_completed'] = 'Så fort dokumentet har laddats ned kan du';
$lang['message_original_version'] = 'Ursprungsversion';
$lang['message_please_email'] = 'Vänligen skicka e-post';
Expand Down
6 changes: 3 additions & 3 deletions includes/language/turkish.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@
$lang['message_click_to_checkout_document'] = 'Click to check out the selected document and begin downloading it to your local workstation';
$lang['message_config_value_problem'] = 'There is a problem with one of your configuration values. Please check.';
$lang['message_current'] = "Ge&#231;erli";
$lang['message_datadir_problem'] = 'There is a problem with your dataDir. Check to make sure it exists and is writeable';
$lang['message_datadir_problem'] = 'There is a problem with your dataDir. Check to make sure it exists and is writable';
$lang['message_datadir_problem_exists'] = 'There is a problem with your dataDir setting. It does not appear to exist.';
$lang['message_datadir_problem_writable'] = 'There is a problem with your dataDir setting. It does not appear to be writeable to the web server.';
$lang['message_datadir_problem_writable'] = 'There is a problem with your dataDir setting. It does not appear to be writable to the web server.';
$lang['message_department_successfully_added'] = 'Department successfully added';
$lang['message_department_successfully_updated'] = 'Department successfully updated';
$lang['message_directory_creation_failed'] = 'Directory Creation Failed';
Expand Down Expand Up @@ -168,7 +168,7 @@
$lang['message_no_information_available'] = 'No information available';
$lang['message_non_unique_account'] = 'Non-Unique account';
$lang['message_non_unique_key'] = 'Non-Unique key in database.';
$lang['message_not_writeable'] = "Yaz&#305;lamaz!";
$lang['message_not_writable'] = "Yaz&#305;lamaz!";
$lang['message_nothing_to_do'] = 'Nothing to do';
$lang['message_once_the_document_has_completed'] = 'Once the document has completed downloading, you may';
$lang['message_original_version'] = 'Original version';
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
}

if (isset($_POST['login'])) {
if (!is_dir($GLOBALS['CONFIG']['dataDir']) || !is_writeable($GLOBALS['CONFIG']['dataDir'])) {
if (!is_dir($GLOBALS['CONFIG']['dataDir']) || !is_writable($GLOBALS['CONFIG']['dataDir'])) {
echo "<font color=red>" . msg('message_datadir_problem') . "</font>";
}

Expand Down
6 changes: 3 additions & 3 deletions install/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,9 @@ function do_install()
global $pdo;

define('ODM_INSTALLING', 'true');
echo 'Checking that templates_c folder is writeable...<br />';
if (!is_writeable('../templates_c')) {
echo 'templates_c folder is <strong>Not writeable</strong> - Fix and go <a href="javascript: history.back()" class="button">Back</a><br />';
echo 'Checking that templates_c folder is writable...<br />';
if (!is_writable('../templates_c')) {
echo 'templates_c folder is <strong>Not writable</strong> - Fix and go <a href="javascript: history.back()" class="button">Back</a><br />';
exit;
} else {
echo 'OK<br />';
Expand Down
4 changes: 2 additions & 2 deletions install/setup-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ function display_header()
echo 'The data directory exists, but your web server cannot write to it. Please verify the folder permissions are correct on ' . $datadir;
}

// Verify the templates_c is writeable
// Verify the templates_c is writable
if (!is_writable(ABSPATH . '/templates_c')) {
echo 'Sorry, we were unable to write to the templates_c folder. You will need to make sure that ' . ABSPATH . '/templates_c is writeable by the web server';
echo 'Sorry, we were unable to write to the templates_c folder. You will need to make sure that ' . ABSPATH . '/templates_c is writable by the web server';
}

// We also need to guess at their base_url value
Expand Down

0 comments on commit d893f0f

Please sign in to comment.