diff options
author | RedMatrix <info@friendica.com> | 2015-01-12 09:01:51 +1100 |
---|---|---|
committer | RedMatrix <info@friendica.com> | 2015-01-12 09:01:51 +1100 |
commit | ff01505b369484e89187e796080bad68c8beb8a0 (patch) | |
tree | ba54942533c164e25e64fa61f1c43867270ffe03 | |
parent | 10102ac2ac4d5b02012a9794e23656717ab05556 (diff) | |
parent | 1e6fd907950d7834007b7d06dc6b6bd82347fa5b (diff) | |
download | volse-hubzilla-ff01505b369484e89187e796080bad68c8beb8a0.tar.gz volse-hubzilla-ff01505b369484e89187e796080bad68c8beb8a0.tar.bz2 volse-hubzilla-ff01505b369484e89187e796080bad68c8beb8a0.zip |
Merge pull request #840 from cvogeley/master
Fix for #Issue763
-rw-r--r-- | doc/classRedmatrix_1_1Import_1_1Import-members.html (renamed from doc/html/classRedmatrix_1_1Import_1_1Import-members.html) | 3 | ||||
-rw-r--r-- | doc/classRedmatrix_1_1Import_1_1Import.html (renamed from doc/html/classRedMatrix_1_1Import_1_1Import.html) | 3 | ||||
-rw-r--r-- | doc/html/classRedMatrix_1_1Import_1_1Import-members.html | 3 | ||||
-rw-r--r-- | doc/html/classRedMatrix_1_1Import_1_1Import.js | 18 | ||||
-rw-r--r-- | doc/html/classRedmatrix_1_1Import_1_1Import.html | 1 | ||||
-rw-r--r-- | doc/html/classRedmatrix_1_1Import_1_1Import.js | 2 | ||||
-rw-r--r-- | doc/html/namespaceRedMatrix_1_1Import.html | 120 | ||||
-rw-r--r-- | doc/html/namespaceRedMatrix_1_1Import.js | 4 | ||||
-rw-r--r-- | include/account.php | 26 | ||||
-rw-r--r-- | include/identity.php | 2 | ||||
-rw-r--r-- | mod/manage.php | 2 |
11 files changed, 32 insertions, 152 deletions
diff --git a/doc/html/classRedmatrix_1_1Import_1_1Import-members.html b/doc/classRedmatrix_1_1Import_1_1Import-members.html index 2be66a2ea..736a303d8 100644 --- a/doc/html/classRedmatrix_1_1Import_1_1Import-members.html +++ b/doc/classRedmatrix_1_1Import_1_1Import-members.html @@ -128,5 +128,4 @@ $(document).ready(function(){initNavTree('classRedMatrix_1_1Import_1_1Import.htm <tr><td class="entry"><a class="el" href="classRedMatrix_1_1Import_1_1Import.html#a8d138a9a7d4f79b81d3446ca216a602c">run</a>()</td><td class="entry"><a class="el" href="classRedMatrix_1_1Import_1_1Import.html">RedMatrix\Import\Import</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classRedMatrix_1_1Import_1_1Import.html#a33ed595de044c0ec1cd84cca719e31dc">store</a>($item, $update=false)</td><td class="entry"><a class="el" href="classRedMatrix_1_1Import_1_1Import.html">RedMatrix\Import\Import</a></td><td class="entry"></td></tr> </table></div><!-- contents --> -</div><!-- doc-content --> - +</div><!-- doc-content -->
\ No newline at end of file diff --git a/doc/html/classRedMatrix_1_1Import_1_1Import.html b/doc/classRedmatrix_1_1Import_1_1Import.html index 2119780c3..0ee9373f2 100644 --- a/doc/html/classRedMatrix_1_1Import_1_1Import.html +++ b/doc/classRedmatrix_1_1Import_1_1Import.html @@ -443,5 +443,4 @@ Private Attributes</h2></td></tr> <li>include/Import/<a class="el" href="Importer_8php.html">Importer.php</a></li> </ul> </div><!-- contents --> -</div><!-- doc-content --> - +</div><!-- doc-content -->
\ No newline at end of file diff --git a/doc/html/classRedMatrix_1_1Import_1_1Import-members.html b/doc/html/classRedMatrix_1_1Import_1_1Import-members.html index 2be66a2ea..736a303d8 100644 --- a/doc/html/classRedMatrix_1_1Import_1_1Import-members.html +++ b/doc/html/classRedMatrix_1_1Import_1_1Import-members.html @@ -128,5 +128,4 @@ $(document).ready(function(){initNavTree('classRedMatrix_1_1Import_1_1Import.htm <tr><td class="entry"><a class="el" href="classRedMatrix_1_1Import_1_1Import.html#a8d138a9a7d4f79b81d3446ca216a602c">run</a>()</td><td class="entry"><a class="el" href="classRedMatrix_1_1Import_1_1Import.html">RedMatrix\Import\Import</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classRedMatrix_1_1Import_1_1Import.html#a33ed595de044c0ec1cd84cca719e31dc">store</a>($item, $update=false)</td><td class="entry"><a class="el" href="classRedMatrix_1_1Import_1_1Import.html">RedMatrix\Import\Import</a></td><td class="entry"></td></tr> </table></div><!-- contents --> -</div><!-- doc-content --> - +</div><!-- doc-content -->
\ No newline at end of file diff --git a/doc/html/classRedMatrix_1_1Import_1_1Import.js b/doc/html/classRedMatrix_1_1Import_1_1Import.js deleted file mode 100644 index 03e429289..000000000 --- a/doc/html/classRedMatrix_1_1Import_1_1Import.js +++ /dev/null @@ -1,18 +0,0 @@ -var classRedMatrix_1_1Import_1_1Import = -[ - [ "convert_child", "classRedMatrix_1_1Import_1_1Import.html#a5434325afb2c633c52540127d717800a", null ], - [ "convert_item", "classRedMatrix_1_1Import_1_1Import.html#a107703a43a1b0ceb2af7ae470cb3f218", null ], - [ "convert_taxonomy", "classRedMatrix_1_1Import_1_1Import.html#addf6e53dacd971eaab49be4b17a767d6", null ], - [ "get_children", "classRedMatrix_1_1Import_1_1Import.html#a57561904b0f127e0d9a3e2c33688daf8", null ], - [ "get_credentials", "classRedMatrix_1_1Import_1_1Import.html#a24134929d9a8a682da2036a0bf326367", null ], - [ "get_item", "classRedMatrix_1_1Import_1_1Import.html#a27987a41cb703a796f1821baeb4774a2", null ], - [ "get_item_ident", "classRedMatrix_1_1Import_1_1Import.html#a772c28edf36aaf8e66007a95004c4059", null ], - [ "get_itemlist", "classRedMatrix_1_1Import_1_1Import.html#a855cd5a79b95d269ae8737fae774e3bc", null ], - [ "get_taxonomy", "classRedMatrix_1_1Import_1_1Import.html#ae3c6472bea1a44025bc2e152604eb20c", null ], - [ "run", "classRedMatrix_1_1Import_1_1Import.html#a8d138a9a7d4f79b81d3446ca216a602c", null ], - [ "store", "classRedMatrix_1_1Import_1_1Import.html#a33ed595de044c0ec1cd84cca719e31dc", null ], - [ "$credentials", "classRedMatrix_1_1Import_1_1Import.html#a864aac9fadb4846f5d9f840e8e0f440f", null ], - [ "$itemlist", "classRedMatrix_1_1Import_1_1Import.html#ad0d2bdc3b388220479063915b4f5c2fc", null ], - [ "$items", "classRedMatrix_1_1Import_1_1Import.html#a0a05dac405ccc5b617b7b7b3c8ed783c", null ], - [ "$src_items", "classRedMatrix_1_1Import_1_1Import.html#a88c2eeba8d0cba3e7c12a2c45ba0fbc6", null ] -];
\ No newline at end of file diff --git a/doc/html/classRedmatrix_1_1Import_1_1Import.html b/doc/html/classRedmatrix_1_1Import_1_1Import.html index 2119780c3..3920dd3d9 100644 --- a/doc/html/classRedmatrix_1_1Import_1_1Import.html +++ b/doc/html/classRedmatrix_1_1Import_1_1Import.html @@ -444,4 +444,3 @@ Private Attributes</h2></td></tr> </ul> </div><!-- contents --> </div><!-- doc-content --> - diff --git a/doc/html/classRedmatrix_1_1Import_1_1Import.js b/doc/html/classRedmatrix_1_1Import_1_1Import.js index 03e429289..6d01249e1 100644 --- a/doc/html/classRedmatrix_1_1Import_1_1Import.js +++ b/doc/html/classRedmatrix_1_1Import_1_1Import.js @@ -15,4 +15,4 @@ var classRedMatrix_1_1Import_1_1Import = [ "$itemlist", "classRedMatrix_1_1Import_1_1Import.html#ad0d2bdc3b388220479063915b4f5c2fc", null ], [ "$items", "classRedMatrix_1_1Import_1_1Import.html#a0a05dac405ccc5b617b7b7b3c8ed783c", null ], [ "$src_items", "classRedMatrix_1_1Import_1_1Import.html#a88c2eeba8d0cba3e7c12a2c45ba0fbc6", null ] -];
\ No newline at end of file +]; diff --git a/doc/html/namespaceRedMatrix_1_1Import.html b/doc/html/namespaceRedMatrix_1_1Import.html deleted file mode 100644 index a0ab85227..000000000 --- a/doc/html/namespaceRedMatrix_1_1Import.html +++ /dev/null @@ -1,120 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> -<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> -<meta http-equiv="X-UA-Compatible" content="IE=9"/> -<meta name="generator" content="Doxygen 1.8.3.1"/> -<title>The Red Matrix: RedMatrix\Import Namespace Reference</title> -<link href="tabs.css" rel="stylesheet" type="text/css"/> -<script type="text/javascript" src="jquery.js"></script> -<script type="text/javascript" src="dynsections.js"></script> -<link href="navtree.css" rel="stylesheet" type="text/css"/> -<script type="text/javascript" src="resize.js"></script> -<script type="text/javascript" src="navtree.js"></script> -<script type="text/javascript"> - $(document).ready(initResizable); - $(window).load(resizeHeight); -</script> -<link href="search/search.css" rel="stylesheet" type="text/css"/> -<script type="text/javascript" src="search/search.js"></script> -<script type="text/javascript"> - $(document).ready(function() { searchBox.OnSelectItem(0); }); -</script> -<link href="doxygen.css" rel="stylesheet" type="text/css" /> -</head> -<body> -<div id="top"><!-- do not remove this div, it is closed by doxygen! --> -<div id="titlearea"> -<table cellspacing="0" cellpadding="0"> - <tbody> - <tr style="height: 56px;"> - <td id="projectlogo"><img alt="Logo" src="rm-64.png"/></td> - <td style="padding-left: 0.5em;"> - <div id="projectname">The Red Matrix - </div> - </td> - </tr> - </tbody> -</table> -</div> -<!-- end header part --> -<!-- Generated by Doxygen 1.8.3.1 --> -<script type="text/javascript"> -var searchBox = new SearchBox("searchBox", "search",false,'Search'); -</script> - <div id="navrow1" class="tabs"> - <ul class="tablist"> - <li><a href="index.html"><span>Main Page</span></a></li> - <li><a href="pages.html"><span>Related Pages</span></a></li> - <li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li> - <li><a href="annotated.html"><span>Classes</span></a></li> - <li><a href="files.html"><span>Files</span></a></li> - <li> - <div id="MSearchBox" class="MSearchBoxInactive"> - <span class="left"> - <img id="MSearchSelect" src="search/mag_sel.png" - onmouseover="return searchBox.OnSearchSelectShow()" - onmouseout="return searchBox.OnSearchSelectHide()" - alt=""/> - <input type="text" id="MSearchField" value="Search" accesskey="S" - onfocus="searchBox.OnSearchFieldFocus(true)" - onblur="searchBox.OnSearchFieldFocus(false)" - onkeyup="searchBox.OnSearchFieldChange(event)"/> - </span><span class="right"> - <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> - </span> - </div> - </li> - </ul> - </div> - <div id="navrow2" class="tabs2"> - <ul class="tablist"> - <li><a href="namespaces.html"><span>Namespace List</span></a></li> - <li><a href="namespacemembers.html"><span>Namespace Members</span></a></li> - </ul> - </div> -</div><!-- top --> -<div id="side-nav" class="ui-resizable side-nav-resizable"> - <div id="nav-tree"> - <div id="nav-tree-contents"> - <div id="nav-sync" class="sync"></div> - </div> - </div> - <div id="splitbar" style="-moz-user-select:none;" - class="ui-resizable-handle"> - </div> -</div> -<script type="text/javascript"> -$(document).ready(function(){initNavTree('namespaceRedMatrix_1_1Import.html','');}); -</script> -<div id="doc-content"> -<!-- window showing the filter options --> -<div id="MSearchSelectWindow" - onmouseover="return searchBox.OnSearchSelectShow()" - onmouseout="return searchBox.OnSearchSelectHide()" - onkeydown="return searchBox.OnSearchSelectKey(event)"> -<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Pages</a></div> - -<!-- iframe showing the search results (closed by default) --> -<div id="MSearchResultsWindow"> -<iframe src="javascript:void(0)" frameborder="0" - name="MSearchResults" id="MSearchResults"> -</iframe> -</div> - -<div class="header"> - <div class="summary"> -<a href="#nested-classes">Classes</a> </div> - <div class="headertitle"> -<div class="title">RedMatrix\Import Namespace Reference</div> </div> -</div><!--header--> -<div class="contents"> -<table class="memberdecls"> -<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> -Classes</h2></td></tr> -<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classRedMatrix_1_1Import_1_1Import.html">Import</a></td></tr> -<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> -</table> -</div><!-- contents --> -</div><!-- doc-content --> - diff --git a/doc/html/namespaceRedMatrix_1_1Import.js b/doc/html/namespaceRedMatrix_1_1Import.js deleted file mode 100644 index c26a05140..000000000 --- a/doc/html/namespaceRedMatrix_1_1Import.js +++ /dev/null @@ -1,4 +0,0 @@ -var namespaceRedMatrix_1_1Import = -[ - [ "Import", "classRedMatrix_1_1Import_1_1Import.html", "classRedMatrix_1_1Import_1_1Import" ] -];
\ No newline at end of file diff --git a/include/account.php b/include/account.php index 8df44acba..88036e2ef 100644 --- a/include/account.php +++ b/include/account.php @@ -590,6 +590,32 @@ function service_class_allows($uid,$property,$usage = false) { } } +// like service_class_allows but queries by account rather than channel +function account_service_class_allows($aid,$property,$usage = false) { + $a = get_app(); + $r = q("select account_service_class as service_class from account where account_id = %d limit 1", + intval($aid) + ); + if($r !== false and count($r)) { + $service_class = $r[0]['service_class']; + } + + if(! x($service_class)) + return true; // everything is allowed + + $arr = get_config('service_class',$service_class); + if(! is_array($arr) || (! count($arr))) + return true; + + if($usage === false) + return ((x($arr[$property])) ? (bool) $arr[$property] : true); + else { + if(! array_key_exists($property,$arr)) + return true; + return (((intval($usage)) < intval($arr[$property])) ? true : false); + } +} + function service_class_fetch($uid,$property) { $a = get_app(); diff --git a/include/identity.php b/include/identity.php index 17238ea99..2f400520f 100644 --- a/include/identity.php +++ b/include/identity.php @@ -34,7 +34,7 @@ function identity_check_service_class($account_id) { $ret['total_identities'] = intval($r[0]['total']); - if(! service_class_allows($account_id,'total_identities',$r[0]['total'])) { + if(! account_service_class_allows($account_id,'total_identities',$r[0]['total'])) { $result['message'] .= upgrade_message(); return $result; } diff --git a/mod/manage.php b/mod/manage.php index b0de945bf..b6e10bf46 100644 --- a/mod/manage.php +++ b/mod/manage.php @@ -133,7 +133,7 @@ function manage_content(&$a) { intval(get_account_id()), intval(PAGE_REMOVED) ); - $limit = service_class_fetch(local_user(),'total_identities'); + $limit = account_service_class_fetch(get_account_id(),'total_identities'); if($limit !== false) { $channel_usage_message = sprintf( t("You have created %1$.0f of %2$.0f allowed channels."), $r[0]['total'], $limit); } |