コード例 #1
0
 public function __construct()
 {
     parent::__construct(self::B2DBNAME, self::ID);
     parent::_addForeignKeyColumn(self::USER_ID, TBGUsersTable::getTable(), TBGUsersTable::ID);
     parent::_addForeignKeyColumn(self::ARTICLE_ID, TBGArticlesTable::getTable(), TBGArticlesTable::ID);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
 }
コード例 #2
0
 public function __construct()
 {
     parent::__construct(self::B2DBNAME, self::ID);
     parent::_addForeignKeyColumn(self::UID, TBGUsersTable::getTable(), TBGUsersTable::ID);
     parent::_addForeignKeyColumn(self::TID, B2DB::getTable('TBGTeamsTable'), TBGTeamsTable::ID);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
 }
コード例 #3
0
 protected function _initialize()
 {
     parent::_setup(self::B2DBNAME, self::ID);
     parent::_addForeignKeyColumn(self::UID, TBGUsersTable::getTable());
     parent::_addForeignKeyColumn(self::CID, TBGClientsTable::getTable());
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable());
 }
コード例 #4
0
 protected function _initialize()
 {
     parent::_setup(self::B2DBNAME, self::ID);
     parent::_addForeignKeyColumn(self::USER_ID, TBGUsersTable::getTable(), TBGUsersTable::ID);
     parent::_addForeignKeyColumn(self::ARTICLE_ID, TBGArticlesTable::getTable(), TBGArticlesTable::ID);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
 }
コード例 #5
0
 public function __construct()
 {
     parent::__construct(self::B2DBNAME, self::ID);
     parent::_addInteger(self::TARGET, 10);
     parent::_addInteger(self::VOTE, 2);
     parent::_addForeignKeyColumn(self::UID, TBGUsersTable::getTable(), TBGUsersTable::ID);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
 }
コード例 #6
0
 protected function _initialize()
 {
     parent::_setup(self::B2DBNAME, self::ID);
     parent::_addInteger(self::TARGET, 10);
     parent::_addInteger(self::VOTE, 2);
     parent::_addForeignKeyColumn(self::UID, TBGUsersTable::getTable(), TBGUsersTable::ID);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
 }
コード例 #7
0
 protected function _initialize()
 {
     parent::_setup(self::B2DBNAME, self::ID);
     parent::_addForeignKeyColumn(self::COMPONENT_ID, TBGComponentsTable::getTable());
     parent::_addForeignKeyColumn(self::USER_ID, TBGUsersTable::getTable());
     parent::_addForeignKeyColumn(self::ROLE_ID, TBGListTypesTable::getTable());
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable());
 }
コード例 #8
0
 protected function _initialize()
 {
     parent::_setup(self::B2DBNAME, self::ID);
     parent::_addBoolean(self::CONFIRMED);
     parent::_addForeignKeyColumn(self::USER_ID, TBGUsersTable::getTable(), TBGUsersTable::ID);
     parent::_addForeignKeyColumn(self::GROUP_ID, TBGGroupsTable::getTable(), TBGGroupsTable::ID);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
 }
コード例 #9
0
 public function __construct()
 {
     parent::__construct(self::B2DBNAME, self::ID);
     parent::_addInteger(self::TARGET_TYPE, 5);
     parent::_addForeignKeyColumn(self::EDITION_ID, B2DB::getTable('TBGEditionsTable'), TBGEditionsTable::ID);
     parent::_addForeignKeyColumn(self::UID, TBGUsersTable::getTable(), TBGUsersTable::ID);
     parent::_addForeignKeyColumn(self::TID, B2DB::getTable('TBGTeamsTable'), TBGTeamsTable::ID);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
 }
コード例 #10
0
 protected function _initialize()
 {
     parent::_setup(self::B2DBNAME, self::ID);
     parent::_addForeignKeyColumn(self::UID, TBGUsersTable::getTable(), TBGUsersTable::ID);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
     parent::_addForeignKeyColumn(self::ISSUE_ID, TBGIssuesTable::getTable(), TBGIssuesTable::ID);
     parent::_addForeignKeyColumn(self::FILE_ID, TBGFilesTable::getTable(), TBGFilesTable::ID);
     parent::_addInteger(self::ATTACHED_AT, 10);
 }
コード例 #11
0
 public function __construct()
 {
     parent::__construct(self::B2DBNAME, self::ID);
     parent::_addForeignKeyColumn(self::UID, TBGUsersTable::getTable(), TBGUsersTable::ID);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
     parent::_addForeignKeyColumn(self::ISSUE_ID, TBGIssuesTable::getTable(), TBGIssuesTable::ID);
     parent::_addForeignKeyColumn(self::FILE_ID, TBGFilesTable::getTable(), TBGFilesTable::ID);
     parent::_addInteger(self::ATTACHED_AT, 10);
 }
