require_once("include/pgettext.php");
-define ( 'FRIENDIKA_VERSION', '2.2.1062' );
+define ( 'FRIENDIKA_VERSION', '2.2.1075' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
-define ( 'DB_UPDATE_VERSION', 1077 );
+define ( 'DB_UPDATE_VERSION', 1080 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
-define ( 'DOWN_ARROW', '⇩' );
+
/**
*
/**
* relationship types
- * When used in contact records, this indicates that 'uid' has
- * this relationship with contact['name']
*/
-define ( 'REL_VIP', 1); // other person is 'following' us
-define ( 'REL_FAN', 2); // we are 'following' other person
-define ( 'REL_BUD', 3); // mutual relationship
+define ( 'CONTACT_IS_FOLLOWER', 1);
+define ( 'CONTACT_IS_SHARING', 2);
+define ( 'CONTACT_IS_FRIEND', 3);
+
/**
* Hook array order
* page/profile types
*
* PAGE_NORMAL is a typical personal profile account
- * PAGE_SOAPBOX automatically approves all friend requests as REL_FAN, (readonly)
- * PAGE_COMMUNITY automatically approves all friend requests as REL_FAN, but with
+ * PAGE_SOAPBOX automatically approves all friend requests as CONTACT_IS_SHARING, (readonly)
+ * PAGE_COMMUNITY automatically approves all friend requests as CONTACT_IS_SHARING, but with
* write access to wall and comments (no email and not included in page owner's ACL lists)
- * PAGE_FREELOVE automatically approves all friend requests as full friends (REL_BUD).
+ * PAGE_FREELOVE automatically approves all friend requests as full friends (CONTACT_IS_FRIEND).
*
*/
$this->path = $path;
}
- set_include_path("include/$this->hostname" . PATH_SEPARATOR . 'include' . PATH_SEPARATOR . '.' );
+ set_include_path(
+ "include/$this->hostname" . PATH_SEPARATOR
+ . 'include' . PATH_SEPARATOR
+ . 'library' . PATH_SEPARATOR
+ . 'library/phpsec' . PATH_SEPARATOR
+ . '.' );
if((x($_SERVER,'QUERY_STRING')) && substr($_SERVER['QUERY_STRING'],0,2) === "q=")
$this->query_string = substr($_SERVER['QUERY_STRING'],2);
}}
-function get_guid() {
- $exists = true;
+function get_guid($size=16) {
+ $exists = true; // assume by default that we don't have a unique guid
do {
- $s = random_string(16);
+ $s = random_string($size);
$r = q("select id from guid where guid = '%s' limit 1", dbesc($s));
- if(! results($r))
+ if(! count($r))
$exists = false;
} while($exists);
q("insert into guid ( guid ) values ( '%s' ) ", dbesc($s));
$a = get_app();
$args = func_get_args();
- call_hooks("proc_run", $args);
+ $arr = array('args' => $args, 'run_cmd' => true);
+
+ call_hooks("proc_run", $arr);
+ if(! $arr['run_cmd'])
+ return;
if(count($args) && $args[0] === 'php')
$args[0] = ((x($a->config,'php_path')) && (strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
-
foreach ($args as $arg){
$arg = escapeshellarg($arg);
}