Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

How I can display only private help topics on open.php? osTicket 1.10

I was using version 1.9.15 and had two applications installed, one http://mysupport.com/ and http://mysupport.com/2, at http://mysupport.com/ the open.php page showed only The public help topics and at http://mysupport.com/2 only the private topics, because I had the interface for external users and internal users, using the same database, because one can not see the topics of the other.

I did this by modifying class.topic.php at http://mysupport.com/2/include at line 261:

If (! $ Names) {
            $ Sql ​​= 'SELECT topic_id, topic_pid, ispublic, isactive, topic FROM' .TOPIC_TABLE
                . 'WHERE isactive = 1 AND ispublic = 0 ORDER BY `sort`';

            $ Res = db_query ($ sql);

            // Fetch information for all topics, in declared sort order
            $ Topics = array ();
            While (list ($ id, $ pid, $ pub, $ act, $ topic) = db_fetch_row ($ res))
                $ Topics [$ id] = array ('pid' => $ pid, 'public' => $ pub,
                    'Disabled' =>! $ Act, 'topic' => $ topic);

What I want to know is how to do this in version 1.10, since class.topic.php is different, I could not enter the WHERE so that only private threads are displayed.

If anyone can help me, I appreciate it.
Tagged:

Comments

  • The same function "getHelpTopics" in the 1.10 at class.topic.php:

    static function getHelpTopics($publicOnly=false, $disabled=false, $localize=true) {
            global $cfg;
            static $topics, $names = array();

            // If localization is specifically requested, then rebuild the list.
            if (!$names || $localize) {
                $objects = self::objects()->values_flat(
                    'topic_id', 'topic_pid', 'ispublic', 'isactive', 'topic'
                )
                ->order_by('sort');

    I want select only ispublic=0 on table, but how?
Sign In or Register to comment.