コード例 #12
0
 public function _initialize()
 {
     parent::_setup(self::B2DBNAME, self::ID);
     parent::_addVarchar(self::NAME, 255);
     parent::_addText(self::CONTENT, false);
     parent::_addBoolean(self::IS_PUBLISHED);
     parent::_addInteger(self::DATE, 10);
     parent::_addForeignKeyColumn(self::AUTHOR, TBGUsersTable::getTable(), TBGUsersTable::ID);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
 }
コード例 #13
0
 public function __construct()
 {
     parent::__construct(self::B2DBNAME, self::ID);
     parent::_addVarchar(self::MODULE_NAME, 50);
     parent::_addBoolean(self::ALLOWED);
     parent::_addForeignKeyColumn(self::UID, TBGUsersTable::getTable(), TBGUsersTable::ID);
     parent::_addForeignKeyColumn(self::GID, TBGGroupsTable::getTable(), TBGGroupsTable::ID);
     parent::_addForeignKeyColumn(self::TID, B2DB::getTable('TBGTeamsTable'), TBGTeamsTable::ID);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
 }
コード例 #14
0
 protected function _initialize()
 {
     parent::_setup(self::B2DBNAME, self::ID);
     parent::_addVarchar(self::MODULE_NAME, 50);
     parent::_addBoolean(self::ALLOWED);
     parent::_addForeignKeyColumn(self::UID, TBGUsersTable::getTable(), TBGUsersTable::ID);
     parent::_addForeignKeyColumn(self::GID, TBGGroupsTable::getTable(), TBGGroupsTable::ID);
     parent::_addForeignKeyColumn(self::TID, Core::getTable('TBGTeamsTable'), TBGTeamsTable::ID);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
 }
コード例 #15
0
 protected function _parse_mention($matches)
 {
     $user = TBGUsersTable::getTable()->getByUsername($matches[1]);
     if ($user instanceof TBGUser) {
         $output = TBGAction::returnComponentHTML('main/userdropdown', array('user' => $matches[1], 'displayname' => $matches[0]));
         $this->mentions[$user->getID()] = $user;
     } else {
         $output = $matches[0];
     }
     return $output;
 }
コード例 #16
0
 public function __construct()
 {
     parent::__construct(self::B2DBNAME, self::ID);
     parent::_addVarchar(self::URL, 300);
     parent::_addInteger(self::LINK_ORDER, 3);
     parent::_addVarchar(self::TARGET_TYPE, 30);
     parent::_addInteger(self::TARGET_ID, 10);
     parent::_addVarchar(self::DESCRIPTION, 100, '');
     parent::_addForeignKeyColumn(self::UID, TBGUsersTable::getTable(), TBGUsersTable::ID);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
 }
コード例 #17
0
 protected function _initialize()
 {
     parent::_setup(self::B2DBNAME, self::ID);
     parent::_addVarchar(self::URL, 300);
     parent::_addInteger(self::LINK_ORDER, 3);
     parent::_addVarchar(self::TARGET_TYPE, 30);
     parent::_addInteger(self::TARGET_ID, 10);
     parent::_addVarchar(self::DESCRIPTION, 100, '');
     parent::_addForeignKeyColumn(self::UID, TBGUsersTable::getTable(), TBGUsersTable::ID);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
 }
コード例 #18
0
 protected function _initialize()
 {
     parent::_setup(self::B2DBNAME, self::ID);
     parent::_addVarchar(self::PERMISSION_TYPE, 100);
     parent::_addVarchar(self::TARGET_ID, 200, 0);
     parent::_addBoolean(self::ALLOWED);
     parent::_addVarchar(self::MODULE, 50);
     parent::_addForeignKeyColumn(self::UID, TBGUsersTable::getTable());
     parent::_addForeignKeyColumn(self::GID, TBGGroupsTable::getTable());
     parent::_addForeignKeyColumn(self::TID, TBGTeamsTable::getTable());
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable());
 }
コード例 #19
0
 public function __construct()
 {
     parent::__construct(self::B2DBNAME, self::ID);
     parent::_addForeignKeyColumn(self::UID, TBGUsersTable::getTable(), TBGUsersTable::ID);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
     parent::_addVarchar(self::REAL_FILENAME, 250);
     parent::_addVarchar(self::CONTENT_TYPE, 250);
     parent::_addVarchar(self::ORIGINAL_FILENAME, 250);
     parent::_addInteger(self::UPLOADED_AT, 10);
     parent::_addBlob(self::CONTENT);
     parent::_addText(self::DESCRIPTION, false);
 }
