فهرست منبع

Remvove the shared option and update the contact description.

markjcrane 9 سال پیش
والد
کامیت
151ef49103
2فایلهای تغییر یافته به همراه5 افزوده شده و 39 حذف شده
  1. 4 4
      app_languages.php
  2. 1 35
      contact_edit.php

+ 4 - 4
app_languages.php

@@ -2118,21 +2118,21 @@ $text['description-import_delimiter']['sv-se'] = "Välj avgränsare (comma or pi
 $text['description-import_delimiter']['de-at'] = "Wählen Sie das Trennzeichen (Beistrich oder Wagrechter Strich)";
 $text['description-import_delimiter']['de-at'] = "Wählen Sie das Trennzeichen (Beistrich oder Wagrechter Strich)";
 $text['description-import_delimiter']['he'] = "";
 $text['description-import_delimiter']['he'] = "";
 
 
-$text['description-users']['en-us'] = "Assign additional users as administrators of this conference room.";
+$text['description-users']['en-us'] = "Select the users that are allowed to view this contact.";
 $text['description-users']['es-cl'] = "Asignar usuarios adicionales como administradores de esta sala de conferencia.";
 $text['description-users']['es-cl'] = "Asignar usuarios adicionales como administradores de esta sala de conferencia.";
 $text['description-users']['pt-pt'] = "Atribuir utilizadores adicionais como administradores da sala de conferência.";
 $text['description-users']['pt-pt'] = "Atribuir utilizadores adicionais como administradores da sala de conferência.";
 $text['description-users']['fr-fr'] = "Ajouter des utilisateurs comme administrateurs des cette salle de conférence.";
 $text['description-users']['fr-fr'] = "Ajouter des utilisateurs comme administrateurs des cette salle de conférence.";
-$text['description-users']['pt-br'] = "Atribuir usuários adicionais como administradores da sala de conferência. ";
+$text['description-users']['pt-br'] = "Selecione os usuários que podem ver este contato. ";
 $text['description-users']['pl'] = "'Dodaj dodatkowych użytkowników jako administratorów tego pokoju konferencyjnego.";
 $text['description-users']['pl'] = "'Dodaj dodatkowych użytkowników jako administratorów tego pokoju konferencyjnego.";
 $text['description-users']['sv-se'] = "Lägg till ytterligare användare som administratörer för detta konferensrum.";
 $text['description-users']['sv-se'] = "Lägg till ytterligare användare som administratörer för detta konferensrum.";
 $text['description-users']['uk'] = "Зв'язати додаткових користувачів як адміністраторів цього конференц-залу.";
 $text['description-users']['uk'] = "Зв'язати додаткових користувачів як адміністраторів цього конференц-залу.";
 $text['description-users']['de-at'] = "Weisen Sie diesem Konferenzraum weitere Administratoren zu. ";
 $text['description-users']['de-at'] = "Weisen Sie diesem Konferenzraum weitere Administratoren zu. ";
 
 
-$text['description-groups']['en-us'] = "Contacts assigned to a group are only visible to users in the group.  Contacts not assigned to a group will be visible to all users in the domain.";
+$text['description-groups']['en-us'] = "Select the groups that are allowed to view this contact.";
 $text['description-groups']['es-cl'] = "Contactos asignados a un grupo sólo son visibles para los usuarios del grupo. Los contactos no asignados a un grupo serán visibles para todos los usuarios del dominio.";
 $text['description-groups']['es-cl'] = "Contactos asignados a un grupo sólo son visibles para los usuarios del grupo. Los contactos no asignados a un grupo serán visibles para todos los usuarios del dominio.";
 $text['description-groups']['pt-pt'] = "Contatos atribuídos a um grupo só são visíveis para os usuários do grupo. Contatos não atribuídos a um grupo será visível para todos os usuários no domínio.";
 $text['description-groups']['pt-pt'] = "Contatos atribuídos a um grupo só são visíveis para os usuários do grupo. Contatos não atribuídos a um grupo será visível para todos os usuários no domínio.";
 $text['description-groups']['fr-fr'] = "Contacts affectés à un groupe ne sont accessibles qu'aux utilisateurs du groupe. Contacts ne sont pas affectés à un groupe seront visibles à tous les utilisateurs dans le domaine.";
 $text['description-groups']['fr-fr'] = "Contacts affectés à un groupe ne sont accessibles qu'aux utilisateurs du groupe. Contacts ne sont pas affectés à un groupe seront visibles à tous les utilisateurs dans le domaine.";
