Skip to content

Commit

Permalink
refs #1726 : basic code setup for cookie name prefix.
Browse files Browse the repository at this point in the history
 - prefix can be changed via config.php
 - default prefix is Textcube[VERSION_NUMBER_WITHOUT_PERIOD]
  • Loading branch information
inureyes committed Dec 31, 2014
1 parent 39d5d95 commit a792507
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions framework/id/textcube/config.default.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,6 @@
$service['useNumericURLonRSS'] = false;
$service['forceinstall'] = false;
$service['useSSL'] = false;
$service['cookie_prefix'] = '';
//$service['adminskin'] = 'whitedream';
?>
9 changes: 9 additions & 0 deletions library/preprocessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,15 @@

}
}

/** INITIALIZE : Cookie prefix
-----------------------------------
Determines cookie prefix.
*/
if ($context->getProperty('service.cookie_prefix','') == '') {
$context->setProperty('service.cookie_prefix','Textcube'.str_replace('.','',TEXTCUBE_VERSION_ID));
}

// DBMS unbind should work after session close.
if( $context->getProperty('database.connected') == true) {
register_shutdown_function( array('POD','unbind') );
Expand Down

0 comments on commit a792507

Please # to comment.