コード例 #20
0
 protected function _initialize()
 {
     parent::_setup(self::B2DBNAME, self::ID);
     parent::_addVarchar(self::ARTICLE_NAME, 255);
     parent::_addText(self::OLD_CONTENT, false);
     parent::_addText(self::NEW_CONTENT, false);
     parent::_addVarchar(self::REASON, 255);
     parent::_addInteger(self::DATE, 10);
     parent::_addInteger(self::REVISION, 10);
     parent::_addForeignKeyColumn(self::AUTHOR, TBGUsersTable::getTable(), TBGUsersTable::ID);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
 }
コード例 #21
0
 protected function _initialize()
 {
     parent::_setup(self::B2DBNAME, self::ID);
     parent::_addForeignKeyColumn(self::ISSUE_ID, TBGIssuesTable::getTable(), TBGIssuesTable::ID);
     parent::_addForeignKeyColumn(self::EDITED_BY, TBGUsersTable::getTable(), TBGUsersTable::ID);
     parent::_addInteger(self::EDITED_AT, 10);
     parent::_addInteger(self::SPENT_MONTHS, 10);
     parent::_addInteger(self::SPENT_WEEKS, 10);
     parent::_addInteger(self::SPENT_DAYS, 10);
     parent::_addInteger(self::SPENT_HOURS, 10);
     parent::_addFloat(self::SPENT_POINTS);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
 }
コード例 #22
0
 public function __construct()
 {
     parent::__construct(self::B2DBNAME, self::ID);
     parent::_addForeignKeyColumn(self::ISSUE_ID, TBGIssuesTable::getTable(), TBGIssuesTable::ID);
     parent::_addForeignKeyColumn(self::EDITED_BY, TBGUsersTable::getTable(), TBGUsersTable::ID);
     parent::_addInteger(self::EDITED_AT, 10);
     parent::_addInteger(self::ESTIMATED_MONTHS, 10);
     parent::_addInteger(self::ESTIMATED_WEEKS, 10);
     parent::_addInteger(self::ESTIMATED_DAYS, 10);
     parent::_addInteger(self::ESTIMATED_HOURS, 10);
     parent::_addFloat(self::ESTIMATED_POINTS);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
 }
コード例 #23
0
 public function __construct()
 {
     parent::__construct(self::B2DBNAME, self::ID);
     parent::_addVarchar(self::TITLE, 255);
     parent::_addText(self::CONTENT, false);
     parent::_addText(self::LINK, false);
     parent::_addBoolean(self::IS_DELETED);
     parent::_addInteger(self::DATE, 10);
     parent::_addInteger(self::TARGET_BOARD, 10);
     parent::_addForeignKeyColumn(self::ARTICLE_ID, TBGArticlesTable::getTable(), TBGArticlesTable::ID);
     parent::_addForeignKeyColumn(self::AUTHOR, TBGUsersTable::getTable(), TBGUsersTable::ID);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
 }
コード例 #24
0
 public function __construct()
 {
     parent::__construct(self::B2DBNAME, self::ID);
     parent::_addVarchar(self::MODULE_NAME, 50);
     parent::_addInteger(self::NOTIFY_TYPE, 5);
     parent::_addInteger(self::TARGET_ID, 10);
     parent::_addVarchar(self::TITLE, 100);
     parent::_addText(self::CONTENTS, false);
     parent::_addInteger(self::STATUS, 5);
     parent::_addForeignKeyColumn(self::UID, TBGUsersTable::getTable(), TBGUsersTable::ID);
     parent::_addForeignKeyColumn(self::GID, TBGGroupsTable::getTable(), TBGGroupsTable::ID);
     parent::_addForeignKeyColumn(self::TID, B2DB::getTable('TBGTeamsTable'), TBGTeamsTable::ID);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
 }
コード例 #25
0
 protected function _initialize()
 {
     parent::_setup(self::B2DBNAME, self::ID);
     parent::_addVarchar(self::NAME, 200);
     parent::_addText(self::DESCRIPTION, false);
     parent::_addBoolean(self::IS_PUBLIC);
     parent::_addVarchar(self::TEMPLATE_NAME, 200);
     parent::_addVarchar(self::TEMPLATE_PARAMETER, 200);
     parent::_addInteger(self::ISSUES_PER_PAGE, 10);
     parent::_addVarchar(self::GROUPBY, 100);
     parent::_addVarchar(self::GROUPORDER, 5);
     parent::_addForeignKeyColumn(self::APPLIES_TO_PROJECT, TBGProjectsTable::getTable(), TBGProjectsTable::ID);
     parent::_addForeignKeyColumn(self::UID, TBGUsersTable::getTable(), TBGUsersTable::ID);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
 }