-$text['description-groups']['pt-br'] = "Descrição";
+$text['description-groups']['pt-br'] = "Selecione os grupos que podem ver este contato";
 $text['description-groups']['pl'] = "Kontaky przypisane do grupy, są widoczne tylko dla użytkowników w grupie. Kontakty nie przypisane do grupy będą widoczna dla wszystkich użytkowników w domenie.";
 $text['description-groups']['pl'] = "Kontaky przypisane do grupy, są widoczne tylko dla użytkowników w grupie. Kontakty nie przypisane do grupy będą widoczna dla wszystkich użytkowników w domenie.";
 $text['description-groups']['uk'] = "Опис";
 $text['description-groups']['uk'] = "Опис";
 $text['description-groups']['sv-se'] = "Kontakter tilldelade till en grupp är endast synbara för användare i guppen. Kontakter som inte är tilldelade till någon grupp syns för alla användare i hela domänen.";
 $text['description-groups']['sv-se'] = "Kontakter tilldelade till en grupp är endast synbara för användare i guppen. Kontakter som inte är tilldelade till någon grupp syns för alla användare i hela domänen.";

+ 1 - 35
contact_edit.php

@@ -602,41 +602,6 @@ else {
 		echo "</td>\n";
 		echo "</td>\n";
 		echo "</tr>\n";
 		echo "</tr>\n";
 
 
-		//determine if contact is shared or private
-		if ($action == 'update') {
-			$sql = "select count(*) as num_rows from v_contact_groups ";
-			$sql .= "where domain_uuid = '".$domain_uuid."' ";
-			$sql .= "and contact_uuid = '".$contact_uuid."' ";
-			$sql .= "and group_uuid = '".$_SESSION["user_uuid"]."' ";
-			$prep_statement = $db->prepare(check_sql($sql));
-			$prep_statement->execute();
-			$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
-			$contact_shared = ($row['num_rows'] > 0) ? 'false' : 'true';
-			unset ($sql, $prep_statement, $row);
-		}
-		else {
-			//private by default on contact add, unless being done by a superadmin from a different domain
-			$contact_shared = ($_SESSION['groups'][0]['domain_uuid'] != $_SESSION['domain_uuid']) ? 'true' : 'false';
-		}
-		//disable shared change if user (superadmin) is accessing a foreign domain
-		$contact_shared_disabled = ($_SESSION['groups'][0]['domain_uuid'] != $_SESSION['domain_uuid']) ? "disabled='disabled'" : null;
-		echo "<tr>\n";
-		echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
-		echo "	".$text['label-shared']."\n";
-		echo "</td>\n";
-		echo "<td class='vtable' align='left'>\n";
-		echo "	<select class='formfld' ".(($contact_shared_disabled == '') ? "name='contact_shared'" : null)." id='contact_shared' ".((permission_exists('contact_group_view')) ? "onchange=\"$('#div_groups').slideToggle('400');\"" : null)." ".$contact_shared_disabled.">\n";
-		echo "		<option value='false'>".$text['option-false']."</option>\n";
-		echo "		<option value='true' ".(($contact_shared == 'true') ? "selected" : null).">".$text['option-true']."</option>\n";
-		echo "	</select>\n";
-		if ($contact_shared_disabled != '') {
-			echo "	<input type='hidden' name='contact_shared' value='".$contact_shared."'>";
-		}
-		echo "<br />\n";
-		echo $text['description-shared']."\n";
-		echo "</td>\n";
-		echo "</tr>\n";
-
 		if (permission_exists('contact_user_edit')) {
 		if (permission_exists('contact_user_edit')) {
 			echo "	<tr>";
 			echo "	<tr>";
 			echo "		<td class='vncell' valign='top'>".$text['label-users']."</td>";
 			echo "		<td class='vncell' valign='top'>".$text['label-users']."</td>";
@@ -676,6 +641,7 @@ else {
 		echo "</table>";
 		echo "</table>";
 
 
 		if (permission_exists('contact_group_view')) {
 		if (permission_exists('contact_group_view')) {
+			$contact_shared = 'true';
 			echo "<div id='div_groups' ".(($contact_shared != 'true') ? "style='display: none;'" : null).">\n";
 			echo "<div id='div_groups' ".(($contact_shared != 'true') ? "style='display: none;'" : null).">\n";
 			echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'>\n";
 			echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'>\n";
 			echo "<tr>";
 			echo "<tr>";