[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: bookmarks/inc class.bookmarks.inc.php,1.24,1.25
From: |
Michael Totschnig <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: bookmarks/inc class.bookmarks.inc.php,1.24,1.25 class.plist.inc.php,1.11,1.12 class.sqlquery.inc.php,1.3,1.4 header.inc.php,1.11,1.12 |
Date: |
Tue, 25 Mar 2003 18:02:24 -0500 |
Update of /cvsroot/phpgroupware/bookmarks/inc
In directory subversions:/tmp/cvs-serv3331/inc
Modified Files:
class.bookmarks.inc.php class.plist.inc.php
class.sqlquery.inc.php header.inc.php
Log Message:
syncing 0.9.16 and HEAD
Index: class.bookmarks.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/bookmarks/inc/class.bookmarks.inc.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** class.bookmarks.inc.php 2 Sep 2002 00:35:13 -0000 1.24
--- class.bookmarks.inc.php 25 Mar 2003 23:02:22 -0000 1.25
***************
*** 170,180 ****
$GLOBALS['phpgw']->config =
createobject('phpgwapi.config');
$GLOBALS['phpgw']->config->read_repository();
! $this->config = $this->config_data;
!
if(!$GLOBALS['phpgw']->categories->exists('appandmains','No category'))
{
$newcat = array(
! 'name' => 'No category',
! 'descr' => '',
'parent' => 0,
'access' => '',
--- 170,180 ----
$GLOBALS['phpgw']->config =
createobject('phpgwapi.config');
$GLOBALS['phpgw']->config->read_repository();
! $this->config =
$GLOBALS['phpgw']->config->config_data;
! if (!
$GLOBALS['phpgw']->categories->exists('appandmains','No category'))
{
$newcat = array(
! 'name' => 'No category',
! 'descr' => '',
'parent' => 0,
'access' => '',
***************
*** 192,197 ****
//echo "<br>id: $id required: $required grants: " .
$this->grants[$this->db->f('bm_owner')] . " owner: " . $this->db->f('bm_owner')
. " user: " . $GLOBALS['phpgw_info']['user']['account_id'];
! if(($this->grants[$this->db->f('bm_owner')] &
$required) ||
! ($this->db->f('bm_owner') ==
$GLOBALS['phpgw_info']['user']['account_id']))
{
return True;
--- 192,196 ----
//echo "<br>id: $id required: $required grants: " .
$this->grants[$this->db->f('bm_owner')] . " owner: " . $this->db->f('bm_owner')
. " user: " . $GLOBALS['phpgw_info']['user']['account_id'];
! if (($this->grants[$this->db->f('bm_owner')] &
$required) || ($this->db->f('bm_owner') ==
$GLOBALS['phpgw_info']['user']['account_id']))
{
return True;
***************
*** 205,209 ****
function categories_list($selected)
{
! $mains =
$GLOBALS['phpgw']->categories->return_array('mains',0,True,'','cat_name','',True);
while (is_array($mains) && $main = each($mains))
--- 204,208 ----
function categories_list($selected)
{
! $mains =
$GLOBALS['phpgw']->categories->return_array('mains',0,False,'','cat_name','',True);
while (is_array($mains) && $main = each($mains))
***************
*** 272,276 ****
$db = $GLOBALS['phpgw']->db;
! if(!$this->validate($values))
{
return False;
--- 271,275 ----
$db = $GLOBALS['phpgw']->db;
! if (! $this->validate($values))
{
return False;
***************
*** 282,286 ****
$db->next_record();
! if(!$return_no_errors && $db->f(0) != 0)
{
$error_msg .= sprintf('<br>URL <B>%s</B>
already exists!', $values['url']);
--- 281,285 ----
$db->next_record();
! if (! $return_no_errors && $db->f(0) != 0)
{
$error_msg .= sprintf('<br>URL <B>%s</B>
already exists!', $values['url']);
***************
*** 288,302 ****
}
! if($return_no_errors && $db->f(0) != 0)
{
return True;
}
! if(!$values['access'])
{
$values['access'] = 'public';
}
! if(!$values['timestamps'])
{
$values['timestamps'] = time() . ',0,0';
--- 287,301 ----
}
! if ($return_no_errors && $db->f(0) != 0)
{
return True;
}
! if (! $values['access'])
{
$values['access'] = 'public';
}
! if (! $values['timestamps'])
{
$values['timestamps'] = time() . ',0,0';
***************
*** 306,310 ****
$subcategory = ereg_replace('!','',$subcategory);
! if(!$return_no_errors && ! $category)
{
$error_msg .= 'You must select a category';
--- 305,309 ----
$subcategory = ereg_replace('!','',$subcategory);
! if (! $return_no_errors && ! $category)
{
$error_msg .= 'You must select a category';
***************
*** 321,325 ****
$db->query($query,__LINE__,__FILE__);
! if(!$return_no_errors)
{
$msg .= 'Bookmark created successfully.';
--- 320,324 ----
$db->query($query,__LINE__,__FILE__);
! if (! $return_no_errors)
{
$msg .= 'Bookmark created successfully.';
***************
*** 334,338 ****
/*
! if(!$this->validate(&$url, &$name, &$ldesc, &$keywords,
&$category, &$subcategory, &$rating, &$public, &$public_db))
{
return False;
--- 333,337 ----
/*
! if (!$this->validate(&$url, &$name, &$ldesc,
&$keywords, &$category, &$subcategory, &$rating, &$public, &$public_db))
{
return False;
***************
*** 340,344 ****
*/
! if(!$values['access'])
{
$values['access'] = 'public';
--- 339,343 ----
*/
! if (! $values['access'])
{
$values['access'] = 'public';
***************
*** 366,370 ****
$msg .= lang('Bookmark changed sucessfully');
!
return true;
}
--- 365,369 ----
$msg .= lang('Bookmark changed sucessfully');
!
return true;
}
***************
*** 379,383 ****
$query = sprintf("delete from phpgw_bookmarks where
bm_id='%s' and bm_owner='%s'", $id,
$GLOBALS['phpgw_info']["user"]["account_id"]);
$db->query($query,__LINE__,__FILE__);
! if($db->Errno != 0)
{
return False;
--- 378,382 ----
$query = sprintf("delete from phpgw_bookmarks where
bm_id='%s' and bm_owner='%s'", $id,
$GLOBALS['phpgw_info']["user"]["account_id"]);
$db->query($query,__LINE__,__FILE__);
! if ($db->Errno != 0)
{
return False;
***************
*** 405,414 ****
// Do we have all necessary data?
! if(!$values['url'] || $values['url'] == 'http://')
{
$error_msg .= '<br>URL is required.';
}
! if(!$values['name'])
{
$error_msg .= '<br>' . lang('Name is required');
--- 404,413 ----
// Do we have all necessary data?
! if (! $values['url'] || $values['url'] == 'http://')
{
$error_msg .= '<br>URL is required.';
}
! if (! $values['name'])
{
$error_msg .= '<br>' . lang('Name is required');
***************
*** 416,423 ****
// does the admin want us to check URL format
! if($GLOBALS['phpgw']->bookmarks->url_format_check > 0)
{
// Is the URL format valid
! if($values['url'] == 'http://')
{
$error_msg .= '<br>You must enter a
URL';
--- 415,422 ----
// does the admin want us to check URL format
! if ($GLOBALS['phpgw']->bookmarks->url_format_check > 0)
{
// Is the URL format valid
! if ($values['url'] == 'http://')
{
$error_msg .= '<br>You must enter a
URL';
***************
*** 425,435 ****
else
{
! if(!$validate->is_url($values['url']))
{
! $format_msg = '<br>URL invalid.
Format must be <strong>http://</strong> or
! <strong>ftp://</strong> followed by a valid hostname and URL!<br><small>' .
$validate->ERROR . '</small>';
!
// does the admin want this
formatted as a warning or an error?
!
if($GLOBALS['phpgw']->bookmarks->url_format_check == 2)
{
$error_msg .=
$format_msg;
--- 424,435 ----
else
{
! if (! $validate->is_url($values['url']))
{
! $format_msg = '<br>URL invalid.
Format must be <strong>http://</strong> or
! <strong>ftp://</strong> followed by a valid
hostname and
! URL!<br><small>' . $validate->ERROR .
'</small>';
!
// does the admin want this
formatted as a warning or an error?
! if
($GLOBALS['phpgw']->bookmarks->url_format_check == 2)
{
$error_msg .=
$format_msg;
***************
*** 443,447 ****
}
! if($error_msg)
{
return False;
--- 443,447 ----
}
! if ($error_msg)
{
return False;
***************
*** 461,465 ****
/*
$db->query("select count(*) as total_bookmarks from
bookmarks where username = '"
! . $GLOBALS['phpgw_info']["user"]["account_id"]
. "' or bookmarks.public_f='Y'",__LINE__,__FILE__);
$db->next_record();
$GLOBALS['phpgw']->common->appsession($db->f("total_bookmarks"));
--- 461,465 ----
/*
$db->query("select count(*) as total_bookmarks from
bookmarks where username = '"
! . $GLOBALS['phpgw_info']["user"]["account_id"] . "' or
bookmarks.public_f='Y'",__LINE__,__FILE__);
$db->next_record();
$GLOBALS['phpgw']->common->appsession($db->f("total_bookmarks"));
***************
*** 473,484 ****
$db->query($query,__LINE__,__FILE__);
if ($db->Errno == 0) {
! if($db->next_record())
! {
// $total_public =
$db->f("total_public");
echo "TEST: " . $db->f("total_public");
$GLOBALS['phpgw']->common->appsession($db->f("total_public"));
! }
! else
! {
echo "TEST: False";
return False;
--- 473,481 ----
$db->query($query,__LINE__,__FILE__);
if ($db->Errno == 0) {
! if ($db->next_record()) {
// $total_public =
$db->f("total_public");
echo "TEST: " . $db->f("total_public");
$GLOBALS['phpgw']->common->appsession($db->f("total_public"));
! } else {
echo "TEST: False";
return False;
***************
*** 489,498 ****
$query = sprintf("update auth_user set
total_public_bookmarks=%s where username = '%s'",$total_public, $uname);
$db->query($query,__LINE__,__FILE__);
! if($db->Errno != 0)
! {
return False;
}
return true;*/
! //}
}
--- 486,494 ----
$query = sprintf("update auth_user set
total_public_bookmarks=%s where username = '%s'",$total_public, $uname);
$db->query($query,__LINE__,__FILE__);
! if ($db->Errno != 0) {
return False;
}
return true;*/
! //}
}
***************
*** 502,510 ****
$filtermethod = '( bm_owner=' .
$GLOBALS['phpgw_info']['user']['account_id'];
! if(is_array($GLOBALS['phpgw']->bookmarks->grants))
{
$grants = $GLOBALS['phpgw']->bookmarks->grants;
reset($grants);
! while(list($user) = each($grants))
{
$public_user_list[] = $user;
--- 498,506 ----
$filtermethod = '( bm_owner=' .
$GLOBALS['phpgw_info']['user']['account_id'];
! if (is_array($GLOBALS['phpgw']->bookmarks->grants))
{
$grants = $GLOBALS['phpgw']->bookmarks->grants;
reset($grants);
! while (list($user) = each($grants))
{
$public_user_list[] = $user;
***************
*** 518,522 ****
}
! if($bm_cat || $bm_subcat)
{
if($bm_cat)
--- 514,518 ----
}
! if ($bm_cat || $bm_subcat)
{
if($bm_cat)
***************
*** 651,653 ****
$validate = createobject('phpgwapi.validator');
! ?>
\ No newline at end of file
--- 647,649 ----
$validate = createobject('phpgwapi.validator');
! ?>
Index: class.plist.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/bookmarks/inc/class.plist.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** class.plist.inc.php 30 Apr 2002 23:44:00 -0000 1.11
--- class.plist.inc.php 25 Mar 2003 23:02:22 -0000 1.12
***************
*** 171,175 ****
// Check owner
! if
(($this->grants[$GLOBALS['phpgw']->db->f('bm_owner')] & PHPGW_ACL_EDIT) ||
($GLOBALS['phpgw']->db->f('bm_owner') ==
$GLOBALS['phpgw_info']['user']['account_id']))
{
$maintain_url =
$GLOBALS['phpgw']->link("/bookmarks/maintain.php","bm_id=" .
$GLOBALS['phpgw']->db->f("bm_id"));
--- 171,175 ----
// Check owner
! if
(($GLOBALS['phpgw']->bookmarks->grants[$GLOBALS['phpgw']->db->f('bm_owner')] &
PHPGW_ACL_EDIT) || ($GLOBALS['phpgw']->db->f('bm_owner') ==
$GLOBALS['phpgw_info']['user']['account_id']))
{
$maintain_url =
$GLOBALS['phpgw']->link("/bookmarks/maintain.php","bm_id=" .
$GLOBALS['phpgw']->db->f("bm_id"));
Index: class.sqlquery.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/bookmarks/inc/class.sqlquery.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.sqlquery.inc.php 14 Jul 2001 01:41:49 -0000 1.3
--- class.sqlquery.inc.php 25 Mar 2003 23:02:22 -0000 1.4
***************
*** 40,43 ****
--- 40,44 ----
## HTML Widget dictionary
+ /* use phpgw lang() now
var $dict = array(
"de" => array(
***************
*** 63,67 ****
)
);
!
## SQL comparision dictionary
var $compare = array(
--- 64,68 ----
)
);
! */
## SQL comparision dictionary
var $compare = array(
***************
*** 142,146 ****
## static values.
if (isset($this->compare["like"])) {
! $this->compare["like"] = $this->dict[$this->lang]["like"];
}
--- 143,147 ----
## static values.
if (isset($this->compare["like"])) {
! $this->compare["like"] = lang('like');
}
***************
*** 166,176 ****
if ($i == 1) {
$res .= sprintf(" <td%s>%s</td>\n",
! ($class)?" class=$class":"",
! $this->dict[$this->lang]["searchfor"]);
} else {
$res .= sprintf(" <td%s>%s</td>\n",
($class)?" class=$class":"",
$this->selection($this->makename($base, "conj", $i),
! array("and" => $this->dict[$this->lang]["and"],
"or" => $this->dict[$this->lang]["or"]),
$GLOBALS[$base]["conj_".$i],
"on",
--- 167,176 ----
if ($i == 1) {
$res .= sprintf(" <td%s>%s</td>\n",
! ($class)?" class=$class":"",lang('Search for:'));
} else {
$res .= sprintf(" <td%s>%s</td>\n",
($class)?" class=$class":"",
$this->selection($this->makename($base, "conj", $i),
! array("and" => lang('and'), "or" => lang('or')),
$GLOBALS[$base]["conj_".$i],
"on",
***************
*** 217,224 ****
($class)?" class=$class":"",
$this->makename($base, "more", 0),
! $this->dict[$this->lang]["more"]);
$res .= sprintf("<input type=\"submit\"
name=\"%s\"value=\"%s\"></td>\n",
$this->makename($base, "less", 0),
! $this->dict[$this->lang]["less"]);
} else {
$res .= sprintf(" <td%s> </td>\n", ($class)?" class=$class":"");
--- 217,224 ----
($class)?" class=$class":"",
$this->makename($base, "more", 0),
! lang('More'));
$res .= sprintf("<input type=\"submit\"
name=\"%s\"value=\"%s\"></td>\n",
$this->makename($base, "less", 0),
! lang('Fewer'));
} else {
$res .= sprintf(" <td%s> </td>\n", ($class)?" class=$class":"");
***************
*** 228,235 ****
$res .= sprintf(" <td%s><input type=\"reset\" value=\"%s\"> ",
($class)?" class=$class":"",
! $this->dict[$this->lang]["reset"]);
$res .= sprintf("<input type=\"submit\" name=\"%s\"value=\"%s\"></td>\n",
$this->makename($base, "submit", 0),
! $this->dict[$this->lang]["submit"]);
$res .= sprintf(" </tr>\n");
--- 228,235 ----
$res .= sprintf(" <td%s><input type=\"reset\" value=\"%s\"> ",
($class)?" class=$class":"",
! lang('Clear'));
$res .= sprintf("<input type=\"submit\" name=\"%s\"value=\"%s\"></td>\n",
$this->makename($base, "submit", 0),
! lang('Search'));
$res .= sprintf(" </tr>\n");
***************
*** 293,301 ****
## If necessary, add conjunction
if ($q != "")
! $q .= sprintf(" %s ",
$this->dict[$this->lang][$GLOBALS[$base]["conj_".$i]]);
## Handle "like"
if ($GLOBALS[$base]["comp_".$i] == "like")
! $c = $this->dict[$this->lang][$GLOBALS[$base]["comp_".$i]];
else
$c = $this->compare[$GLOBALS[$base]["comp_".$i]];
--- 293,301 ----
## If necessary, add conjunction
if ($q != "")
! $q .= sprintf(" %s ", lang($GLOBALS[$base]["conj_".$i]));
## Handle "like"
if ($GLOBALS[$base]["comp_".$i] == "like")
! $c = lang($GLOBALS[$base]["comp_".$i]);
else
$c = $this->compare[$GLOBALS[$base]["comp_".$i]];
Index: header.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/bookmarks/inc/header.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** header.inc.php 17 Nov 2001 01:42:47 -0000 1.11
--- header.inc.php 25 Mar 2003 23:02:22 -0000 1.12
***************
*** 26,30 ****
}
! $tabs[1]['label'] = 'Tree view';
$tabs[1]['link'] =
$GLOBALS['phpgw']->link('/bookmarks/tree.php');
if (ereg('tree.php',$PHP_SELF))
--- 26,30 ----
}
! $tabs[1]['label'] = lang('Tree view');
$tabs[1]['link'] =
$GLOBALS['phpgw']->link('/bookmarks/tree.php');
if (ereg('tree.php',$PHP_SELF))
***************
*** 33,37 ****
}
! $tabs[2]['label'] = 'List';
$tabs[2]['link'] =
$GLOBALS['phpgw']->link('/bookmarks/list.php');
if (ereg('list.php',$PHP_SELF))
--- 33,37 ----
}
! $tabs[2]['label'] = lang('List');
$tabs[2]['link'] =
$GLOBALS['phpgw']->link('/bookmarks/list.php');
if (ereg('list.php',$PHP_SELF))
***************
*** 42,46 ****
if (! $GLOBALS['phpgw']->acl->check('anonymous',1,'bookmarks'))
{
! $tabs[3]['label'] = 'New';
$tabs[3]['link'] =
$GLOBALS['phpgw']->link('/bookmarks/create.php');
if (ereg('create.php',$PHP_SELF))
--- 42,46 ----
if (! $GLOBALS['phpgw']->acl->check('anonymous',1,'bookmarks'))
{
! $tabs[3]['label'] = lang('New');
$tabs[3]['link'] =
$GLOBALS['phpgw']->link('/bookmarks/create.php');
if (ereg('create.php',$PHP_SELF))
***************
*** 50,54 ****
}
! $tabs[4]['label'] = 'Search';
$tabs[4]['link'] =
$GLOBALS['phpgw']->link('/bookmarks/search.php');
if (ereg('search.php',$PHP_SELF))
--- 50,54 ----
}
! $tabs[4]['label'] = lang('Search');
$tabs[4]['link'] =
$GLOBALS['phpgw']->link('/bookmarks/search.php');
if (ereg('search.php',$PHP_SELF))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: bookmarks/inc class.bookmarks.inc.php,1.24,1.25 class.plist.inc.php,1.11,1.12 class.sqlquery.inc.php,1.3,1.4 header.inc.php,1.11,1.12,
Michael Totschnig <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: bookmarks/templates/default import.body.tpl,1.6,1.7 maillink.body.tpl,1.6,1.7 search.results.tpl,1.5,1.6
- Next by Date:
[Phpgroupware-cvs] CVS: bookmarks import.php,1.17,1.18 list.php,1.27,1.28 maillink.php,1.12,1.13 maintain.php,1.29,1.30 search.php,1.18,1.19 tree.php,1.27,1.28 view.php,1.20,1.21
- Previous by thread:
[Phpgroupware-cvs] CVS: bookmarks/templates/default import.body.tpl,1.6,1.7 maillink.body.tpl,1.6,1.7 search.results.tpl,1.5,1.6
- Next by thread:
[Phpgroupware-cvs] CVS: bookmarks import.php,1.17,1.18 list.php,1.27,1.28 maillink.php,1.12,1.13 maintain.php,1.29,1.30 search.php,1.18,1.19 tree.php,1.27,1.28 view.php,1.20,1.21
- Index(es):