コード例 #26
0
 public function __construct()
 {
     parent::__construct(self::B2DBNAME, self::ID);
     parent::_addVarchar(self::NAME, 200);
     parent::_addVarchar(self::DESCRIPTION, 255, '');
     parent::_addBoolean(self::IS_PUBLIC);
     parent::_addVarchar(self::TEMPLATE_NAME, 200);
     parent::_addVarchar(self::TEMPLATE_PARAMETER, 200);
     parent::_addInteger(self::ISSUES_PER_PAGE, 10);
     parent::_addVarchar(self::GROUPBY, 100);
     parent::_addVarchar(self::GROUPORDER, 5);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
     parent::_addForeignKeyColumn(self::APPLIES_TO_PROJECT, TBGProjectsTable::getTable(), TBGProjectsTable::ID);
     parent::_addForeignKeyColumn(self::UID, TBGUsersTable::getTable(), TBGUsersTable::ID);
 }
コード例 #27
0
 protected function _initialize()
 {
     parent::_setup(self::B2DBNAME, self::ID);
     parent::_addInteger(self::TARGET_ID, 10);
     parent::_addInteger(self::TARGET_TYPE, 3);
     parent::_addText(self::CONTENT, false);
     parent::_addInteger(self::POSTED, 10);
     parent::_addInteger(self::UPDATED, 10);
     parent::_addInteger(self::COMMENT_NUMBER, 10);
     parent::_addBoolean(self::DELETED);
     parent::_addBoolean(self::IS_PUBLIC, true);
     parent::_addVarchar(self::MODULE, 50);
     parent::_addBoolean(self::SYSTEM_COMMENT);
     parent::_addForeignKeyColumn(self::SCOPE, TBGScopesTable::getTable(), TBGScopesTable::ID);
     parent::_addForeignKeyColumn(self::UPDATED_BY, TBGUsersTable::getTable(), TBGUsersTable::ID);
     parent::_addForeignKeyColumn(self::POSTED_BY, TBGUsersTable::getTable(), TBGUsersTable::ID);
 }
コード例 #28
0
 public function addIdentity($identity, $email, $user_id)
 {
     $user = TBGUsersTable::getTable()->selectById($user_id);
     $crit = $this->getCriteria();
     $crit->addInsert(self::IDENTITY, $identity);
     $crit->addInsert(self::IDENTITY_HASH, TBGUser::hashPassword($identity, $user->getSalt()));
     $crit->addInsert(self::UID, $user_id);
     $type = 'openid';
     foreach (self::getProviders() as $provider => $string) {
         if (stripos($identity, $string) !== false) {
             $type = $provider;
             break;
         }
     }
     $crit->addInsert(self::TYPE, $type);
     $this->doInsert($crit);
 }
コード例 #29
0
 public function componentUserdropdown()
 {
     TBGLogging::log('user dropdown component');
     $this->rnd_no = rand();
     try {
         if (!$this->user instanceof TBGUser) {
             TBGLogging::log('loading user object in dropdown');
             if (is_numeric($this->user)) {
                 $this->user = TBGUsersTable::getTable()->getByUserId($this->user);
             } else {
                 $this->user = TBGUsersTable::getTable()->getByUsername($this->user);
             }
             TBGLogging::log('done (loading user object in dropdown)');
         }
     } catch (Exception $e) {
     }
     $this->show_avatar = isset($this->show_avatar) ? $this->show_avatar : true;
     TBGLogging::log('done (user dropdown component)');
 }
コード例 #30
0
ファイル: actions.class.php プロジェクト: oparoz/thebuggenie
 public function runAuthenticate(TBGRequest $request)
 {
     $username = trim($request['username']);
     $password = trim($request['password']);
     if ($username) {
         $user = TBGUsersTable::getTable()->getByUsername($username);
         if ($password && $user instanceof TBGUser) {
             foreach ($user->getApplicationPasswords() as $app_password) {
                 if (!$app_password->isUsed()) {
                     if ($app_password->getHashPassword() == TBGUser::hashPassword($password, $user->getSalt())) {
                         $app_password->useOnce();
                         $app_password->save();
                         return $this->renderJSON(array('token' => $app_password->getHashPassword()));
                     }
                 }
             }
         }
     }
     $this->getResponse()->setHttpStatus(400);
     return $this->renderJSON(array('error' => 'Incorrect username or application password'));
 }