View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Support us on Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - v11 - create new user - no 'newGui' records in Today table - ProjeQtOr
 
 

v11 - create new user - no 'newGui' records in Today table

More
27 Sep 2023 16:18 - 28 Sep 2023 13:31 #1 by mkavurcic
please check

here is quick hack - Today.php:
/* ============================================================================
 * Parameter is a global kind of object for parametring.
 * It may be on user level, on project level or on global level.
 */
require_once('_securityCheck.php');
class Today extends SqlElement {

  // extends SqlElement, so has $id
  public $id;    // redefine $id to specify its visiblez place
  public $idUser;
  public $scope;
  public $staticSection;
  public $idReport;
  public $sortOrder;
  public $idle;
 
  public static $staticList=array('Projects','AssignedTasks','ResponsibleTasks', 'AccountableTasks', 'IssuerRequestorTasks','ProjectsTasks','Documents');
  //mk add
  public static $newGuiList=array('Projects','Message','Documents', 'Todo', 'ResponsibleTodoList','News');
//end mk add
  public $_noHistory=true; // Will never save history for this object
 
  /** ==========================================================================
   * Constructor
   * @param $id the id of the object in the database (null if not stored yet)
   * @return void
   */
  function __construct($id = NULL, $withoutDependentObjects=false) {
    parent::__construct($id,$withoutDependentObjects);
  }

 
  /** ==========================================================================
   * Destructor
   * @return void
   */
  function __destruct() {
    parent::__destruct();
  }
 
  function delete() {
      $p=new TodayParameter();
      $res=$p->purge("idToday=".$this->id);
      return parent::delete();
  }

// ============================================================================**********
// GET VALIDATION SCRIPT
// ============================================================================**********

  /** ==========================================================================
   * Return the validation sript for some fields
   * @return the validation javascript (for dojo frameword)
   */
 
  public static function insertStaticItems() {
    $user=getSessionUser();
    $sort=0;
    foreach (self::$staticList as $static) {
      $crit=array('idUser'=>$user->id, 'scope'=>'static', 'staticSection'=>$static);
      $sort+=1;
      $item=SqlElement::getSingleSqlElementFromCriteria('Today', $crit);
      if (!$item->id) {
        $item->sortOrder=$sort;
        $item->idle=0;
        $item->scope='static';
        $item->save();
      }
    }
    //mk add
    $sort=0;
    foreach (self::$newGuiList as $static) {
      $crit=array('idUser'=>$user->id, 'scope'=>'newGui', 'staticSection'=>$static);
      $sort+=1;
      $item=SqlElement::getSingleSqlElementFromCriteria('Today', $crit);
      if (!$item->id) {
        $item->sortOrder=$sort;
        $item->idle=0;
        $item->scope='newGui';
        $item->save();
      }
    }
    //end mk add
  }
}
?>
Last edit: 28 Sep 2023 13:31 by mkavurcic. Reason: quick hack for impatient

Please Log in or Create an account to join the conversation.

More
29 Sep 2023 17:45 #2 by babynus
Sorry, I don't understand the purpose of the code you propose

Babynus
Administrator of ProjeQtOr web site

Please Log in or Create an account to join the conversation.

More
29 Sep 2023 17:57 - 29 Sep 2023 18:01 #3 by mkavurcic
please try the following:
create new user in v11; login as user; no newGui sections available on Today screen
Last edit: 29 Sep 2023 18:01 by mkavurcic.

Please Log in or Create an account to join the conversation.

More
29 Sep 2023 18:13 #4 by babynus
I understand now.
Thank you.
Ticket recorded.

Babynus
Administrator of ProjeQtOr web site

Please Log in or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.028 seconds

Cookies settings

×

Functional Cookies

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Please login to see yours activities!

Other cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.