[dev] Re: [horde] Shares Lists and url parameter.
Damian Alejandro Fernandez Sosa
damlists at cnba.uba.ar
Sun Dec 15 03:15:04 PST 2002
OK, no problem, here you have the diffs
Thanks!
On Fri, 2002-12-13 at 12:45, Chuck Hagenbuch wrote:
> Quoting Damian Alejandro Fernandez Sosa <damlists@cnba.uba.ar>:
>
> > > I make the modificacion to allow only the display of
> > > calendars/tasks/notepads from a parameter in the url (showShare[]).
>
> Can you please send diffs (cvs diff -urN) against latest CVS instead? It's
> hard to take your new files and parse out what's new/changed in them vs.
> what's changed in the mean time in CVS.
>
> Thanks,
> -chuck
>
> --
> Charles Hagenbuch, <chuck@horde.org>
> "People ask me all the time what it will be like living without otters."
> - Google, thanks to Harpers
Index: Share.php
===================================================================
RCS file: /repository/horde/lib/Share.php,v
retrieving revision 1.26
diff -u -r1.26 Share.php
--- Share.php 10 Dec 2002 18:38:16 -0000 1.26
+++ Share.php 15 Dec 2002 06:10:47 -0000
@@ -315,6 +315,16 @@
}
}
+ function getSelectedSharesfromURL()
+ {
+ $ret=false;
+ if(@is_array($GLOBALS["HTTP_GET_VARS"]["showShare"]))
+ $ret=$GLOBALS["HTTP_GET_VARS"]["showShare"];
+
+ return $ret;
+ }
+
+
}
Index: base.php
===================================================================
RCS file: /repository/kronolith/lib/base.php,v
retrieving revision 1.68
diff -u -r1.68 base.php
--- base.php 10 Dec 2002 18:38:15 -0000 1.68
+++ base.php 15 Dec 2002 06:12:04 -0000
@@ -130,6 +130,18 @@
$GLOBALS['prefs']->setValue('display_cals',
serialize($GLOBALS['display_calendars']));
}
+// Show only the shares from the showShare[] URL parameter
+// If the parameter is empty use the shares from prefs.
+if(($_tempaux=$GLOBALS['shares']->getSelectedSharesfromURL()) != false
){
+ $GLOBALS['display_calendars']=array();
+ // Check the share exists
+ foreach ($_tempaux as $id) {
+ if (isset($_all[$id])) {
+ $GLOBALS['display_calendars'][] = $id;
+ }
+ }
+}
+
// Create a calendar backend object.
$GLOBALS['calendar'] =
&Kronolith_Driver::factory($conf['calendar']['driver'],
$conf['calendar']['params']);
Index: base.php
===================================================================
RCS file: /repository/nag/lib/base.php,v
retrieving revision 1.39
diff -u -r1.39 base.php
--- base.php 12 Dec 2002 20:01:36 -0000 1.39
+++ base.php 15 Dec 2002 06:12:44 -0000
@@ -83,6 +83,8 @@
$GLOBALS['display_tasklists'][] = $id;
}
}
+
+
$GLOBALS['prefs']->setValue('display_tasklists',
serialize($GLOBALS['display_tasklists']));
// Make sure we have at least one task list to work with.
@@ -109,5 +111,22 @@
$GLOBALS['nag_shares']->addShare($share);
}
}
+
+
$GLOBALS['prefs']->setValue('display_tasklists',
serialize($GLOBALS['display_tasklists']));
}
+
+
+
+// Show only the shares from the showShare[] URL parameter
+// If the parameter is empty use the shares from prefs.
+if(($_tempaux=$GLOBALS['nag_shares']->getSelectedSharesfromURL()) !=
false ){
+ $GLOBALS['display_tasklists']=array();
+ // Check the share exists
+ foreach ($_tempaux as $id) {
+ if (isset($_all[$id])) {
+ $GLOBALS['display_tasklists'][] = $id;
+ }
+ }
+}
+
Index: base.php
===================================================================
RCS file: /repository/mnemo/lib/base.php,v
retrieving revision 1.9
diff -u -r1.9 base.php
--- base.php 12 Dec 2002 21:05:57 -0000 1.9
+++ base.php 15 Dec 2002 06:13:03 -0000
@@ -104,3 +104,18 @@
}
$GLOBALS['prefs']->setValue('display_notepads',
serialize($GLOBALS['display_notepads']));
}
+
+
+
+// Show only the shares from the showShare[] URL parameter
+// If the parameter is empty use the shares from prefs.
+if(($_tempaux=$GLOBALS['mnemo_shares']->getSelectedSharesfromURL()) !=
false ){
+ $GLOBALS['display_notepads']=array();
+ // Check the share exists
+ foreach ($_tempaux as $id) {
+ if (isset($_all[$id])) {
+ $GLOBALS['display_notepads'][] = $id;
+ }
+ }
+}
+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kronolith_base.diff
Type: text/x-patch
Size: 996 bytes
Desc: not available
Url : http://lists.horde.org/archives/dev/attachments/20021215/67d5fc01/kronolith_base.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mnemo_base.diff
Type: text/x-patch
Size: 800 bytes
Desc: not available
Url : http://lists.horde.org/archives/dev/attachments/20021215/67d5fc01/mnemo_base.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nag_base.diff
Type: text/x-patch
Size: 1111 bytes
Desc: not available
Url : http://lists.horde.org/archives/dev/attachments/20021215/67d5fc01/nag_base.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Share.diff
Type: text/x-patch
Size: 538 bytes
Desc: not available
Url : http://lists.horde.org/archives/dev/attachments/20021215/67d5fc01/Share.bin
More information about the dev
mailing list